• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat 7 coontext path and war file name

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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 ?
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic