jQuery in Action, 2nd edition*
The moose likes Servlets and the fly likes Caching Problem in JSP ... Please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Caching Problem in JSP ... Please help" Watch "Caching Problem in JSP ... Please help" New topic
Author

Caching Problem in JSP ... Please help

santosh vashist
Greenhorn

Joined: May 14, 2001
Posts: 25
Hai All,
I am working on a JSP Project and i am facing severe problems of JSP caching , any change made to the JSP page is not reflected immediately even after refresh, as a result the J2EE server has to be restarted. Can any body tell me please how to control this caching problem programatically i.e. clearing the cache ..waiting for reply.....
thanks in advance
santosh
sanj singh
Ranch Hand

Joined: Jun 30, 2001
Posts: 129
try this
response.setHeader("Pragma","no-cache");
if(request.getProtocol().equals("HTTP/1.1")
response.setHeader("Cache-Control",no-cache");
hope this helps
sanj
santosh vashist
Greenhorn

Joined: May 14, 2001
Posts: 25
Originally posted by sanj singh:
try this
response.setHeader("Pragma","no-cache");
if(request.getProtocol().equals("HTTP/1.1")
response.setHeader("Cache-Control",no-cache");
hope this helps
sanj


Hello Sanj
thank you for your early reply , i implemented the same and its working fine but one more problem is its not working in Netscape Navigator. Yar can you please tell me what i should i do in netscape.Hoping for early reply...

regards,
santosh
 
Don't get me started about those stupid light bulbs.
 
subject: Caching Problem in JSP ... Please help
 
Similar Threads
remove the data from cache
Problem with Hibernate Cache
How to refresh a jsp page
need caching
How to refresh a jsp page