You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by steve sim <st...@hotmail.com> on 2008/10/21 13:09:06 UTC

Disable Tomcat from caching

Hi everyone,
 
I would appreciate if someone could help me in this problem. 
Disable Tomcat from caching my xml file.
 
I have a JSP page (Display.jsp) that retrieves a xml file an display the content (using AJAX). 
Then i clicked the page and goes to a servlet where I changed the xml content (Element) and redirect back to 
Display.jsp to showthe changes.
However, the page doesnt reflect the changes (suspect it still use the old xml file)
 
Why I suspect it uses Cache
- I have viewed the actual xml file in the directory, the content has changed.
- I try to create an identical Display.jsp (Display2.jsp) and make my servlet to redirect to the Display2.jsp instead. 
Display2.jsp would retrieve the xml and display it. But the changes still doesnt show. It still use the old xml file.
 
 
I tried various way and check on the net, but still couldn't find any solution. 
 
Thank you .
 
Regards,
Steve
_________________________________________________________________
Manage multiple email accounts with Windows Live Mail effortlessly.
http://www.get.live.com/wl/all

Re: Disable Tomcat from caching

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
hi Steve,

 >I have a JSP page (Display.jsp) that retrieves a xml file

how do you achieve this? depending on how you load the XML, will 
determine how we troubleshoot why it is cached

if it is statically included in the JSP, then it would be compiled into 
the class, take a look at

Display_jsp.java in the work directory

Filip

ISteve wrote:
> Thank Filip.
>
> I added cachingAllowed ="false" to context.xml. but it still doesn't work.
> the xml file is not the latest.
>
> I added in TC_Home/conf/context.xml
> <Context cachingAllowed="false">
>
>     <!-- Default set of monitored resources -->
>     <WatchedResource>WEB-INF/web.xml</WatchedResource>
> 	
>  
> </Context>
>
> and 
>
>  add it in my application_folder/META-INF/context.xml
> <Context path="/syo" cachingAllowed="false" /> 
>
> Is there any mistake in my configuration or are there other way to resolve
> the problem
>
> Thanks
>
> Regards,
> Steve
>
>
>
> Filip Hanik - Dev Lists wrote:
>   
>> look for "|cachingAllowed" in
>>
>> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
>>
>> you can put this in TC_HOME/conf/context.xml
>>
>> Filip
>> |
>> steve sim wrote:
>>     
>>> Hi everyone,
>>>  
>>> I would appreciate if someone could help me in this problem. 
>>> Disable Tomcat from caching my xml file.
>>>  
>>> I have a JSP page (Display.jsp) that retrieves a xml file an display the
>>> content (using AJAX). 
>>> Then i clicked the page and goes to a servlet where I changed the xml
>>> content (Element) and redirect back to 
>>> Display.jsp to showthe changes.
>>> However, the page doesnt reflect the changes (suspect it still use the
>>> old xml file)
>>>  
>>> Why I suspect it uses Cache
>>> - I have viewed the actual xml file in the directory, the content has
>>> changed.
>>> - I try to create an identical Display.jsp (Display2.jsp) and make my
>>> servlet to redirect to the Display2.jsp instead. 
>>> Display2.jsp would retrieve the xml and display it. But the changes still
>>> doesnt show. It still use the old xml file.
>>>  
>>>  
>>> I tried various way and check on the net, but still couldn't find any
>>> solution. 
>>>  
>>> Thank you .
>>>  
>>> Regards,
>>> Steve
>>> _________________________________________________________________
>>> Manage multiple email accounts with Windows Live Mail effortlessly.
>>> http://www.get.live.com/wl/all
>>>   
>>>       
>> ---------------------------------------------------------------------
>> 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: Disable Tomcat from caching

Posted by ISteve <st...@hotmail.com>.
Thank Filip.

I added cachingAllowed ="false" to context.xml. but it still doesn't work.
the xml file is not the latest.

I added in TC_Home/conf/context.xml
<Context cachingAllowed="false">

    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
	
 
</Context>

and 

 add it in my application_folder/META-INF/context.xml
<Context path="/syo" cachingAllowed="false" /> 

Is there any mistake in my configuration or are there other way to resolve
the problem

Thanks

Regards,
Steve



Filip Hanik - Dev Lists wrote:
> 
> look for "|cachingAllowed" in
> 
> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
> 
> you can put this in TC_HOME/conf/context.xml
> 
> Filip
> |
> steve sim wrote:
>> Hi everyone,
>>  
>> I would appreciate if someone could help me in this problem. 
>> Disable Tomcat from caching my xml file.
>>  
>> I have a JSP page (Display.jsp) that retrieves a xml file an display the
>> content (using AJAX). 
>> Then i clicked the page and goes to a servlet where I changed the xml
>> content (Element) and redirect back to 
>> Display.jsp to showthe changes.
>> However, the page doesnt reflect the changes (suspect it still use the
>> old xml file)
>>  
>> Why I suspect it uses Cache
>> - I have viewed the actual xml file in the directory, the content has
>> changed.
>> - I try to create an identical Display.jsp (Display2.jsp) and make my
>> servlet to redirect to the Display2.jsp instead. 
>> Display2.jsp would retrieve the xml and display it. But the changes still
>> doesnt show. It still use the old xml file.
>>  
>>  
>> I tried various way and check on the net, but still couldn't find any
>> solution. 
>>  
>> Thank you .
>>  
>> Regards,
>> Steve
>> _________________________________________________________________
>> Manage multiple email accounts with Windows Live Mail effortlessly.
>> http://www.get.live.com/wl/all
>>   
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Disable-Tomcat-from-caching-tp20087995p20106347.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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: Disable Tomcat from caching

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
look for "|cachingAllowed" in

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

you can put this in TC_HOME/conf/context.xml

Filip
|
steve sim wrote:
> Hi everyone,
>  
> I would appreciate if someone could help me in this problem. 
> Disable Tomcat from caching my xml file.
>  
> I have a JSP page (Display.jsp) that retrieves a xml file an display the content (using AJAX). 
> Then i clicked the page and goes to a servlet where I changed the xml content (Element) and redirect back to 
> Display.jsp to showthe changes.
> However, the page doesnt reflect the changes (suspect it still use the old xml file)
>  
> Why I suspect it uses Cache
> - I have viewed the actual xml file in the directory, the content has changed.
> - I try to create an identical Display.jsp (Display2.jsp) and make my servlet to redirect to the Display2.jsp instead. 
> Display2.jsp would retrieve the xml and display it. But the changes still doesnt show. It still use the old xml file.
>  
>  
> I tried various way and check on the net, but still couldn't find any solution. 
>  
> Thank you .
>  
> Regards,
> Steve
> _________________________________________________________________
> Manage multiple email accounts with Windows Live Mail effortlessly.
> http://www.get.live.com/wl/all
>   


---------------------------------------------------------------------
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: Disable Tomcat from caching

Posted by Epithemeus <ep...@googlemail.com>.
Hi everyone,

I am facing the same problem as Steve had mentioned earlier. I am using
Tomcat 6.0 and have tried including cachingAllowed="false" in
$CATALINA_HOME/conf/context.xml. This does not seem to work.

I cannot locate any folder for application cache in
/work/Catalina/localhost/. 

It would be very helpful to get some leads on why this may not be working.

Thanks.


Tina Hua wrote:
> 
> Steve, 
> 
> Check out this link.  I implemented the cachingAllowed="false"> in the
> .xml file and the .xml kept displaying the same old content itself.  I
> removed the "application cache" folder in the
> usr/jakarta-tomcat-5.0.27/work/Catalina/localhost/ and it worked like a
> charm!
> 
> Good luck! 
> http://marc.info/?l=tomcat-user&m=117026873715444&w=2
> -------------------------------------------
> 
> 

-- 
View this message in context: http://www.nabble.com/Disable-Tomcat-from-caching-tp20087995p24867227.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Disable Tomcat from caching

Posted by Tina Hua <th...@csd.ca.gov>.
Steve, 

Check out this link.  I implemented the cachingAllowed="false"> in the .xml
file and the .xml kept displaying the same old content itself.  I removed
the "application cache" folder in the
usr/jakarta-tomcat-5.0.27/work/Catalina/localhost/ and it worked like a
charm!

Good luck! 
http://marc.info/?l=tomcat-user&m=117026873715444&w=2
-------------------------------------------

-- 
View this message in context: http://www.nabble.com/Disable-Tomcat-from-caching-tp20087995p21181618.html
Sent from the Tomcat - User mailing list archive at Nabble.com.