Hi,

I have a problem with changing the default ROOT context to something else
(myroot).


#### Specs ####
-Windows Vista
-Tomcat 6.0.14 (latest)


#### Problem ####
I want the following directory to be the ROOT context:
$CATALINA_HOME/webapps/myroot

So that http://localhost/test.txt is directly mapped to
$CATALINA_HOME/webapps/myroot/test.txt

And I do not want any other directory than myroot to exist in
$CATALINA_HOME/webapps


#### What I have tried ####
Modifing the host-tag in server.xml to:

<Host name="localhost"  appBase="webapps"
  <Context docBase="myroot" path=""></Context>
</Host>

, solves the problem. But the Tomcat 6 docs[1] specify that it is NOT
recommended to put context-tags in server.xml. So I want to put the
context-tags elsewhere.

I tried to put the context-tag (above) in the file
$CATALINA_HOME/conf/catalina/localhost/ROOT.xml to make myroot the default
web application (as is told in [1]). But then I get the error:

16-sep-2007 15:31:34 org.apache.catalina.startup.HostConfig deployDescriptor
WARNING: A docBase D:\Apache Software
Foundation\apache-tomcat-6.0.14\webapps\myroot inside the host appBase has
been specified, and will be ignored
16-sep-2007 15:31:34 org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base D:\Apache Software
Foundation\apache-tomcat-6.0.14\webapps\ROOT does not exist or is not a
readable directory

In the webbrowser, http://localhost:8080/test.txt won't work, but
http://localhost:8080/myroot/test.txt will...

Somehow it keeps looking for the ROOT dir.

How can I change ROOT to myroot, and let http://localhost:8080/test.txt be
the url?



#### Resources ####
[1] http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
-- 
View this message in context: 
http://www.nabble.com/Changing-ROOT-context-tf4461140.html#a12721557
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to