You are viewing a plain text version of this content. The canonical link for it is here.
Posted to servletapi-dev@jakarta.apache.org by ed...@apache.org on 2001/04/25 02:10:02 UTC
cvs commit: jakarta-servletapi-4/src/share/javax/servlet/jsp/tagext BodyTag.java IterationTag.java PageData.java Tag.java
eduardop 01/04/24 17:10:02
Modified: src/share/javax/servlet/jsp/tagext BodyTag.java
IterationTag.java PageData.java Tag.java
Log:
Corresponds to JSP 1.2 PFD2 changes
Revision Changes Path
1.2 +31 -8 jakarta-servletapi-4/src/share/javax/servlet/jsp/tagext/BodyTag.java
Index: BodyTag.java
===================================================================
RCS file: /home/cvs/jakarta-servletapi-4/src/share/javax/servlet/jsp/tagext/BodyTag.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BodyTag.java 2001/01/09 03:24:21 1.1
+++ BodyTag.java 2001/04/25 00:10:01 1.2
@@ -91,13 +91,16 @@
* The interface provides one new property with a setter method and one
* new action method.
*
- * <p> The new property is bodyContent, to contain the BodyContent
+ * <p><B>Properties</B>
+ * <p> There is a new property: bodyContent, to contain the BodyContent
* object, where the JSP Page implementation object will place the
* evaluation (and reevaluation, if appropriate) of the body. The setter
* method (setBodyContent) will only be invoked if doStartTag() returns
* EVAL_BODY_BUFFERED.
*
- * <p> The new action methods is doInitBody(), which is invoked right after
+ * <p><B>Methods</B>
+ * <p> In addition to the setter method for the bodyContent property, there
+ * is a new action methods: doInitBody(), which is invoked right after
* setBodyContent() and before the body evaluation. This method is only
* invoked if doStartTag() returns EVAL_BODY_BUFFERED.
*
@@ -110,6 +113,25 @@
* interface for details.
* <p>
* <IMG src="doc-files/BodyTagProtocol.gif"/>
+
+ * <p><B>Empty and Non-Empty Action</B>
+ * <p> If the action is an <b>empty action</b>, the doStartTag() method must
+ * return SKIP_BODY.
+ *
+ * <p> If the action is a <b>non-empty action</b>, the doStartTag() method
+ * may return SKIP_BODY, EVAL_BODY_INCLUDE, or EVAL_BODY_BUFFERED.
+ *
+ * If SKIP_BODY is returned the body is not evaluated, and doEndTag() is
+ * invoked.
+ *
+ * If EVAL_BODY_INCLUDE is returned, setBodyContent() is not invoked,
+ * doInitBody() is not invoked, the body is evaluated and
+ * "passed through" to the current out, doAfterBody() is invoked
+ * and then, after zero or more iterations, doEndTag() is invoked.
+ *
+ * If EVAL_BODY_BUFFERED is returned, setBodyContent() is invoked,
+ * doInitBody() is invoked, the body is evaluated, doAfterBody() is
+ * invoked, and then, after zero or more iterations, doEndTag() is invoked.
*/
public interface BodyTag extends IterationTag {
@@ -141,10 +163,10 @@
/**
* Set the bodyContent property.
* This method is invoked by the JSP page implementation object at
- * most once per action invocation. The method will be invoked before
- * doInitBody and it will not be invoked if there is no body evaluation
- * (for example if doStartTag() returns EVAL_BODY_INCLUDE
- * or SKIP_BODY).
+ * most once per action invocation.
+ * This method will be invoked before doInitBody.
+ * This method will not be invoked for empty tags or for non-empty
+ * tags whose doStartTag() method returns SKIP_BODY or EVAL_BODY_INCLUDE.
*
* <p>
* When setBodyContent is invoked, the value of the implicit object out
@@ -169,8 +191,9 @@
* Prepare for evaluation of the body.
* This method is invoked by the JSP page implementation object
* after setBodyContent and before the first time
- * the body is to be evaluated. The method will not be invoked if there
- * is no body evaluation.
+ * the body is to be evaluated.
+ * This method will not be invoked for empty tags or for non-empty
+ * tags whose doStartTag() method returns SKIP_BODY or EVAL_BODY_INCLUDE.
*
* <p>
* The JSP container will resynchronize
1.2 +22 -1 jakarta-servletapi-4/src/share/javax/servlet/jsp/tagext/IterationTag.java
Index: IterationTag.java
===================================================================
RCS file: /home/cvs/jakarta-servletapi-4/src/share/javax/servlet/jsp/tagext/IterationTag.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- IterationTag.java 2001/01/09 03:24:21 1.1
+++ IterationTag.java 2001/04/25 00:10:01 1.2
@@ -70,6 +70,12 @@
* If doAfterBody() returns Tag.SKIP_BODY, then the body will be skipped
* and doEndTag() will be evaluated instead.
*
+ * <p><B>Properties</B>
+ * There are no new properties in addition to those in Tag.
+ *
+ * <p><B>Methods</B>
+ * There is one new methods: doAfterBody().
+ *
* <p><B>Lifecycle</B>
*
* <p> Lifecycle details are described by the transition diagram
@@ -80,7 +86,22 @@
* details.
*
* <p>
- * <IMG src="doc-files/IterationTagProtocol.gif"/> */
+ * <IMG src="doc-files/IterationTagProtocol.gif"/>
+ *
+ * <p><B>Empty and Non-Empty Action</B>
+ * <p> If the action is an <b>empty action</b>, the doStartTag() method must
+ * return SKIP_BODY.
+ *
+ * <p> If the action is a <b>non-empty action</b>, the doStartTag() method
+ * may return SKIP_BODY or EVAL_BODY_INCLUDE.
+ *
+ * If SKIP_BODY is returned the body is not evaluated, and then doEndTag()
+ * is invoked.
+ *
+ * If EVAL_BODY_INCLUDE is returned, the body is evaluated and
+ * "passed through" to the current out, then doAfterBody() is invoked
+ * and, after zero or more iterations, doEndTag() is invoked.
+*/
public interface IterationTag extends Tag {
1.2 +4 -2 jakarta-servletapi-4/src/share/javax/servlet/jsp/tagext/PageData.java
Index: PageData.java
===================================================================
RCS file: /home/cvs/jakarta-servletapi-4/src/share/javax/servlet/jsp/tagext/PageData.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PageData.java 2001/01/09 03:24:22 1.1
+++ PageData.java 2001/04/25 00:10:01 1.2
@@ -59,7 +59,7 @@
/**
* Translation-time information on a JSP page. The information
- * corresponds to the XML document associated with the JSP page.
+ * corresponds to the XML view of the JSP page.
*
* <p>
* Objects of this type are generated by the JSP translator, e.g.
@@ -69,7 +69,9 @@
abstract public class PageData {
/**
- * Returns an input stream on the XML document.
+ * Returns an input stream on the XML view of a JSP page.
+ * Recall tht the XML view of a JSP page has the include
+ * directives expanded.
*
* @return An input stream on the document.
*/
1.2 +20 -12 jakarta-servletapi-4/src/share/javax/servlet/jsp/tagext/Tag.java
Index: Tag.java
===================================================================
RCS file: /home/cvs/jakarta-servletapi-4/src/share/javax/servlet/jsp/tagext/Tag.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Tag.java 2001/01/09 03:24:22 1.1
+++ Tag.java 2001/04/25 00:10:01 1.2
@@ -84,16 +84,6 @@
* available for further invocations (and it is expected to have
* retained its properties).
*
- * <p><B>Release</B>
- *
- * <p> Once all invocations on the tag handler
- * are completed, the release method is invoked on it. Once a release
- * method is invoked <em>all</em> properties, including parent and
- * pageContext, are assumed to have been reset to an unspecified value.
- * The page compiler guarantees that release() will be invoked on the Tag
- * handler before the handler is released to the GC.
- *
- *
* <p><B>Lifecycle</B>
* <p> Lifecycle details are described by the transition diagram below,
* with the following comments:
@@ -114,6 +104,24 @@
*
* <IMG src="doc-files/TagProtocol.gif"/>
*
+ * <p> Once all invocations on the tag handler
+ * are completed, the release method is invoked on it. Once a release
+ * method is invoked <em>all</em> properties, including parent and
+ * pageContext, are assumed to have been reset to an unspecified value.
+ * The page compiler guarantees that release() will be invoked on the Tag
+ * handler before the handler is released to the GC.
+ *
+ * <p><B>Empty and Non-Empty Action</B>
+ * <p> If the action is an <b>empty action</b>, the doStartTag() method must
+ * return SKIP_BODY.
+ *
+ * <p> If the action is a <b>non-empty action</b>, the doStartTag() method
+ * may return SKIP_BODY or EVAL_BODY_INCLUDE.
+ *
+ * If SKIP_BODY is returned the body is not evaluated.
+ *
+ * If EVAL_BODY_INCLUDE is returned, the body is evaluated and
+ * "passed through" to the current out.
*/
public interface Tag {
@@ -128,8 +136,6 @@
/**
* Evaluate body into existing out stream.
* Valid return value for doStartTag.
- * This is an illegal return value for doStartTag when the class implements
- * BodyTag, since BodyTag implies the creation of a new BodyContent.
*/
public final static int EVAL_BODY_INCLUDE = 1;
@@ -209,6 +215,8 @@
* BodyTag.EVAL_BODY_BUFFERED to indicate
* that the body of the action should be evaluated or SKIP_BODY to
* indicate otherwise.
+ *
+ * <p>
* When a Tag returns EVAL_BODY_INCLUDE the result of evaluating
* the body (if any) is included into the current "out" JspWriter as it
* happens and then doEndTag() is invoked.