Class EncodeTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- javax.servlet.jsp.tagext.BodyTagSupport
-
- org.apache.sling.scripting.jsp.taglib.EncodeTag
-
- All Implemented Interfaces:
Serializable
,BodyTag
,IterationTag
,JspTag
,Tag
public class EncodeTag extends BodyTagSupport
Tag for writing properly XSS encoded text to the response using the OWASP ESAPI for supporting a number of encoding modes.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
-
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
-
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
-
-
Constructor Summary
Constructors Constructor Description EncodeTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doEndTag()
Default processing of the end tag returning EVAL_PAGE.int
doStartTag()
Default processing of the start tag returning EVAL_BODY_BUFFERED.String
getDefault()
String
getMode()
String
getValue()
void
setDefault(String defaultValue)
void
setMode(String mode)
void
setValue(String value)
-
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
-
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
-
-
-
-
Method Detail
-
doEndTag
public int doEndTag() throws JspException
Description copied from class:BodyTagSupport
Default processing of the end tag returning EVAL_PAGE.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classBodyTagSupport
- Returns:
- EVAL_PAGE
- Throws:
JspException
- if an error occurred while processing this tag- See Also:
Tag.doEndTag()
-
doStartTag
public int doStartTag() throws JspException
Description copied from class:BodyTagSupport
Default processing of the start tag returning EVAL_BODY_BUFFERED.- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classBodyTagSupport
- Returns:
- EVAL_BODY_BUFFERED
- Throws:
JspException
- if an error occurred while processing this tag- See Also:
Tag.doStartTag()
-
getDefault
public String getDefault()
- Returns:
- the default value
-
getMode
public String getMode()
- Returns:
- the mode
-
getValue
public String getValue()
- Returns:
- the value
-
setDefault
public void setDefault(String defaultValue)
- Parameters:
defaultValue
- the default value to set
-
setMode
public void setMode(String mode)
- Parameters:
mode
- the mode to set
-
setValue
public void setValue(String value)
- Parameters:
value
- the value to set
-
-