how reload the servlet without restart the tomcat6 server

M.M. picture M.M. · Aug 3, 2011 · Viewed 17.3k times · Source

If I have multiple Host definition on my $TOMCAT_HOME/conf/server.xml How can I reload the servlet without restart the tomcat6 server? What are the parameters for use Tomcat like with multiple host?

unpackWARs autoDeploy liveDeploy deployXML etc.

---new text added-- I don't like restart manually the tomcat manager, because I have differents Virtual Host configured. If a user uploaded a new servlet version, I prefer that tomcat automatically reload the new version WITHOUT the sysadmin intervention in order to restart manually the complete tomcat server.

A sample of context definition inside the server.xml is like this:

<Context path="" docBase="/webapps/client.com/servlets" reloadable="true" privileged="true"/>

But, when this client.com has uploaded a new servlet, the tomcat doesn't refresh a new version in many days, and he needs call me in order to restart the tomcat server. This intervention affects the normal operation to other users in the same server.

Answer

Bozho picture Bozho · Aug 3, 2011

Check this thread (in short - set <Context reloadable="true" />) Also, I think running tomcat in debug mode should allow that. (If you don't run it through an IDE, add -Xdebug