FileDocCategorySizeDatePackage
NoCacheTag.javaAPI DocExample825Thu Jun 28 16:14:16 BST 2001com.ora.jsp.tags.generic

NoCacheTag

public class NoCacheTag extends TagSupport
This class is a custom action for setting response headers that prevent the page from being cached by a browser or proxy server.
author
Hans Bergsten, Gefion software
version
1.0

Fields Summary
Constructors Summary
Methods Summary
public intdoEndTag()
Sets "no cache" response headers

        HttpServletResponse response = 
            (HttpServletResponse) pageContext.getResponse();
        response.addHeader("Pragma", "No-cache");
        response.addHeader("Cache-Control", "no-cache");
        response.addDateHeader("Expires", 1);
        return EVAL_PAGE;