Hi,

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:
<env-entry>
  <env-entry-name>besjClefName</env-entry-name>
  <env-entry-value>/cgi/besjclef.exe</env-entry-value>
  <env-entry-type>java.lang.String</env-entry-type>
</env-entry>

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

So I've been reading here:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

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
appBase.

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
needed?

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

Thanks,
Chris




-- 
View this message in context: 
http://old.nabble.com/environment-entries-web.xml-localhost-context.xml-confusion-tp27405876p27405876.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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

Reply via email to