This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Servlets and the fly likes Mapping in Web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Mapping in Web.xml" Watch "Mapping in Web.xml" New topic
Author

Mapping in Web.xml

Ajith Prasad
Ranch Hand

Joined: Aug 22, 2006
Posts: 66
How the mappings are being done when we have n number of servlets in an application.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

With multiple servlet-mapping entries.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ajith Prasad
Ranch Hand

Joined: Aug 22, 2006
Posts: 66
Then the web.xml becomes too long, is it?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Too long for what?
Ajith Prasad
Ranch Hand

Joined: Aug 22, 2006
Posts: 66
my straight forward question is, can we split web.xml in equal parts using any special tool and during run time, it should be combined automatically
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12809
    
    5
The only thing that comes close to that is the default web.xml in the conf directory which applies to all apps in a Tomcat instances - it is the base that is modified in specific apps in their own web.xml (only one web.xml per app, not splitable)

If you want to write a tool to gather up web.xml fragments and create the one single web.xml required by your application, XSLT would probably be the simplest.

Bill
Ajith Prasad
Ranch Hand

Joined: Aug 22, 2006
Posts: 66
Is there anyway that i can handle the above issue with xdoclet
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mapping in Web.xml