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.
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. * * <p> - * 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. * * <p> - * 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. + * + * <p> + * 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. * * <p> - * 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. * * <p> - * 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. - * <p> - * 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. <b>Note:</b> the synchronization of the variable(s) - * will occur <em>after</em> the associated method has been called. - * + * will occur <em>after</em> the respective method has been called. * * <blockquote> * <table cellpadding="2" cellspacing="2" border="0" width="55%" Index: jsr154/src/share/dtd/web-jsptaglibrary_2_0.xsd =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr154/src/share/dtd/web-jsptaglibrary_2_0.xsd,v retrieving revision 1.4 diff -u -r1.4 web-jsptaglibrary_2_0.xsd --- jsr154/src/share/dtd/web-jsptaglibrary_2_0.xsd 3 Oct 2002 23:01:44 -0000 1.4 +++ jsr154/src/share/dtd/web-jsptaglibrary_2_0.xsd 2 Nov 2002 01:13:02 -0000 @@ -10,7 +10,7 @@ <xsd:annotation> <xsd:documentation> -@(#)web-jsptaglibrary_2_0.xsds 1.19 09/30/02 +@(#)web-jsptaglibrary_2_0.xsds 1.21 10/15/02 </xsd:documentation> </xsd:annotation> <xsd:annotation> @@ -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. </xsd:documentation> </xsd:annotation> @@ -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:
-- To unsubscribe, e-mail: <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>