Servlet 3.0 support in embedded Jetty 8.0?

Add to your code context. SetConfigurations(new Configuration { new AnnotationConfiguration(), new WebXmlConfiguration(), new WebInfConfiguration(), new TagLibConfiguration(), new PlusConfiguration(), new MetaInfConfiguration(), new FragmentConfiguration(), new EnvConfiguration() }); You only need to set the AnnotationConfiguration to get the auto-discovery of annotated classes to work. The rest of the configurations are so you can enable other aspects of the container.

Supposedly you should be able to do this from the commandline, using OPTIONS=annotations,jsp,(etc...), but I never got that working. At least this way it should pick up your annotated classes properly in the embedded environment. Also as a side note it appears the Eclipse jetty project has annotation turned off by default, whereas riptide claims to have them turned on by default.

I'm guessing this is a difference in the configuration files.

I realize the post is ancient, but I found I had the same problems with the embedded server even a year after this post. – Jeff Miller Oct 26 at 15:10 I found the AsyncContext wasn't working quite right in Jetty. I abandoned it for the time being in favor of Embedded Tomcat 7.

Which seems to be working well for the time being. – Jeff Miller Nov 16 at 19:03.

Jetty 8 is implementing the servlet 3.0 specification but it's still experimental. You could also use the embedded glassfish 3 plugin to run your tests. See the below links for some info: wikis.sun.com/display/GlassFish/3.1Embed... ocpsoft.com/java/using-embedded-glassfis... embedded-glassfish.java.net/ I realise as I write this that there are no authoritative resource for using the Glassfish plugin in the manner Jetty is often used.

However it does work in a similar way. I hope this helps at least a bit.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions