java - servers - jetty vs weblogic
How do you specify the root context in your<web-app> tags in web.xml? (1)
I would like to specify the root context of my Java web application in my WAR file. How can I do this using valid
web-app XML in a
Oh, yes I would like to do this in an application server agnostic way.
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.
- Glassfish: sun-web.xml;
- JBoss: jboss-web.xml;
- Weblogic: weblogic.xml;
- Tomcat: context.xml;
- WebSphere: ibm-web-ext.xml.
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.