You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Niklas Frank <ni...@inode.at> on 2007/09/27 17:48:28 UTC
Automatic Reload for Web Applications in User Directories
Dear all,
I have been trying for quite a while to enable webapplications in user
directories (accessible via ~username) to be automatically reloaded. I am
not sure if it is even possible. Maybe someone of you knows an answer. Any
help is very much appreciated.
Here is my setup:
I am using Tomcat 6.0 (server information included below) with Ubuntu
(feisty). In my server.xml file i have a single host entry for localhost
to which I added a listener for the user directories:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Listener className="org.apache.catalina.startup.UserConfig"
directoryName="public-webapps"
userClass="org.apache.catalina.startup.PasswdUserDatabase" />
</Host>
With this configuration the user homes are accessible. But if I make any
changes, the application is not reloaded. (Applications under
$CATALINA_HOME/webapps, however, _are_ reloaded automatically!)
My context.xml file looks like this:
<Context reloadable="true">
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
According to the Tomcat Documentations, the user webapps should inherit
all settings of the DefaultContext. I tried adding a DefaultContext entry
to the server.xml file (even though I thought that the default context
should be sufficiently set up by context.xml):
<DefaultContext reloadable="true"/>
Unfortunately this did not work either. The web applications in the user
directories do not get reloaded. I would be very happy if somebody could
tell how I could get this working (a work-around will do too!). Any
suggestions are dearly appreciated! Thanks & Kind regards,
Niklas
PS
Here is my server information:
Tomcat Version Apache Tomcat/6.0-snapshot
JVM Version 1.5.0_12-b04
JVM Vendor Sun Microsystems Inc.
OS Name Linux
OS Version 2.6.20-16-server
OS Architecture i386
---------------------------------------------------------------------
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
Re: Automatic Reload for Web Applications in User Directories
Posted by Mark Thomas <ma...@apache.org>.
Niklas Frank wrote:
> Hi Chuck, hi All,
>
>> Are you sure the timestamp on the WEB-INF/web.xml file of the updated
>> webapp really changes?
> Yes, positive. To check I made changes to the file. If I do the same for a
> web-app in $CATALINA_HOME/webapps the app gets automatically reloaded.
This won't work. o.a.c.startup.UserConfig doesn't use
o.a.c.startup.HostConfig to deploy the user contexts so they never get
checked for re-loading.
Some thought needs to be applied to refactoring UserConfig. Ideally,
HostConfig should be completely de-coupled from UserConfig. Please
create a bugzilla entry for this.
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
RE: Automatic Reload for Web Applications in User Directories
Posted by Niklas Frank <ni...@inode.at>.
Hi Chuck, hi All,
> Are you sure the timestamp on the WEB-INF/web.xml file of the updated
> webapp really changes?
Yes, positive. To check I made changes to the file. If I do the same for a
web-app in $CATALINA_HOME/webapps the app gets automatically reloaded.
in catalina.out this leads to:
Sep 27, 2007 6:43:39 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Reloading context [/examples]
but no reload or output is generated when I modify web.xml in the user dir.
> The <DefaultContext> element was last supported in 5.0, so it certainly
> won't work in Tomcat 6.
ok, i thought it was deprecated, but just wanted to try anyway. thanks for
confirming.
do you have any ideas how i could go about this?
kind regards
dominik
>> From: Niklas Frank [mailto:niklas_frank@inode.at]
>> Subject: Automatic Reload for Web Applications in User Directories
>>
>> My context.xml file looks like this:
>> <WatchedResource>WEB-INF/web.xml</WatchedResource>
>
> Are you sure the timestamp on the WEB-INF/web.xml file of the updated
> webapp really changes?
>
>> I tried adding a DefaultContext entry
>> to the server.xml file
>
> The <DefaultContext> element was last supported in 5.0, so it certainly
> won't work in Tomcat 6.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
>
> --------------------------------------------------------------------- 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
RE: Automatic Reload for Web Applications in User Directories
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Niklas Frank [mailto:niklas_frank@inode.at]
> Subject: Automatic Reload for Web Applications in User Directories
>
> My context.xml file looks like this:
> <WatchedResource>WEB-INF/web.xml</WatchedResource>
Are you sure the timestamp on the WEB-INF/web.xml file of the updated
webapp really changes?
> I tried adding a DefaultContext entry
> to the server.xml file
The <DefaultContext> element was last supported in 5.0, so it certainly
won't work in Tomcat 6.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.
---------------------------------------------------------------------
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