views:

209

answers:

1

I would like specify the root context of my Java Web Application in my WAR file. How can I do this using valid web-app xml in web.xml file?

Oh, yes I would like to do this in an Application Server agnostic way.

Thank you in advance, Rob

+6  A: 

This can't be done in an appserver agnostic way. Context root isn't part of the standard web.xml file. It's either specified when you deploy the app or in an appserver specific descriptor.

Note: the above applies to deploying WAR files. EAR files are a different story and the context can be specified as part of the application.xml deployment descriptor.

cletus
nice answer +1 :-)
toolkit
good answer. Not the answer I was hoping for.
sewardrobert
That link to Tomcat 4.0 documentation is at least 5 years old - anyone using Tomcats might want to check docs of later version
matt b