File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "web.xml" Watch "web.xml" New topic


mani k

Joined: Jul 12, 2006
Posts: 4
i learned that the servlets need to be configured in web.xml. suppose if i am working with many number of servlets, then do each servlet need to be configured separately in web.xml ?
or is there any minimum general configuration using wildcards/regexp ? and please tell me where can i get detailed info on the role of web.xml.

Thank you


ThAnKs<br /> <br />--<br />MaNi
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Until Servlets 2.5, every servlets had to be configured in web.xml. Some containers allow to access servlets without configuring them in web.xml. For example, Tomcat's InvokerServlet.

Since Servlets 3.0, you don't need to declare them in web.xml anymore. You can use the @WebServlet annotation instead.

[My Blog]
All roads lead to JavaRanch
I agree. Here's the link:
subject: web.xml
It's not a secret anymore!