Class CanonicalLinkTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.content.CanonicalLinkTag
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
A JSP tag to generate canonical URLs for a page.
- Since:
- 6.0
- Version:
- 8.2
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
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 -
Method Summary
Modifier and TypeMethodDescriptionint
doEndTag()
Writes the canonical link tag to the JSP output stream.int
Checks the input parameters and calculates the canonical URL if necessary.void
release()
Releases the tag's state variables.void
setConvertID
(boolean convertID) Sets whether to convert numeric ID parameters to hexadecimal.void
Overrides the canonical URL for this page.Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
Constructor Details
-
CanonicalLinkTag
public CanonicalLinkTag()
-
-
Method Details
-
setUrl
-
setConvertID
public void setConvertID(boolean convertID) Sets whether to convert numeric ID parameters to hexadecimal.- Parameters:
convertID
- TRUE if parameters should be converted, otherwise FALSE
-
release
public void release()Releases the tag's state variables.- Specified by:
release
in interfaceTag
- Overrides:
release
in classTagSupport
-
doStartTag
Checks the input parameters and calculates the canonical URL if necessary.- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classTagSupport
- Returns:
- SKIP_BODY always
- Throws:
JspException
- if an error occurs
-
doEndTag
Writes the canonical link tag to the JSP output stream.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
- Returns:
- EVAL_BODY always
- Throws:
JspException
- if an error occurs
-