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


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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