In a previous life, we actually wrote an installer, of which a good part of
the effort involved merging the existing (old) context file and the new one,
just to preserve settings customized by the customer.  (It worked similarly
on the web.xml)

I too think it would be a nice feature if certain settings could be
preserved.  The <Environment...> and <Resource...> elements could provide a
default value, or an override flag (or force) which keeps / overrides any
old value(s) found.  Deleting a no-longer-used value becomes problematic
(you can just leave it of course, but that might confuse the end user.)

Tim

-----Original Message-----
From: Aust, Christian [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 23, 2006 2:58 AM
To: Tomcat-Users (E-Mail)
Subject: RE: Redeploying war file kills context xml

Hi Jim,

thanks for your reply. Defining the context outside the war file solves some
issues, since we deploy the very same application to different server
setups. JNDI environment values are different on test and production
machines, and those are defined in the context.

Adding them to the war file under META-INF/context.xml would mean to produce
different war files for each deployment server. That's why it's annoying
that tomcat keeps deleting those manually edited files from it's
configuration. Kind regards,

-  Christian

> -----Original Message-----
> From: Jim Freeby [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 22, 2006 7:50 PM
> To: Tomcat Users List
> Subject: RE: Redeploying war file kills context xml
> 
> 
> I am using Tomcat 5.5.15 w/ jdk1.5.0_06
> 
> In my webapp, I have created a context file in 
> ${app.name}/META-INF/context.xml.
> 
> If Tomcat is running and I drop a new war file in the webapps 
> dir, Tomcat reads ${app.name}/META-INF/context.xml and 
> creates a new 
> ${catalina.home}/conf/Catlina/${host.name}/${app.name}.xml  
> This seems like the correct way to do things (not a 
> workaround), because your context is defined and deployed 
> with your webapp.  
> 
> From the Tomcat documentation 
> (http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html):
> "A Context is what Tomcat calls a web application."
> 
> You could also define your context in server.xml, but this is 
> discouraged in the Tomcat docs. 

________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service.
________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to