Want to reload web.xml without rebooting the server

In the production box, I want to change web.xml in the J2EE web application, but I do not want to restart the server or application, because this can create a problem for many online users. Suggest a way for changes to web.xml to be reflected in the web application.

+5
source share
3 answers

Just to get the idea out ... You could embed your web server (e.g. embedded tomcat ) and restart it programmatically based on some kind of event. However, there will be a period of time when the web server is down. Perhaps create a new inline tomcat instance using the new web.xml. Now you can redirect traffic to the new embedded web server when you turn off the old one.

+1
source

As far as I know, there is no way to get around restarting the server if you need to read it for the new web.xml, since the configuration file is read when the server starts up (i.e. think that it is processed only on servlet init ()).

If someone can indicate how we can deploy the configuration file, I would also like to know.

+2
source

, , 3.0.

0

All Articles