You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by gl...@locus.apache.org on 2000/11/11 16:50:43 UTC
cvs commit: jakarta-taglibs/response/src/org/apache/taglibs/response SendErrorTag.java
glenn 00/11/11 07:50:43
Modified: response/src/org/apache/taglibs/response SendErrorTag.java
Log:
Cleanup for release
Revision Changes Path
1.2 +27 -11 jakarta-taglibs/response/src/org/apache/taglibs/response/SendErrorTag.java
Index: SendErrorTag.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/response/src/org/apache/taglibs/response/SendErrorTag.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SendErrorTag.java 2000/09/26 20:00:31 1.1
+++ SendErrorTag.java 2000/11/11 15:50:43 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-taglibs/response/src/org/apache/taglibs/response/SendErrorTag.java,v 1.1 2000/09/26 20:00:31 glenn Exp $
- * $Revision: 1.1 $
- * $Date: 2000/09/26 20:00:31 $
+ * $Header: /home/cvs/jakarta-taglibs/response/src/org/apache/taglibs/response/SendErrorTag.java,v 1.2 2000/11/11 15:50:43 glenn Exp $
+ * $Revision: 1.2 $
+ * $Date: 2000/11/11 15:50:43 $
*
* ====================================================================
*
@@ -76,17 +76,28 @@
* The <b>senderror</b> tag can use an optional error message that it
* gets from the body of the tag.
* <p>
+ * The required attribute <b>error</b> must be set to an HTTP error
+ * code such as <b>SC_UNAUTHORIZED</b>.
+ * <p>
+ * If the optional attribute <b>reset</b> is set to <b>true</b> the
+ * buffer, headers, and status code will be reset.
+ * <p>
* JSP Tag Lib Descriptor
* <p><pre>
* <name>senderror</name>
* <tagclass>org.apache.taglibs.response.SendErrorTag</tagclass>
* <bodycontent>JSP</bodycontent>
- * <info>Used to send an error as the HTTP Response.</info>
+ * <info>Return an HTTP error as the HTTP Response.</info>
* <attribute>
* <name>error</name>
* <required>true</required>
* <rtexprvalue>false</rtexprvalue>
* </attribute>
+ * <attribute>
+ * <name>reset</name>
+ * <required>false</required>
+ * <rtexprvalue>false</rtexprvalue>
+ * </attribute>
* </pre>
*
* @author Glenn Nielsen
@@ -102,7 +113,7 @@
*
* @return EVAL_BODY_TAG
*/
- public int doStartTag() throws JspException
+ public final int doStartTag() throws JspException
{
return EVAL_BODY_TAG;
}
@@ -112,7 +123,7 @@
*
* @return SKIP_BODY
*/
- public int doAfterBody() throws JspException
+ public final int doAfterBody() throws JspException
{
// Use the body of the tag as header value
BodyContent body = getBodyContent();
@@ -146,19 +157,21 @@
*
* @return SKIP_PAGE
*/
- public int doEndTag() throws JspException
+ public final int doEndTag() throws JspException
{
return SKIP_PAGE;
}
/**
- * Set the error number to return.
+ * Required attribute that sets the error code to return.
*
* The error must be a text string for an error code as
* defined in java class HttpServletResponse. For example,
* <b>SC_UNATHORIZED</b> to return HTTP error code 401.
+ *
+ * @param String error code, i.e. <b>SC_UNATHORIZED</b>
*/
- public void setError(String err) throws JspException
+ public final void setError(String err) throws JspException
{
HttpServletResponse resp = null;
Field ec = null;
@@ -175,9 +188,12 @@
}
/**
- * Flag whether the buffer, headers, and status code should be reset.
+ * Optional attribute that flags whether the buffer, headers,
+ * and status code should be reset.
+ *
+ * @param String <b>true</b> or <b>false</b>
*/
- public void setReset(String res)
+ public final void setReset(String res)
{
if( res.equals("true") )
reset = true;