Hi Mark,

Before I prepare my .war file, there is an existing META-INF/context.xml and
the content is,

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

    <!--Resource name="jdbc/moneysend" auth="Container"
type="javax.sql.DataSource"
              maxActive="100" maxIdle="30" maxWait="10000"
              driverClassName="oracle.jdbc.driver.OracleDriver"
              username="MS3_STL" password="password"
              url="jdbc:oracle:thin:@192.168.0.37:1521:MS3"
              defaultAutoCommit="true" removeAbandoned="true"
              removeAbandonedTimeout="60" logAbandoned="true"/-->
</Context>


Should I remove the path parameter and prepare the war file again?

With the path specified as /test, I am worried it will conflict how I setup
Multi-Level path.

Best Regards,
Andy Ee
 
 

-----Original Message-----
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Monday, August 17, 2009 7:04 PM
To: Tomcat Users List
Subject: Re: Multi-Level Context Paths

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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

Reply via email to