Deploying My Application At the Root in Tomcat

Deploying my application at the root in Tomcat

You have a couple of options:

  1. Remove the out-of-the-box ROOT/ directory from tomcat and rename your war file to ROOT.war before deploying it.

  2. Deploy your war as (from your example) war_name.war and configure the context root in conf/server.xml to use your war file :

    <Context path="" docBase="war_name" debug="0" reloadable="true"></Context>

The first one is easier, but a little more kludgy. The second one is probably the more elegant way to do it.

Tomcat deploy context root via commandline

Everything is working as it is supposed to work: the base file name of the empty context path is ROOT (see naming scheme). Therefore a WAR file for the root context will be uploaded to $CATALINA_BASE/webapps/ROOT.war.

Deploying .war application in Tomcat to root

I solved this by using forwarding/masking (through the domain name provider)

I forwarded www.abc.com to www.abc.com/specific
and I masked so that "specific" is not shown



Related Topics



Leave a reply



Submit