You could try the following:
1- make your printed data the
result of a get not a post. This way
netscape can re-get it without user
intervention
2 - add an extra parameter
to each request make the value unique (at least over a session) and
ignore it in your servlet. Netscape
doesnt know that you are ignoring it
and so won't use a cached version.
t.
Mark R Russell <[EMAIL PROTECTED]> wrote:
__________
>I am the Tech Lead on a team of four programmers building a servlet system for
>my company. I am having a problem with print.
>
>When we serve up our pages we use the following code to build the headers:
> String expiration = getExpiration();
> System.out.println("Setting page expiration to " + expiration);
> res.setHeader("Expires", expiration);
> res.setHeader("Cache-control", "no-store");
> res.setStatus(HttpServletResponse.SC_OK);
> res.setContentType("text/html");
>
>By default the expiration is set to 0. I'm not sure what the values of
>expiration mean. Is it seconds, minutes, or hours? The information that is
>stored on the pages is considered confidential so we set the cache to no-store
>to stop the browser and proxy servlets from caching the pages.
>
>Here is where the problem comes in. at the end of the servlet there are
>disclosures and forms that the user has to print out. I over ride the value of
>expiration with 5. (this is an arbitrary number I came up with based on my
>above question about what this value means) In IE4.x everything prints fine. In
>NS4.x I get the following error sometimes (it is very unpredictable whether I
>will get the error or a printed page):
>
>Data Missing
>This document resulted from a POST operation and has expired from cache. If you
>wish you can repost the form data to recreate the document by pressing the
>reload button.
>
>I have tried getting rid of the expires but then the second time the user comes
>through the application it displays to old page (I assume from cache) even
>though I am telling it not to cache the pages. You have to manually reload the
>page to get the correct data.
>
>I have tried several different solutions and different values for the expires
>none have worked. Any help would be appreciated.
>
>Our environment:
>Development: NT 4.0 NES 3.5.1 Jrun 2.2 and VisualAge Java for Development.
>QA Sun Solaris (I don't know the version) NES 3.5.1 JRunPro 2.2
>
>Mark Russell
>Systems Architect
>PNC Bank
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
URL http://www.westhawk.co.uk/
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html