You may also want to try
<META http-equiv="Expires" content="0">
However, I don't really trust META tags. Browser implementations
of META tags are not always reliable. Write to the response headers
directly. I embed the following at the top of every jsp page.
<%
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);
%>
If you're not using jsp, you could also put this in your servlet code.
However, during the development of my latest web app, I had similar cache
problems while running under Tomcat 3.2.3 standalone. In my production environment
however, I run Apache 1.3.23 with mod_jk to connect to Tomcat 4.0.3 and my cache
problems went away. I'm not sure if it's a Tomcat version issue or if Tomcat's
standalone HTTP connector just doesn't handle the headers correctly.
Good luck,
Jeff
----- Original Message -----
From: "somya_iyer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 26, 2002 3:58 AM
Subject: Problem with cache clearing in Tomcat
> Hi,
> I'm using apache tomcat 4.0 and my application has been developed using only servlets
and an oracle database. After a user logs out, when the next one logs in, the
application
continues with the old pages belonging to the previous user. The old session has been
invalidated and the new session values are being correctly taken by the system. On
refreshing the screen, the correct pages come up. I have tried setting the header
information as follows:
> <meta http-equiv="pragma" content="no-cache">
> <meta http-equiv="cache-control" content="no-store">
> but this doesn't help either.
> Can anyone help out?
> Thanks,
> Somya
>
> --
> To unsubscribe: <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>