Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to deploy a WAR file called (say) 'myapp.war' to Tomcat 7 , such that the context is different from the WAR file ? So, even though my WAR file is called 'myapp' I want to access the URL as (eg) http://localhost/mycontent

share|improve this question

I've never really thought about doing that kind of rewriting in Tomcat itself.

For various reasons, scalability included, I usually set up Tomcat and Apache with mod_proxy so that Apache acts as a Reverse Proxy for the Tomcat instance, then you can do all the rewriting you like with Apache, instead of fiddling with Context names.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.