Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Enabling annotations per webapp

Using Jetty 2.5.1

The doc at http://www.eclipse.org/jetty/documentation/current/annotations.html says
 
> Jetty supports the servlet specification annotations. It is not enabled by default, 
> so the following sections show you how to enable it, and how to use them
>
> Quick Setup
>
> If you are using the standard distribution of Jetty, and want to enable processing of 
> annotation for all your webapps, edit the $JETTY_HOME/start.ini file and uncomment 
> the following lines...

But later in http://www.eclipse.org/jetty/documentation/current/using-annotations.html it says

> By default, Jetty will scan all classes from WEB-INF/classes, and all jars from WEB-INF/lib 
> according to the order, if any, established by absolute or relative ordering clauses in web.xml.

This seems self-contradictory.  If I want to use annotations such as @WebServlet, do I need the start.ini file or can annotation scanning be turned on per webapp, and if so, how?


Back to the top