tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parsons Technical Services" <parsonstechni...@earthlink.net>
Subject Re: Tomcat 5.5.4 - Using a Context.xml File With a Path Different Than The File Name
Date Tue, 11 Jan 2005 16:37:26 GMT
If you don't use autodeploy, you can turn this off and use a context with 
"yourchoice" path like in 5.0 . Otherwise Tomcat will deploy the app twice, 
once using your xml and once using the default xml.

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html#Automatic%20Application%20Deployment

Someone slap me if I am wrong here.

Doug

----- Original Message ----- 
From: "Matt Mejaski" <mmejaski@cirilab.com>
To: <tomcat-user@jakarta.apache.org>
Sent: Tuesday, January 11, 2005 10:30 AM
Subject: Tomcat 5.5.4 - Using a Context.xml File With a Path Different Than 
The File Name


> Hi all,
>
> Using Tomcat 5.0.30, I had two Contexts for webapps set up as follows.
>
> Context 1, loaded from file: <Tomcat 
> Home>/conf/Catalina/localhost/myapp.xml
> :
> <Context path="/myapp" docBase="myapp" cookies="true" debug="0"
> reloadable="false" />
>
> Context 2, loaded from file: <Tomcat
> Home>/conf/Catalina/localhost/myappsavedfiles.xml :
> <Context path="/myapp/savedfiles" docBase="C:\MyApp\Saved" />
>
> Notice that the path of Context 2 is a subdirectory of Context 1.  Also,
> notice that the docBase's are completely different directories (i.e. the
> docBase for context 2 isn't actually a subdirectory of the docBase of
> Context 1)
>
> The reason I do this is because I want the data in context 1 (my web app) 
> to
> be upgradeable (and thus be blown away at will), but the data in my 
> Context
> 2 (which isn't even in the webapps directory) to be persistent.
>
> Now, I want to upgrade to Tomcat 5.5.4.  However, it seems that I can no
> longer do this in Tomcat 5.5 (according to the description of the 'path'
> attribute described here:
> http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html) 
> unless
> I do one of the following:
>
> 1) Put the Context tag for Context 2 directly in my server.xml, which is 
> no
> longer recommended
> 2) Somehow name my Context 2 file with a slash in it -- which Windows 
> isn't
> going to let me do! =)
> 3) Rename my Context 2 file to be a different path altogether, which means
> that I have to change by Context 1 code that refers to files in Context 2.
>
> Does anyone have any suggestions on how I can keep both of these contexts
> without changing my code in Context 1 that refers to the path
> /myapp/savedfiles, and hopefully without modifying my Tomcat server.xml?
>
>
> I appreciate any suggestions you may have.
>
> Thanks,
> Matt Mejaski
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> 



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


Mime
View raw message