Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 99297 invoked from network); 2 Nov 2002 01:23:41 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 2 Nov 2002 01:23:41 -0000 Received: (qmail 10454 invoked by uid 97); 2 Nov 2002 01:24:15 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 10370 invoked by uid 97); 2 Nov 2002 01:24:15 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 10317 invoked by uid 98); 2 Nov 2002 01:24:14 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <3DC328DE.4080306@sun.com> Date: Fri, 01 Nov 2002 20:22:38 -0500 From: Mark Roth User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020729 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: tomcat-dev@jakarta.apache.org Subject: [PATCH] jakarta-servletapi-5: javadoc clarifications Content-Type: multipart/mixed; boundary="------------090205060203070700050209" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --------------090205060203070700050209 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Here is a patch with some more javadoc clarifications, to make the API more testable. Thanks go to Ryan Lubke for helping out! As always, please let me know if there are any questions or concerns. Change summary: --------------- jsr152/src/share/javax/servlet/jsp/tagext/VariableInfo.java - Fixed incorrect wording from last patch, for variable synchronization. jsr152/src/share/javax/servlet/jsp/tagext/TagExtraInfo.java - Fixed wording to preserve forwards compatibility for existing TEI implementations. jsr152/src/share/javax/servlet/jsp/tagext/TagInfo.java - Fixed default implementation of getVariableInfo() to return a variable for the id attribute, if specified. Clarified intent in javadocs. jsr152/src/share/javax/servlet/jsp/tagext/TagData.java - Fixed getId() description, as we're not returning the jsp:id in this case. jsr152/src/share/javax/servlet/jsp/tagext/BodyTag.java jsr152/src/share/javax/servlet/jsp/tagext/IterationTag.java jsr152/src/share/javax/servlet/jsp/tagext/SimpleTag.java jsr152/src/share/javax/servlet/jsp/tagext/Tag.java - Clarified javadocs w.r.t. variable synchronization jsr152/src/share/dtd/web-jsptaglibrary_2_0.xsd jsr154/src/share/dtd/web-jsptaglibrary_2_0.xsd - Removed fragment element under variable element, as fragment-scoped variables are no longer supported. -- Mark Roth, Java Software JSP 2.0 Co-Specification Lead Sun Microsystems, Inc. --------------090205060203070700050209 Content-Type: text/plain; name="jakarta-servletapi-5.patch4.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="jakarta-servletapi-5.patch4.txt" Index: jsr152/src/share/javax/servlet/jsp/tagext/BodyTag.java =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/BodyTag.java,v retrieving revision 1.2 diff -u -r1.2 BodyTag.java --- jsr152/src/share/javax/servlet/jsp/tagext/BodyTag.java 29 Oct 2002 01:18:12 -0000 1.2 +++ jsr152/src/share/javax/servlet/jsp/tagext/BodyTag.java 2 Nov 2002 01:12:50 -0000 @@ -200,9 +200,9 @@ * tags whose doStartTag() method returns SKIP_BODY or EVAL_BODY_INCLUDE. * *

- * The JSP container will resynchronize any variable values that - * are indicated as so in TagExtraInfo or TLD after the invocation of - * doInitBody(). + * The JSP container will resynchronize the values of any AT_BEGIN and + * NESTED variables (defined by the associated TagExtraInfo or TLD) after + * the invocation of doInitBody(). * * @throws JspException * @see #doAfterBody Index: jsr152/src/share/javax/servlet/jsp/tagext/IterationTag.java =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/IterationTag.java,v retrieving revision 1.2 diff -u -r1.2 IterationTag.java --- jsr152/src/share/javax/servlet/jsp/tagext/IterationTag.java 29 Oct 2002 01:18:12 -0000 1.2 +++ jsr152/src/share/javax/servlet/jsp/tagext/IterationTag.java 2 Nov 2002 01:12:54 -0000 @@ -138,9 +138,9 @@ * of external computation. * *

- * The JSP container will resynchronize any variable values that are - * indicated as so in TagExtraInfo or TLD after the invocation of - * doAfterBody(). + * The JSP container will resynchronize the values of any AT_BEGIN and + * NESTED variables (defined by the associated TagExtraInfo or TLD) after + * the invocation of doAfterBody(). * * @return whether additional evaluations of the body are desired * @throws JspException Index: jsr152/src/share/javax/servlet/jsp/tagext/SimpleTag.java =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/SimpleTag.java,v retrieving revision 1.3 diff -u -r1.3 SimpleTag.java --- jsr152/src/share/javax/servlet/jsp/tagext/SimpleTag.java 29 Oct 2002 01:18:12 -0000 1.3 +++ jsr152/src/share/javax/servlet/jsp/tagext/SimpleTag.java 2 Nov 2002 01:12:54 -0000 @@ -111,6 +111,11 @@ * Called by the container to invoke this tag. * The implementation of this method is provided by the tag library * developer, and handles all tag processing, body iteration, etc. + * + *

+ * The JSP container will resynchronize any AT_BEGIN and AT_END + * variables (defined by the associated tag file, TagExtraInfo, or TLD) + * after the invocation of doTag(). * * @throws javax.servlet.jsp.JspException If an error occurred * while processing this tag. Index: jsr152/src/share/javax/servlet/jsp/tagext/Tag.java =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/Tag.java,v retrieving revision 1.3 diff -u -r1.3 Tag.java --- jsr152/src/share/javax/servlet/jsp/tagext/Tag.java 29 Oct 2002 01:18:12 -0000 1.3 +++ jsr152/src/share/javax/servlet/jsp/tagext/Tag.java 2 Nov 2002 01:12:54 -0000 @@ -243,9 +243,11 @@ * implements BodyTag. * *

- * The JSP container will resynchronize any variable values that are - * indicated as so in TagExtraInfo or the TLD after the invocation of - * doStartTag(). + * The JSP container will resynchronize the values of any AT_BEGIN and + * NESTED variables (defined by the associated TagExtraInfo or TLD) + * after the invocation of doStartTag(), except for a tag handler + * implementing BodyTag whose doStartTag() method returns + * BodyTag.EVAL_BODY_BUFFERED. * * @return EVAL_BODY_INCLUDE if the tag wants to process body, SKIP_BODY * if it does not want to process it. @@ -275,9 +277,9 @@ * only the current page evaluation is stopped. * *

- * The JSP container will resynchronize any variable values that are - * indicated as so in TagExtraInfo or the TLD after the invocation of - * doEndTag(). + * The JSP container will resynchronize the values of any AT_BEGIN and + * AT_END variables (defined by the associated TagExtraInfo or TLD) + * after the invocation of doEndTag(). * * @return indication of whether to continue evaluating the JSP page. * @throws JspException if an error occurred while processing this tag Index: jsr152/src/share/javax/servlet/jsp/tagext/TagData.java =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagData.java,v retrieving revision 1.3 diff -u -r1.3 TagData.java --- jsr152/src/share/javax/servlet/jsp/tagext/TagData.java 29 Oct 2002 01:18:12 -0000 1.3 +++ jsr152/src/share/javax/servlet/jsp/tagext/TagData.java 2 Nov 2002 01:12:56 -0000 @@ -119,9 +119,10 @@ } /** - * The value of the jsp:id attribute. + * The value of the tag's id attribute. * - * @return the value of the jsp:id attribute. + * @return the value of the tag's id attribute, or null if no such + * attribute was specified. */ public String getId() { Index: jsr152/src/share/javax/servlet/jsp/tagext/TagExtraInfo.java =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagExtraInfo.java,v retrieving revision 1.3 diff -u -r1.3 TagExtraInfo.java --- jsr152/src/share/javax/servlet/jsp/tagext/TagExtraInfo.java 29 Oct 2002 01:18:12 -0000 1.3 +++ jsr152/src/share/javax/servlet/jsp/tagext/TagExtraInfo.java 2 Nov 2002 01:12:58 -0000 @@ -97,7 +97,7 @@ * Request-time attributes are indicated as such in the TagData parameter. * * @param data The TagData instance. - * @return An array of VariableInfo data, or a zero length array + * @return An array of VariableInfo data, or null or a zero length array * if no scripting variables are to be defined. */ public VariableInfo[] getVariableInfo(TagData data) { Index: jsr152/src/share/javax/servlet/jsp/tagext/TagInfo.java =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagInfo.java,v retrieving revision 1.3 diff -u -r1.3 TagInfo.java --- jsr152/src/share/javax/servlet/jsp/tagext/TagInfo.java 29 Oct 2002 01:18:12 -0000 1.3 +++ jsr152/src/share/javax/servlet/jsp/tagext/TagInfo.java 2 Nov 2002 01:12:59 -0000 @@ -265,22 +265,31 @@ /** * Information on the scripting objects created by this tag at runtime. * This is a convenience method on the associated TagExtraInfo class. - *

- * Default is null if the tag has no "id" attribute, - * otherwise, {"id", Object} * * @param data TagData describing this action. - * @return Array of VariableInfo elements, or a zero length - * array if the associated TagExtraInfo defines no scripting - * variables. + * @return if a TagExtraInfo object is associated with this TagInfo, the + * the result of getTagExtraInfo().getVariableInfo( data ), otherwise + * null if the tag has no "id" attribute or new VariableInfo[] { + * new VariableInfo( data.getId(), "java.lang.Object", true, + * VariableInfo.NESTED ) } if an "id" attribute is present. */ - public VariableInfo[] getVariableInfo(TagData data) { + VariableInfo[] result = null; TagExtraInfo tei = getTagExtraInfo(); - if (tei == null) { - return null; + if (tei != null) { + result = tei.getVariableInfo( data ); } - return tei.getVariableInfo(data); + else { + String idValue = data.getId(); + if( idValue != null ) { + result = + new VariableInfo[] { + new VariableInfo( idValue, "java.lang.Object", + true, VariableInfo.NESTED ) + }; + } + } + return result; } /** Index: jsr152/src/share/javax/servlet/jsp/tagext/VariableInfo.java =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/VariableInfo.java,v retrieving revision 1.4 diff -u -r1.4 VariableInfo.java --- jsr152/src/share/javax/servlet/jsp/tagext/VariableInfo.java 31 Oct 2002 23:02:01 -0000 1.4 +++ jsr152/src/share/javax/servlet/jsp/tagext/VariableInfo.java 2 Nov 2002 01:13:00 -0000 @@ -137,8 +137,7 @@ * The scope value for a variable implies what methods may affect its * value and thus where synchronization is needed as illustrated by * the table below. Note: the synchronization of the variable(s) - * will occur after the associated method has been called. - * + * will occur after the respective method has been called. * *

* -@(#)web-jsptaglibrary_2_0.xsds 1.19 09/30/02 +@(#)web-jsptaglibrary_2_0.xsds 1.21 10/15/02 @@ -318,7 +318,9 @@ path Where to find the .tag file implementing this action, relative to the root of the web application or the root of the JAR file for a tag library packaged in - a JAR. + a JAR. This must begin with /WEB-INF/tags if the .tag + file resides in the WAR, or /META-INF/tags if the .tag + file resides in a JAR. @@ -816,7 +818,7 @@ variables defined by using this tag. It is a (translation time) error for a tag that has one or more variable subelements to have a TagExtraInfo class that returns a -non-null object. +non-null value from a call to getVariableInfo(). The subelements of variableType are of the form: --------------090205060203070700050209 Content-Type: text/plain; charset=us-ascii -- To unsubscribe, e-mail: For additional commands, e-mail: --------------090205060203070700050209--