Package com.day.cq.wcm.tags
Class RequestURLTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- com.day.cq.wcm.tags.RequestURLTag
-
- All Implemented Interfaces:
java.io.Serializable
,IterationTag
,JspTag
,Tag
public class RequestURLTag extends TagSupport
RequestURLTag
writes the current request URL to the current JspWriter. The body of this tag allows multiple addParam and removeParam tags to modify the current request URL before it is written.- See Also:
- Serialized Form
-
-
Field Summary
-
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 RequestURLTag()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addParam(java.lang.String name, java.lang.String value)
Adds a parameter with the givenname
andvalue
.int
doEndTag()
Default processing of the end tag returning EVAL_PAGE.int
doStartTag()
Default processing of the start tag, returning SKIP_BODY.void
release()
Release state.void
removeParam(java.lang.String name)
Removes the parameter and all its values with the givenname
.void
removeParam(java.lang.String name, java.lang.String value)
Removes a value from the parameter with the givenname
.-
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
-
-
-
Method Detail
-
removeParam
public void removeParam(java.lang.String name)
Removes the parameter and all its values with the givenname
.- Parameters:
name
- the name of the parameter.
-
removeParam
public void removeParam(java.lang.String name, java.lang.String value)
Removes a value from the parameter with the givenname
.- Parameters:
name
- name of the parameter.value
- the value to remove.
-
addParam
public void addParam(java.lang.String name, java.lang.String value)
Adds a parameter with the givenname
andvalue
.- Parameters:
name
- the name of the parameter.value
- the value for the parameter.
-
release
public void release()
Release state.- Specified by:
release
in interfaceTag
- Overrides:
release
in classTagSupport
- See Also:
Tag.release()
-
doStartTag
public int doStartTag() throws JspException
Default processing of the start tag, returning SKIP_BODY.- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classTagSupport
- Returns:
- SKIP_BODY
- Throws:
JspException
- if an error occurs while processing this tag- See Also:
Tag.doStartTag()
-
doEndTag
public int doEndTag() throws JspException
Default processing of the end tag returning EVAL_PAGE.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
- Returns:
- EVAL_PAGE
- Throws:
JspException
- if an error occurs while processing this tag- See Also:
Tag.doEndTag()
-
-