I need to change web.xml entry at runtime, i need to change LDAP testing IP to LDAP Production IP (matter of IP address change).now we are doing in odd way editing the web.xml before build is going to production. I need to change this entry while preparting the build by cruise control.
Even if you change the web.xml in runtime , then also your changes would not be picked up.When the application context is bought up , then the web.xml is read to java configuration beans (using digester) and those java objects are consulted for getting any configuratuion information further.
If the purpose of you question is not to restart the tomcat then you might use tomcat manager for bring down and up the particular application.I have not worked with any other servler container , but I am sure that other containers have this facility.
So the web app is running already in QA, and while it's running you use CruiseControl/Ant to produce a build that's ready for production? You could set the web app context to be reloaded automatically when its web.xml file is changed, but that too leads to the web app being reloaded, and anyway should not be done for production use.
I think it's a bit dangerous to change a running app from using a QA directory to using a production directory - how would a tester working with it know that, if there wasn't even some downtime? Can you tell us why a restart is undesirable?
Ping & DNS - updated with new look and Ping home screen widget
Sirish Kumar Gongal Reddy
Joined: Oct 25, 2004
Thanks for your valuble reply ! Fist of all my application is going to deploy on Websphere Application server (So no need to bother about restart)and the second issue is now our deployer is manuvally editing the .EAR file and chaging the web.xml entry(he don't like to do this job)some times he will forget to change LDAP IP in web.xml again it's problem my users are not able to login into application. now i got the solution i added one target in build.xml deployer needs to run this target once he got the confirmation from QA team that they are OK with this build. BUT I DON'T KNOW HOW MUCH FEASIBLE SOLUTION IT'S.