0 Replies Latest reply on May 5, 2011 7:56 AM by Cyril Chéné

    Change env-entry-value at runtim

    Cyril Chéné Newbie



      I would like a part of my webapp configuration to be server-dependant, meaning I want to have a different value when deploying in my jboss dev instance and in the production environment. And I would like not to repackage the development WAR before deploying in production env, nor would I like to restart the server to take some config file into account.


      I guessed that JNDI could help (but I may be wrong, any comment will be much appreciated...)


      But there is no way I can found to edit at runtime the env-entry that I've added to my web.xml file.


      I was able to do this with Tomcat using the "admin tool" (I could see the set of env-entries of my web.xml in the "Resources / Environment entries" section).


      Here is my web.xml file:

      <web-app id="JndiVarUse">

          <!-- some servlet and servlet mapping definitions -->



              <env-entry-value>Message from web.xml</env-entry-value>





      By the way, here is another question: how come I can't see the env-entry in the JMX JNDIView with JBoss 5.1 whereas it could be seen with JBoss 4.2.3 ?


      Thanks for the help !