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

Popular posts from this blog

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

Upload file on Google cloud storage using Java servlet on google app engine

Create Nested table inside a table on a pdf document using iText