Set your application context path in Tomcat 7

Set Context path in Tomcat 7 or more using catalina.properties file,

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

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

#application deployment location
appBase=webapps

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}"/>
...
....

</Host>

Comments

Popular posts from this blog

Read Images from a xlsx file using Apache POI

Read Excel using Apache POI - Exception in thread "main" org.apache.poi.poifs.filesystem.OfficeXmlFileException:

Struts 2 : Warning :No configuration found for the specified action: 'Login.action' in namespace: '/'