You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nathan Coast <na...@codeczar.com> on 2005/11/12 17:18:08 UTC
WatchedResource not watched
Hi,
I have the following context.xml to configure a web application
<?xml version="1.0" encoding="UTF-8"?>
<Context reloadable="true"
crossContext="false"
docBase="D:\dev\projects11\maven-tomcat-plugin\tests\devContext\target\devContext">
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
The watched resource seems to be ignored. If I modify the web.xml
tomcat doesn't reload the webapp. If any other resources are modified
(classes or the context.xml) then tomcat behaves as expected and the
webapp is reloaded. I have confirmed this by enabling debug logging for
org.apache.catalina
Is this a bug or have I missed some configuration?
I am using tomcat-5.5.12 on win32
cheers
Nathan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: WatchedResource not watched
Posted by Len Popp <le...@gmail.com>.
A relative pathname will work for <WatchedResource>. Look at the
default entry in conf/context.xml:
<WatchedResource>WEB-INF/web.xml</WatchedResource>
which is exactly what you want. I just tested it, and editing web.xml
causes my app to be reloaded, whether the <WatchedResource> is in
conf/context.xml or in my app's META-INF/context.xml.
I'm running Tomcat 5.5.12 on Windows.
Are you editing the live web.xml directly, or are you using a
development environment like Eclipse WebTools that copies the files
from a source directory to a Tomcat directory? Maybe you're not
editing the same web.xml that Tomcat is looking at?
On 11/12/05, Nathan Coast <na...@codeczar.com> wrote:
> Hi,
>
> I have the following context.xml to configure a web application
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Context reloadable="true"
> crossContext="false"
> docBase="D:\dev\projects11\maven-tomcat-plugin\tests\devContext\target\devContext">
> <WatchedResource>WEB-INF/web.xml</WatchedResource>
> </Context>
>
> The watched resource seems to be ignored. If I modify the web.xml
> tomcat doesn't reload the webapp. If any other resources are modified
> (classes or the context.xml) then tomcat behaves as expected and the
> webapp is reloaded. I have confirmed this by enabling debug logging for
> org.apache.catalina
>
> Is this a bug or have I missed some configuration?
>
> I am using tomcat-5.5.12 on win32
>
> cheers
> Nathan
--
Len
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: WatchedResource not watched
Posted by "Darryl L. Miles" <da...@netbauds.net>.
Peter Menzel wrote:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <Context reloadable="true"
>> crossContext="false"
>> docBase="D:\dev\projects11\maven-tomcat-plugin\tests\devContext\target\devContext">
>>
>> <WatchedResource>WEB-INF/web.xml</WatchedResource>
>> </Context>
>>
>> The watched resource seems to be ignored. If I modify the web.xml
>> tomcat doesn't reload the webapp. If any other resources are
>> modified (classes or the context.xml) then tomcat behaves as expected
>> and the webapp is reloaded. I have confirmed this by enabling debug
>> logging for org.apache.catalina
>
> I have the following context.xml to configure a web application
>
> You have to use the full path D:\... in the WatchedReource Element,
> then it works.
That doesn't make much sense inside the <Context> and the description
implies the file has to be inside the web-app so relative paths would
have an obvious meaning.
--
Darryl L. Miles
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: WatchedResource not watched
Posted by Peter Menzel <pe...@imise.uni-leipzig.de>.
Nathan Coast schrieb:
> Hi,
>
> I have the following context.xml to configure a web application
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Context reloadable="true"
> crossContext="false"
> docBase="D:\dev\projects11\maven-tomcat-plugin\tests\devContext\target\devContext">
>
> <WatchedResource>WEB-INF/web.xml</WatchedResource>
> </Context>
>
> The watched resource seems to be ignored. If I modify the web.xml
> tomcat doesn't reload the webapp. If any other resources are modified
> (classes or the context.xml) then tomcat behaves as expected and the
> webapp is reloaded. I have confirmed this by enabling debug logging
> for org.apache.catalina
You have to use the full path D:\... in the WatchedReource Element, then
it works.
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org