Two Laptop Bag*
The moose likes Tomcat and the fly likes Tomcat 7 coontext path and war file name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 7 coontext path and war file name" Watch "Tomcat 7 coontext path and war file name" New topic
Author

Tomcat 7 coontext path and war file name

Prashant Chotu
Greenhorn

Joined: Jun 28, 2012
Posts: 19


Is there any configuration in tomcat context.xml file so that if I give non-empty context path in the url and my ROOT.war is browsed ?

For eg - Browse localhost:8080 gives access to webapps/ROOT directory

I want - Browse localhost:8080/xyz should give access to webapps/ROOT directory.

Is it possible ?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

The context.xml file allows defining one and only one webapp instance (context). However, you can create an explicit second context named "xyz.xml" and place it in the TOMCAT_HOME/conf/Catalina/localhost directory. This will cause a second, independent instance of the webapp to be deployed under the "xyz" context (note that it's the FILENAME, not the value within this xml file that determines the context path!)

If you wanted a single webapp instance under multiple context paths, you'd need an alternative approach.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat 7 coontext path and war file name
 
Similar Threads
Tomcat6 and Java Beans
setting index.html to my context root
TOMCAT - Where should GIFs be placed ?
JSP and JavaBeans
where to put war