org.apache.taglibs.mailer
Class ErrorTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.apache.taglibs.mailer.ErrorTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag

public class ErrorTag
extends javax.servlet.jsp.tagext.BodyTagSupport

ErrorTag - JSP tag Error is used to get the error message when creating an error page. error org.apache.taglibs.mail.ErrorTag JSP Get the error message if mail was unable to be sent id true false

Version:
1.0
Author:
Rich Catlett
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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 javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
ErrorTag()
           
 
Method Summary
 int doAfterBody()
          Implementation of the method from the tag interface that gets called at end of each error tag.
 int doEndTag()
          implementation of the method from the tag interface that tells the JSP page what to do when the start tag is encountered
 int doStartTag()
          implementation of the method from the tag interface that tells the JSP page what to do when the start tag is encountered
 java.lang.String getError()
          Returns the name of the current error.
 void release()
          Remove the script variable after error tag is closed out
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Constructor Detail

ErrorTag

public ErrorTag()
Method Detail

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
implementation of the method from the tag interface that tells the JSP page what to do when the start tag is encountered

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
Returns:
- SKIP_BODY if no errors exist, EVAL_BODY_TAG if errors do exist
Throws:
javax.servlet.jsp.JspException - thrown when an error occurs while processing the body of this method

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Implementation of the method from the tag interface that gets called at end of each error tag.

Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Overrides:
doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport
Returns:
EVAL_BODY_TAG if there is another error, or SKIP_BODY if there are no more errors
Throws:
javax.servlet.jsp.JspException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
implementation of the method from the tag interface that tells the JSP page what to do when the start tag is encountered

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
Returns:
- EVAL_PAGE
Throws:
javax.servlet.jsp.JspException - thrown when an error occurs while processing the body of this method

getError

public java.lang.String getError()
Returns the name of the current error.

<jsp:getProperty name="id" property="error"/>

Returns:
String - the current error in the list

release

public void release()
Remove the script variable after error tag is closed out

Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class javax.servlet.jsp.tagext.BodyTagSupport


Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.