In production box i want to change the web.xml in a J2EE web application but i don't want to restart the server or the application because this can create problem for lot of online users. Suggest a way so that my web.xml changes should reflect in the web app.
As far as I know, there's no way of getting around restarting the server if you need it to read the new web.xml, because the config file is read when the server starts (ie. think about it being processed only on servlet init()).
If someone can point out how we can hot deploy config file, I would like to know too though.
Just to throw an idea out... You could embed your webserver (like embedded tomcat) and programmaticly restart it based upon some event. However, there will be a period of time where the webserver is down. Maybe create a new embedded tomcat instance using your new web.xml. You can now direct traffic to the new embedded webserver while you shutdown the old one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With