Class CanonicalLinkTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.deltava.taglib.content.CanonicalLinkTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, Serializable
public class CanonicalLinkTag
extends jakarta.servlet.jsp.tagext.TagSupport
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 jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoEndTag()Writes the canonical link tag to the JSP output stream.intChecks the input parameters and calculates the canonical URL if necessary.voidrelease()Releases the tag's state variables.voidsetConvertID(boolean convertID) Sets whether to convert numeric ID parameters to hexadecimal.voidOverrides the canonical URL for this page.Methods inherited from class jakarta.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:
releasein interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
releasein classjakarta.servlet.jsp.tagext.TagSupport
-
doStartTag
public int doStartTag() throws jakarta.servlet.jsp.JspExceptionChecks the input parameters and calculates the canonical URL if necessary.- Specified by:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjakarta.servlet.jsp.tagext.TagSupport- Returns:
- SKIP_BODY always
- Throws:
jakarta.servlet.jsp.JspException- if an error occurs
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspExceptionWrites the canonical link tag to the JSP output stream.- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjakarta.servlet.jsp.tagext.TagSupport- Returns:
- EVAL_BODY always
- Throws:
jakarta.servlet.jsp.JspException- if an error occurs
-