Tomcat 7: Set context path for your application in tomcat 7

Set context path for your application in tomcat 7

If you want to change context path for your application, you can do by changing
{catalina_base}/conf/server.xml file.
Suppose, you have deployed your application in tomcat 7,
              http://localhost:8080/MyApp
You want to set context path to newMyApp,
Modify, host element in server.xml under tomcat/conf

<Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="false">
....
... .
<Context path="/ newMyApp "  docBase="/ MyApp " reloadable="true">
 </Context>



 </Host>

For detailed information, visit http://tomcat.apache.org/tomcat-7.0-doc/deployer-howto.html#A_word_on_Contexts

Comments

Popular posts from this blog

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

Upload csv file at Google Cloud Storage using java

Read Images from a xlsx file using Apache POI