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

Regarding web.xml

Prasad Babu
Ranch Hand

Joined: Jul 17, 2005
Posts: 57
Hi All,
I have a doubt. i.e.

If the project has different modules like 5-6 modules. Its very difficult to add, update or modify servlet info in the web.xml file. Can we create different configuration files for different modules? and include those onfo in web.xml so that if any chages regarding perticular module we can modify easily of that configuration file. If its possible, How can we get?Please explain how?

Thanks in advance.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Neither Tomcat nor the Servlet specification have no provisions for a web.xml file split into several pieces.

You could use an XDoclet-based solution where all information that goes into web.xml is kept in the source code in various places, and the actual web.xml file is assembled during an Ant build.
Prasad Babu
Ranch Hand

Joined: Jul 17, 2005
Posts: 57
Hi Ulf Dittmer
Thank for your reply.
But I dont know about XDoclet. Can I use properties file for each module containing the information regarding servlets. If so how can I Use?
Thanks in advance.
I agree. Here's the link:
subject: Regarding web.xml
jQuery in Action, 3rd edition