Class NewRelicTag

java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.deltava.taglib.CSPNonceTag
org.deltava.taglib.content.NewRelicTag
All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, Serializable

public class NewRelicTag extends CSPNonceTag
A JSP tag to inject NewRelic browser instrumentation with a CSP nonce. Because this injected JavaScript can easily overflow the JSP output buffer (which prevents the CSP header from being emitted) this tag has a start and end. The start sets the relevant CSP headers, while the end tag actually emits the script (with the expectation that the CSP header has already been written to the response).
Since:
12.4
Version:
12.4
Author:
Luke
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
     
    int
     

    Methods inherited from class CSPNonceTag

    getNonce
    Modifier and Type
    Method
    Description
    protected String
    Returns the nonce from the request's Content Security Policy.

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

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

    Methods inherited from class Object

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

    • NewRelicTag

      public NewRelicTag()
  • Method Details

    • doStartTag

      public int doStartTag() throws jakarta.servlet.jsp.JspException
      Specified by:
      doStartTag in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      doStartTag in class jakarta.servlet.jsp.tagext.TagSupport
      Throws:
      jakarta.servlet.jsp.JspException
    • doEndTag

      public int doEndTag() throws jakarta.servlet.jsp.JspException
      Specified by:
      doEndTag in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      doEndTag in class jakarta.servlet.jsp.tagext.TagSupport
      Throws:
      jakarta.servlet.jsp.JspException