As Colin said you can use @WebServlet and enable configuration via 
annotation scanning in your servlet container. However if your application 
is large then scanning might slow your deployment down. If deployment time 
is not a concern then it is the easiest solution. There are additional 
annotations for other classes you normally add to your web.xml.

If you don't like class scanning during deployment time you can write an 
annotation processor that picks up all these @WebServlet annotated servlets 
and generates a class that registers them using the ServletContext API. 
Then you use that generated class in a custom ServletContextListener 
implementation to register everything. That ServletContextListener would 
then be the only entry in your web.xml. Alternatively, if you use Jetty as 
servlet container you can use Jetty's quickstart module to let it generate 
a web.xml by scanning your code once (as part of the build process).

-- J.


-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/google-web-toolkit/4912bb96-4c7d-4959-a028-8ff2cc56b0b0n%40googlegroups.com.

Reply via email to