tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Multi-Level Context Paths
Date Mon, 17 Aug 2009 11:04:18 GMT
Andy Ee wrote:
> There is a new requirement to setup multi-level context path as in I need
> the URL to be  <http://localhost:8080/sg/server/test/>

Remove all the old files you no longer want:
$CATALINA_BASE/webapps/test.war
$CATALINA_BASE/conf/Catalina/localhost/test.xml
$CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml

Rename your WAR to sg#server#test.war

Place your renamed war in:
$CATALINA_BASE/webapps/

Any META-INF/context.xml will be extracted to:
$CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml

> <Context path="/test" debug="99" reloadable="true"

As stated in the docs for the context element, you should not specify
the path attribute in this case.

> java.lang.IllegalArgumentException: Document base
> /usr/local/apache-tomcat/webapps/sg#server#test does not exist or is not a
> readable directory

If Tomcat finds:
$CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml

It expects to find a matching war
$CATALINA_BASE/webapps/sg#server#test.war
or directory
$CATALINA_BASE/webapps/sg#server#test

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message