Set your application context path in Tomcat 7

Set Context path in Tomcat 7 or more using file,

Step 1)
Add following lines to file under <tomcat-install dir>/conf directory,

#myApp war file version
myApp .war=myAppLive -
myApp .path=/myAppLive

#application deployment location

Step 2)
Now update context path in <Host> node in server.xml file in same location,
<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="false">
 <Context path="${myApp .path}" docBase="${catalina.base}/${appBase}/${myApp .war}"/>


Popular posts from this blog

Can not connect to git using ssh (Permissions 0644 for '/root/.ssh/id_rsa' are too open.

Session timeout interceptor in struts 2