Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.