tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: JSPs, Servlets, Tomcat, IE and evil page caching behavior
Date Tue, 02 May 2000 18:47:32 GMT wrote:

> Hi all,
> Thought I would pass this on in case it isn't obvious to anyone else.
> I have a JSP that produces data from a session bean, and uses a servlet to
> adjust the state of the bean for navigation purposes.  The servlet either
> returns an error page or returns the original JSP page.
> Some combination of IE and Tomcat is causing some interesting page cacheing
> behavior.  I had IE set to check for a new version of a page automatically.
> When my session timed out, the button (i.e. URL) that triggered the error
> message (generated from the servlet for the moment) produced a page that
> did not have the no-cache meta tag (<META HTTP-EQUIV="Pragma" CONTENT
> ="no-cache">).   Reloading the JSP that starts the sequence caused a new
> bean to be created, but the fact that that URL produced that piece of HTML
> was locked into the IE cache, and it either did not check for new content,
> or did and didn't seem to find it.
> When I clicked the button which directed the browswer to run my navigation
> servlet, I automatically got the error page, and the request was never sent
> to the servlet itself.  Since the error page says it can't find the session
> bean, you can imagine the results were a bit misleading...
> I now have expired IE's cache and set it to always check for new content.
> My example is working again. :)
> I don't know if this is a bug with IE, a bug with Tomcat, both or neither.

If you need a no-cache header in your error page, the servlet or JSP that
creates that page needs to include it.  The container (Tomcat in this case) has
no responsibility to manage these headers for you.

> John Robinson

Craig McClanahan

View raw message