FileDocCategorySizeDatePackage
NoCacheTag.javaAPI DocExample912Tue Feb 28 11:34:06 GMT 2006com.ora.jsp.tags

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
2.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.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
	response.addHeader("Cache-Control", "pre-check=0, post-check=0");
        response.setDateHeader("Expires", 0);
        return EVAL_PAGE;