Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Problems running servlet 3.0 webapp in embedded Jetty 9


Jan Bartel wrote:
> Have a look at this page here for info on using annotations embedded:

Thanks for the pointer Jan!
Adding this stanza solved the problem with annotation processing:

Configuration.ClassList classlist = Configuration.ClassList.setServerDefault(server);
classlist.addBefore("org.eclipse.jetty.webapp.JettyWebXmlConfiguration", "org.eclipse.jetty.annotations.AnnotationConfiguration");

However, it's not really an intuitive way of configuring servlet 3.0 API annotation processing for embedded Jetty.
Would it make sense to add a more self-documenting way of doing this?

What about servlet API listeners?
How do I add listeners to a webapp context programmatically?

marko

Back to the top