On Tue, 24 Aug 1999, Mike Fontenot wrote:

> Milt's answer is correct, here's some code. Place this code between the
> <HEAD></HEAD> tags in your JSP page.
>
> <%
> out.println("<META HTTP-EQUIV=\"expires\" CONTENT=\"1996-01-01\">");
> out.println("<META HTTP-EQUIV=\"Cache-Control\" CONTENT=\"no-cache\">");
> out.println("<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">");
> %>

I don't think the above will work, for the Expires header at least.
Supposedly it has to be in a specific format, including using GMT.
Here's what I use:

      resp.setHeader("Expires", "Mon, 01 Jan 1990 06:00:01 GMT");
      resp.setHeader("Cache-Control", "no-cache");
      resp.setHeader("Pragma", "no-cache");


> BTW, using the servlet api methods to do this did not seem to work
> for me (using Jrun) so I resorted to the out.println .
[ ... ]

I haven't done extensive testing, but the above use of the API methods
seem to work fine for me.

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
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

Reply via email to