Hello,
I'm trying to change the default application of Tomcat 6 webserver to other application than "ROOT" (inside webapps folder).
I Tried googling around but couldn't find anything that works...
Any help is greatly appreciated.
Jacques
Hello,
I'm trying to change the default application of Tomcat 6 webserver to other application than "ROOT" (inside webapps folder).
I Tried googling around but couldn't find anything that works...
Any help is greatly appreciated.
Jacques
According to the Apache Tomcat docs, you can change the application by creating a ROOT.xml file. See this for more info:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
"The default web application may be defined by using a file called ROOT.xml."
I'll look at my docs; there's a way of specifying a configuration to change the path of the root web application away from ROOT (or ROOT.war), but it seems to have changed between Tomcat 5 and 6.
Found this:
http://www.nabble.com/Re:-Tomcat-6-and-ROOT-application...-td20017401.html
So, it seems that changing the root path (in ROOT.xml) is possible, but a bit broken -- you need to move your WAR outside of the auto-deployment directory. Mind if I ask why just renaming your file to ROOT.war isn't a workable solution?
Jon, Don,
Thank you very much. I tried adding ROOT.xml to my {CATALINA_HOME}/conf/Catalina/localhost. I has the content
where webapps/RedWeb is the location of my root application, but it's still not working.
Any thought on this? Is this correct? Thank you
Jacques
Sorry there's typo on the last message. My ROOT.xml has this content
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="C:/Program Files/Apache Software Foundation/Tomcat 6.0.18 manual/webapps/RedWeb.war">
</Context>
RedWeb.war is the war file for my targeted web app. But this still not working.
Any thoughts on this? Thank you very much,
Jacques
You can do this in a slightly hack-y way by:
hi
you should change your server.xml file as below:
from .... to
<Host name="localhost" appBase="E:\struts-ITRCbook\myStrutsbook"
....
regards.