tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Ee" <and...@sysatwork.com>
Subject RE: Multi-Level Context Paths
Date Mon, 17 Aug 2009 18:10:40 GMT
Hi David,

I will try to remove that path attribute from the Context element.

Other 2 questions:
1) Can I exclude the META-INF/context.xml file in the war file? This
context.xml that will be copied to conf/Catalina/localhost after deployment,
so that I can be sure this is not the problem to the setup of multi-level
context path?

2) When we say renaming test.war into sg#server#test to achieve multi-level
context path (http://localhost:8080/sg/server/test), are we talking about
using the rename command in Solaris (mv test.war sg#server#test.war)?
Or do I have to re-tar the project files into sg#server#test.war again?


Thank you. 

Best Regards,
Andy Ee
 
 

-----Original Message-----
From: David Smith [mailto:dns4@cornell.edu] 
Sent: Monday, August 17, 2009 8:37 PM
To: Tomcat Users List
Subject: Re: Multi-Level Context Paths

Drop the path attribute from your <Context ... >...</Context>
definition.  The path should ideally be driven by the name of the war
file, not explicitly called out in config unless your webapp is outside
the webapps directory.

--David

Andy Ee wrote:
> 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:markt@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



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


Mime
View raw message