Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JSP Cache Problem?? 1

Status
Not open for further replies.

ZePAG

Programmer
Dec 31, 2000
21
0
0
BE
Hello everybody,

I have a problem using jsp for database access
Apache or tomcat seem to keep my pages in cache.

I often have to refresh my page to see the result of my request (insert or delete).

Is there a simple way to help them caching away?? :eek:)

See you on the www.

ZEPAG
 
I don't know if the code below could help - did not write it myself. But it seemed successful in our last JSP project...

<%
response.setDateHeader(&quot;Expires&quot;, 0);
response.setHeader(&quot;Pragma&quot;, &quot;no-cache&quot;);
if (request.getProtocol().equals(&quot;HTTP/1.1&quot;))
{
response.setHeader(&quot;Cache-Control&quot;, &quot;no-cache&quot;);
}
%>

Hope this helps
allow thyself to be the spark that lights the fire
haslo@haslo.ch - www.haslo.ch​
 
Thank you very much, I found this code this morning and it quite helped me out of this mess. This really was the answer to my problem!!

See You on the www

ZEPAG over ZENET
 
Hello everyone,

I have used that code.
It runs corrctly on my Jrun standalone server but not in Jrun filter that plugged to IIS Server on Win2K Server
Please help me !
Thank
DGTHANHAN
 
Maybe you already found the answer to your problems, but this may be a clue : look for cache systems at all the levels of the process.

It may be a cache problem from your IIS Server...

See You on the (French language but you can post the forum in english)

ZEPAG over ZENET
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top