Class CanonicalLinkTag

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

public class CanonicalLinkTag extends TagSupport
A JSP tag to generate canonical URLs for a page.
Since:
6.0
Version:
8.2
Author:
Luke
See Also:
  • Constructor Details

    • CanonicalLinkTag

      public CanonicalLinkTag()
  • Method Details

    • setUrl

      public void setUrl(String url)
      Overrides the canonical URL for this page.
      Parameters:
      url - the URL
    • 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 interface Tag
      Overrides:
      release in class TagSupport
    • doStartTag

      public int doStartTag() throws JspException
      Checks the input parameters and calculates the canonical URL if necessary.
      Specified by:
      doStartTag in interface Tag
      Overrides:
      doStartTag in class TagSupport
      Returns:
      SKIP_BODY always
      Throws:
      JspException - if an error occurs
    • doEndTag

      public int doEndTag() throws JspException
      Writes the canonical link tag to the JSP output stream.
      Specified by:
      doEndTag in interface Tag
      Overrides:
      doEndTag in class TagSupport
      Returns:
      EVAL_BODY always
      Throws:
      JspException - if an error occurs