I want to change the context of my deployed web application. Currently it is accessed by the url www.app.mysite.com/dashboard
But i want to change it t
This is a way to do it (step-by-step):
Put your expanded WAR in a directory outside of webapps. My TOMCAT_HOME is /home/nikos/apache-tomcat-6.0.37
and I placed my app in the folder myapp
under a new folder: $TOMCAT_HOME/webapps-manual
. I.e. the folder structure is:
$TOMCAT_HOME
|
+- ...
|
+- webapps (NOT HERE!!!)
|
+- webapps-manual
|
+- myapp
|
+- index.jsp
|
+- WEB-INF
|
+- web.xml (optional)
Edit TOMCAT_ROOT/conf/server.xml. Add the following
under the appropriate
element (there is probably only one):
DONE! Open http://localhost:8080/application/dashboard/index.jsp
and see content generated by $TOMCAT_HOME/webapps-manual/myapp/index.jsp
.
See relevant documentation here (see attributes path
and docBase
).