tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From che10234 <>
Subject environment entries web.xml localhost/context.xml confusion
Date Mon, 01 Feb 2010 15:19:29 GMT


I'm trying to figure out how to use/modify environment entries. I have a
Tomcat5.5 application and I don't understand why the env entries appear in
two different xml files, and with different values.

For example, I have this env-entry in my myapp/WEB-INF/web.xml file:

But I also have this entry in my Tomcat5.5/conf/Catalina/localhost/myapp.xml
<Environment description="" name="besjClefName" type="java.lang.String"

So I've been reading here:

I think this is the relevant section:
Only if a context file does not exist for the application in the
$CATALINA_HOME/conf/[enginename]/[hostname]/; in an individual file at
/META-INF/context.xml inside the application files. If the web application
is packaged as a WAR then /META-INF/context.xml will be copied to
$CATALINA_HOME/conf/[enginename]/[hostname]/ and renamed to match the
application's context path. Once this file exists, it will not be replaced
if a new WAR with a newer /META-INF/context.xml is placed in the host's

Is this saying that the first time a WAR is deployed, the /WEB-INF/web.xml
file is copied to localhost/myapp.xml file, and never again? And that the
web.xml file is *not* used anymore, so  localhost/myapp.xml is all that is

If so, can I remove all the <env-entry> entries from my web.xml file and
stick to using localhost/myapp.xml ?


View this message in context:
Sent from the Tomcat - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message