tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pat...@rufflar.com
Subject Environment parameter overriding
Date Wed, 12 Jan 2011 09:37:58 GMT
Hi,

I've got a question regarding enviroment parameters:
Imagine a web application which web.xml defines an environment  
(env-entry) parameter (even empty) myParameter:

    <env-entry>
      <description>test</description>
      <env-entry-name>myParameter</env-entry-name>
      <env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value></env-entry-value>
    </env-entry>


I now like to override the value of this environment parameter using  
the server.xml of the server (or tomcat admin):
        <Context ....>
        <Environment
             description="test"
             name="myParameter"
             type="java.lang.String"
             value="test"/>
        </Context>


I'm having the problem that the application only "sees" the old value  
(which is defined in the web.xml). I am reading the value using JNDI:

new InitialContext().lookup("java:comp/env/myParameter");

I can reproduce this behaviour in tomcat 5.5 and tomcat 6.0.
Who can help me?

Thank you for your help and best regards,

Patric



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


Mime
View raw message