Tomcat – Make Tomcat go directly to application

tomcat

I have a few Tomcat installs where there is only a single main application on them (in addition to things like Manager). Other than just changing the default Tomcat homepage to include a redirect to the app, is there a better way? Or, one better, how can I map http://domain.com:8080/app to just http://domain.com:8080 and leave the other apps (like Manager) alone?

Best Answer

Install the app to be the ROOT context.

That could be done by:

  1. deploying the war file as ROOT.war,
  2. deploying the exploded war file in the webapps/ROOT directory,
  3. deploying the app to the path "/" via the Tomcat manager,
  4. adding a Context section to your Tomcat configuration: <Context path="/" docBase="${catalina.home}/webapps/app"/>
Related Topic