tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: How to reload web app from java program?
Date Sun, 04 May 2008 15:23:08 GMT
David Smith wrote:
> But to use the api that the manager app uses, your webapp needs to have 
> privileged="true" set in the context first.  Second, look at the source 
> for the manager webapp for exactly what it does.  And lastly, notice the 
> manager webapp can't reload itself -- I suspect there's a reason for that. 
> I'm not sure a webapp being reloaded can request the manager reload it 
> as the manager does it during the request and doesn't send a response 
> until the reload is complete.  If you have code that can't unload 
> because it's actively being executed, it might block the reload.

If you have autoDeploy set to true on the host, one quick and dirty hack 
around this would be to touch the web.xml file. It has the advantage of 
de-coupling the reload of the webapp from the request you use to trigger 
it. On the down side, it requires you to be using unpacked web apps and the 
reload won't be instant.

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message