Class NoCacheTag

java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
nablarch.common.web.tag.CustomTagSupport
nablarch.common.web.tag.NoCacheTag
All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, jakarta.servlet.jsp.tagext.TryCatchFinally, Serializable

public class NoCacheTag extends CustomTagSupport
ブラウザのキャッシュを防ぐクラス。
See Also:
  • Field Summary

    Fields inherited from class jakarta.servlet.jsp.tagext.TagSupport

    id, pageContext

    Fields inherited from interface jakarta.servlet.jsp.tagext.IterationTag

    EVAL_BODY_AGAIN

    Fields inherited from interface jakarta.servlet.jsp.tagext.Tag

    EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int

    Methods inherited from class nablarch.common.web.tag.CustomTagSupport

    doCatch, doFinally

    Methods inherited from class jakarta.servlet.jsp.tagext.TagSupport

    doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NoCacheTag

      public NoCacheTag()
  • Method Details

    • doStartTag

      public int doStartTag() throws jakarta.servlet.jsp.JspException
       ブラウザのキャッシュを防止するmetaタグの出力及びレスポンスヘッダの設定を行う。
       設定内容は下記の通り。
       
       metaタグ
         pragma: no-cache
         cache-control: no-cache
         expires: 0
       
       レスポンスヘッダ
         Pragma: no-cache
         Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
         Expires: 0
       
      Specified by:
      doStartTag in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      doStartTag in class jakarta.servlet.jsp.tagext.TagSupport
      Throws:
      jakarta.servlet.jsp.JspException