This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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!