tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@grf.bg.ac.yu
Subject Re: How to reload web app from java program?
Date Sun, 04 May 2008 20:09:27 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

Thanks Mark,
I also came to this idea but I wanted to check if there is a cleaner way
(using some API) to do this. Concerning my specific web app, there is no
problem related to packing/unpacking and even the delay between touching
web.xml and reloading is not important (if that happens at least after few
minutes).

Milos

>
> ---------------------------------------------------------------------
> 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
>
>



---------------------------------------------------------------------
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