Pid, Thanks for the reply.
You misunderstood the point maybe because my poor English. In chronological order this happens: 1. The war contains the META-INF/context.xml. 2. On deployment (copy to webapps folder) META-INF/context.xml gets copied to conf/Catalina/localhost/warname.xml 3. My war finds the settings, but these are the defaults "hardcoded" into my war/META-INF/context.xml. 4. Using Tomcat Administrator application the admin changes environment settings defined in conf/Catalina/localhost/warname.xml (which was extracted from the war). 5. My webapp restarts and finds the new settings a works perfect. 6. I build a new version of the war and that gets copyed to the tomcat/webapps directory. 7. The server uses autodeploy: the new .war get expanded and the web app restarts. At this point I think autodeploy first undeploys the app and deletes the conf/Catalina/localhost/warname.xml. So the changes done by the admin in the setttings got lost. 8. The admin has to reedit the configuration (JNDI envoronment settings) in conf/Catalina/localhost/warname.xml. This last step is what I want to get rid of. The only way was to put resource links to the war/META-INF/context.xml that link to GlobalResources. GlobalResources doesn't get deleted at webapp redeploy :) and no changes are required in conf/Catalina/localhost/warname.xml because it is just a link. But now I have to deploy the same unmodified war many times to the same tomcat so I have to use different settings at each webapp. Thanks, Balázs On 2007-09-12 Wednesday 12:11, Pid wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > > > Is there a way to prevent Tomcat to delete the webappname.xml from > > conf/Catalina/localhost at every redeployment? > > > > I have application specific environment settings there, but at redeploy > > it gets deleted and I lose the settings. I have tried with and > > without context.xml in META-INF in my war. It gets copied to > > the conf/Catalina/localhost but contains the default settings. > > Put your JNDI settings into WAR in META-INF/context.xml, if the settings > are not discovered during deployment you'll need to check the following: > > Does the WAR actually include the directory and file correctly? > > Have the Host settings prevented the Context from being deployed correctly? > > p > > > I could use jndi with putting a resource link into the webapp's > > META-INF/context.xml and defined the setting in GlobalResource. But now I > > have to deploy the same webapp.war more times (with different name and > > settings) to the same Tomcat. > > > > I use autodeploy (copy the .war to the webapps). > > > > Please help! > > > > Thanks, > > Balázs > > > > --------------------------------------------------------------------- > > To start a new topic, e-mail: users@tomcat.apache.org > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]