Class AbstractTag

java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
com.opensymphony.module.sitemesh.taglib.AbstractTag
All Implemented Interfaces:
RequestConstants, Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
BodyTag, HeadTag, PropertyTag, TitleTag, UsePageTag

public abstract class AbstractTag extends javax.servlet.jsp.tagext.BodyTagSupport implements RequestConstants
Convenience implementation of Tag containing generice methods required by all (or most) taglibs.
Version:
$Revision: 1.4 $
Author:
Joe Walnes
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected javax.servlet.jsp.PageContext
     
    protected javax.servlet.jsp.tagext.Tag
     

    Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport

    bodyContent

    Fields inherited from class javax.servlet.jsp.tagext.TagSupport

    id

    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 com.opensymphony.module.sitemesh.RequestConstants

    DECORATOR, PAGE, ROBOT

    Fields inherited from interface javax.servlet.jsp.tagext.Tag

    EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract int
    To be implemented by all empty tags.
    int
    Returns SKIP_BODY.
    protected Writer
    Get the outputWriter.
    protected Page
    Return the Page object from the PAGE scope.
    javax.servlet.jsp.tagext.Tag
     
    void
     
    void
    setPageContext(javax.servlet.jsp.PageContext pageContext)
     
    void
    setParent(javax.servlet.jsp.tagext.Tag parent)
     
    protected static void
    Log exception generated by taglib.

    Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport

    doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent

    Methods inherited from class javax.servlet.jsp.tagext.TagSupport

    findAncestorWithClass, getId, getValue, getValues, removeValue, setId, setValue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • pageContext

      protected javax.servlet.jsp.PageContext pageContext
    • parent

      protected javax.servlet.jsp.tagext.Tag parent
  • Constructor Details

    • AbstractTag

      public AbstractTag()
  • Method Details

    • doEndTag

      public abstract int doEndTag() throws javax.servlet.jsp.JspException
      To be implemented by all empty tags.
      Specified by:
      doEndTag in interface javax.servlet.jsp.tagext.Tag
      Overrides:
      doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
      Throws:
      javax.servlet.jsp.JspException
    • doStartTag

      public int doStartTag()
      Returns SKIP_BODY.
      Specified by:
      doStartTag in interface javax.servlet.jsp.tagext.Tag
      Overrides:
      doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
    • release

      public void release()
      Specified by:
      release in interface javax.servlet.jsp.tagext.Tag
      Overrides:
      release in class javax.servlet.jsp.tagext.BodyTagSupport
    • getParent

      public javax.servlet.jsp.tagext.Tag getParent()
      Specified by:
      getParent in interface javax.servlet.jsp.tagext.Tag
      Overrides:
      getParent in class javax.servlet.jsp.tagext.TagSupport
    • setParent

      public void setParent(javax.servlet.jsp.tagext.Tag parent)
      Specified by:
      setParent in interface javax.servlet.jsp.tagext.Tag
      Overrides:
      setParent in class javax.servlet.jsp.tagext.TagSupport
    • setPageContext

      public void setPageContext(javax.servlet.jsp.PageContext pageContext)
      Specified by:
      setPageContext in interface javax.servlet.jsp.tagext.Tag
      Overrides:
      setPageContext in class javax.servlet.jsp.tagext.TagSupport
    • getPage

      protected Page getPage()
      Return the Page object from the PAGE scope. If this is found in REQUEST scope instead, it will be moved into PAGE scope - to handle multi-level includes.
    • trace

      protected static void trace(Exception e)
      Log exception generated by taglib.
    • getOut

      protected Writer getOut()
      Get the outputWriter. This method should be used in preference to pageContext.getOut(), as some charset conversions may need to happen in some servers.
      Returns:
      the writer for use in the tag