I also made a couple of changes to the JSP 2.0 examples in accordance with these changes.
jsr152/src/share/dtd/jsp_2_0.xsd: jsr154/src/share/dtd/jsp_2_0.xsd: - Expanded on description for taglibType complex type.
jsr152/src/share/javax/servlet/jsp/tagext/SimpleTagSupport.java: - Change getJspBody() to be protected - Change getJspContext() to be protected - Change the jspBody field to be private - Change the jspContext field to be private.
jsr152/src/share/javax/servlet/jsp/el/ExpressionEvaluator.java: - Changed so that Strings of the form "abc${1+1}def${1+1}ghi" cannot be parsed or evaluated. Only one expression can be parsed evaluated at a time, and no static text can appear.
jsr152/src/share/javax/servlet/jsp/JspWriter.java: - Changed javadocs for print() methods to indicate that the resulting text is written to the writer, and not converted to the platform's default character encoding first, which would make no sense.
jsr152/src/share/javax/servlet/jsp/tagext/TagInfo.java - getTagName() - Clarified that name is always returned (cannot be null)
jsr152/src/share/javax/servlet/jsp/tagext/Tag.java - Accessibility fix. Added img alt tag.
jsr152/src/share/javax/servlet/jsp/tagext/BodyTag.java - Accessibility fix. Added img alt tag.
jsr152/src/share/javax/servlet/jsp/tagext/IterationTag.java - Accessibility fix. Added img alt tag.
jsr152/src/share/javax/servlet/jsp/tagext/VariableInfo.java - Accessibility fix. Added img alt tag and table summary tag.
jsr152/src/share/javax/servlet/jsp/el/ExpressionEvaluator.java - evaluate() - Removed defaultPrefix param and allow FunctionMapper to mutate after call. - parseExpression() - Removed defaultPrefix param and allow FunctionMapper to mutate after call.
--- Mark Roth, Java Software JSP 2.0 Co-Specification Lead Sun Microsystems, Inc.
Index: jsr152/examples/WEB-INF/classes/jsp2/examples/simpletag/RepeatSimpleTag.java =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/examples/WEB-INF/classes/jsp2/examples/simpletag/RepeatSimpleTag.java,v retrieving revision 1.2 diff -u -r1.2 RepeatSimpleTag.java --- jsr152/examples/WEB-INF/classes/jsp2/examples/simpletag/RepeatSimpleTag.java 28 Oct 2002 17:45:43 -0000 1.2 +++ jsr152/examples/WEB-INF/classes/jsp2/examples/simpletag/RepeatSimpleTag.java 24 Mar 2003 22:34:48 -0000 @@ -19,7 +19,7 @@ public void doTag() throws JspException, IOException { for (int i=0; i<num; i++) { - jspContext.setAttribute("count", String.valueOf( i + 1 ) ); + getJspContext().setAttribute("count", String.valueOf( i + 1 ) ); getJspBody().invoke(null); } } Index: jsr152/src/share/javax/servlet/jsp/JspWriter.java =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/JspWriter.java,v retrieving revision 1.3 diff -u -r1.3 JspWriter.java --- jsr152/src/share/javax/servlet/jsp/JspWriter.java 29 Oct 2002 01:18:11 -0000 1.3 +++ jsr152/src/share/javax/servlet/jsp/JspWriter.java 24 Mar 2003 22:35:14 -0000 @@ -165,10 +165,9 @@ /** * Print a boolean value. The string produced by <code>[EMAIL PROTECTED] - * java.lang.String#valueOf(boolean)}</code> is translated into bytes - * according to the platform's default character encoding, and these bytes - * are written in exactly the manner of the <code>[EMAIL PROTECTED] - * #write(int)}</code> method. + * java.lang.String#valueOf(boolean)}</code> is written to the + * JspWriter's buffer or, if no buffer is used, directly to the + * underlying writer. * * @param b The <code>boolean</code> to be printed * @throws java.io.IOException If an error occured while writing @@ -177,10 +176,9 @@ abstract public void print(boolean b) throws IOException; /** - * Print a character. The character is translated into one or more bytes - * according to the platform's default character encoding, and these bytes - * are written in exactly the manner of the <code>[EMAIL PROTECTED] - * #write(int)}</code> method. + * Print a character. The character is written to the + * JspWriter's buffer or, if no buffer is used, directly to the + * underlying writer. * * @param c The <code>char</code> to be printed * @throws java.io.IOException If an error occured while writing @@ -190,10 +188,9 @@ /** * Print an integer. The string produced by <code>[EMAIL PROTECTED] - * java.lang.String#valueOf(int)}</code> is translated into bytes according - * to the platform's default character encoding, and these bytes are - * written in exactly the manner of the <code>[EMAIL PROTECTED] #write(int)}</code> - * method. + * java.lang.String#valueOf(int)}</code> is written to the + * JspWriter's buffer or, if no buffer is used, directly to the + * underlying writer. * * @param i The <code>int</code> to be printed * @see java.lang.Integer#toString(int) @@ -204,10 +201,9 @@ /** * Print a long integer. The string produced by <code>[EMAIL PROTECTED] - * java.lang.String#valueOf(long)}</code> is translated into bytes - * according to the platform's default character encoding, and these bytes - * are written in exactly the manner of the <code>[EMAIL PROTECTED] #write(int)}</code> - * method. + * java.lang.String#valueOf(long)}</code> is written to the + * JspWriter's buffer or, if no buffer is used, directly to the + * underlying writer. * * @param l The <code>long</code> to be printed * @see java.lang.Long#toString(long) @@ -218,10 +214,9 @@ /** * Print a floating-point number. The string produced by <code>[EMAIL PROTECTED] - * java.lang.String#valueOf(float)}</code> is translated into bytes - * according to the platform's default character encoding, and these bytes - * are written in exactly the manner of the <code>[EMAIL PROTECTED] #write(int)}</code> - * method. + * java.lang.String#valueOf(float)}</code> is written to the + * JspWriter's buffer or, if no buffer is used, directly to the + * underlying writer. * * @param f The <code>float</code> to be printed * @see java.lang.Float#toString(float) @@ -232,10 +227,9 @@ /** * Print a double-precision floating-point number. The string produced by - * <code>[EMAIL PROTECTED] java.lang.String#valueOf(double)}</code> is translated into - * bytes according to the platform's default character encoding, and these - * bytes are written in exactly the manner of the <code>[EMAIL PROTECTED] - * #write(int)}</code> method. + * <code>[EMAIL PROTECTED] java.lang.String#valueOf(double)}</code> is written to + * the JspWriter's buffer or, if no buffer is used, directly to the + * underlying writer. * * @param d The <code>double</code> to be printed * @see java.lang.Double#toString(double) @@ -245,10 +239,9 @@ abstract public void print(double d) throws IOException; /** - * Print an array of characters. The characters are converted into bytes - * according to the platform's default character encoding, and these bytes - * are written in exactly the manner of the <code>[EMAIL PROTECTED] #write(int)}</code> - * method. + * Print an array of characters. The characters are written to the + * JspWriter's buffer or, if no buffer is used, directly to the + * underlying writer. * * @param s The array of chars to be printed * @@ -261,9 +254,8 @@ /** * Print a string. If the argument is <code>null</code> then the string * <code>"null"</code> is printed. Otherwise, the string's characters are - * converted into bytes according to the platform's default character - * encoding, and these bytes are written in exactly the manner of the - * <code>[EMAIL PROTECTED] #write(int)}</code> method. + * written to the JspWriter's buffer or, if no buffer is used, directly + * to the underlying writer. * * @param s The <code>String</code> to be printed * @throws java.io.IOException If an error occured while writing @@ -273,10 +265,9 @@ /** * Print an object. The string produced by the <code>[EMAIL PROTECTED] - * java.lang.String#valueOf(Object)}</code> method is translated into bytes - * according to the platform's default character encoding, and these bytes - * are written in exactly the manner of the <code>[EMAIL PROTECTED] #write(int)}</code> - * method. + * java.lang.String#valueOf(Object)}</code> method is written to the + * JspWriter's buffer or, if no buffer is used, directly to the + * underlying writer. * * @param obj The <code>Object</code> to be printed * @see java.lang.Object#toString() @@ -411,7 +402,7 @@ * method will not throw an IOException if the buffer has already been * flushed. It merely clears the current content of the buffer and * returns. - * + * * @throws IOException If an I/O error occurs */ Index: jsr152/src/share/javax/servlet/jsp/el/ExpressionEvaluator.java =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/el/ExpressionEvaluator.java,v retrieving revision 1.8 diff -u -r1.8 ExpressionEvaluator.java --- jsr152/src/share/javax/servlet/jsp/el/ExpressionEvaluator.java 4 Mar 2003 00:17:05 -0000 1.8 +++ jsr152/src/share/javax/servlet/jsp/el/ExpressionEvaluator.java 24 Mar 2003 22:35:14 -0000 @@ -67,21 +67,26 @@ * <p>An instance of the ExpressionEvaluator can be obtained via the * JspContext / PageContext</p> * - * <p>The parseExpression() and evaluate() methods must be thread-safe. That is, - * multiple threads may call these methods on the same ExpressionEvaluator - * object simultaneously. Implementations should synchronize access if - * they depend on transient state. Implementations should not, however, - * assume that only one object of each ExpressionEvaluator type will be - * instantiated; global caching should therefore be static.</p> + * <p>The parseExpression() and evaluate() methods must be thread-safe. + * That is, multiple threads may call these methods on the same + * ExpressionEvaluator object simultaneously. Implementations should + * synchronize access if they depend on transient state. Implementations + * should not, however, assume that only one object of each + * ExpressionEvaluator type will be instantiated; global caching should + * therefore be static.</p> + * + * <p>Only a single EL expression, starting with '${' and ending with + * '}', can be parsed or evaluated at a time. EL expressions + * cannot be mixed with static text. For example, attempting to + * parse or evaluate "<code>abc${1+1}def${1+1}ghi</code>" or even + * "<code>${1+1}${1+1}</code>" will cause an <code>ELException</code> to + * be thrown.</p> + * + * <p>The following are examples of syntactically legal EL expressions: * - * <p>For JSP EL expressions, an expression string without '${' and '}' - * tokens is considered to be a static string. One or more occurrences - * of '${' and '}' can be used in the expression string to delimit - * dynamic expressions. Examples: * <ul> - * <li><code>${lastName}</code></li> + * <li><code>${person.lastName}</code></li> * <li><code>${8 * 8}</code></li> - * <li><code>Version ${major}.${minor}</code></li> * <li><code>${my:reverse('hello')}</code></li> * </ul> * </p> @@ -99,23 +104,21 @@ * @param expectedType The expected type of the result of the evaluation * @param fMapper A FunctionMapper to resolve functions found in * the expression. It can be null, in which case no functions - * are supported for this invocation. The FunctionMapper will be - * invoked one or more times between parsing the expression and - * evaluating it, and must return a consistent value each time - * it is invoked. - * @param defaultPrefix The default prefix to use when a function is - * encountered with no prefix, or "" if the default is no prefix. - * If the value null is provided, an ELException will be thrown if - * a function call is encountered with no prefix. This is useful - * for situations where a function must have a prefix. + * are supported for this invocation. The ExpressionEvaluator + * must not hold on to the FunctionMapper reference after + * returning from <code>parseExpression()</code>. The + * <code>Expression</code> object returned must invoke the same + * functions regardless of whether the mappings in the + * provided <code>FunctionMapper</code> instance change between + * calling <code>ExpressionEvaluator.parseExpression()</code> + * and <code>Expression.evaluate()</code>. * @return The Expression object encapsulating the arguments. * * @exception ELException Thrown if parsing errors were found. */ public abstract Expression parseExpression( String expression, Class expectedType, - FunctionMapper fMapper, - String defaultPrefix ) + FunctionMapper fMapper ) throws ELException; @@ -131,15 +134,7 @@ * runtime to resolve the name of implicit objects into Objects. * @param fMapper A FunctionMapper to resolve functions found in * the expression. It can be null, in which case no functions - * are supported for this invocation. The FunctionMapper will be - * invoked one or more times between parsing the expression and - * evaluating it, and must return a consistent value each time - * it is invoked. - * @param defaultPrefix The default prefix to use when a function is - * encountered with no prefix, or "" if the default is no prefix. - * If the value null is provided, an ELException will be thrown if - * a function call is encountered with no prefix. This is useful - * for situations where a function must have a prefix. + * are supported for this invocation. * @return The result of the expression evaluation. * * @exception ELException Thrown if the expression evaluation failed. @@ -147,8 +142,7 @@ public abstract Object evaluate( String expression, Class expectedType, VariableResolver vResolver, - FunctionMapper fMapper, - String defaultPrefix ) + FunctionMapper fMapper ) throws ELException; } 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.6 diff -u -r1.6 BodyTag.java --- jsr152/src/share/javax/servlet/jsp/tagext/BodyTag.java 29 Jan 2003 21:42:13 -0000 1.6 +++ jsr152/src/share/javax/servlet/jsp/tagext/BodyTag.java 24 Mar 2003 22:35:15 -0000 @@ -113,7 +113,8 @@ * tag handler implements the TryCatchFinally interface; see that * interface for details. * <p> - * <IMG src="doc-files/BodyTagProtocol.gif"/> + * <IMG src="doc-files/BodyTagProtocol.gif" + * alt="Lifecycle Details Transition Diagram for BodyTag"/> * * <p><B>Empty and Non-Empty Action</B> * <p> If the TagLibraryDescriptor file indicates that the action must 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.5 diff -u -r1.5 IterationTag.java --- jsr152/src/share/javax/servlet/jsp/tagext/IterationTag.java 29 Jan 2003 21:42:13 -0000 1.5 +++ jsr152/src/share/javax/servlet/jsp/tagext/IterationTag.java 24 Mar 2003 22:35:15 -0000 @@ -86,7 +86,8 @@ * details. * * <p> - * <IMG src="doc-files/IterationTagProtocol.gif"/> + * <IMG src="doc-files/IterationTagProtocol.gif" + * alt="Lifecycle Details Transition Diagram for IterationTag"/> * * <p><B>Empty and Non-Empty Action</B> * <p> If the TagLibraryDescriptor file indicates that the action must Index: jsr152/src/share/javax/servlet/jsp/tagext/SimpleTagSupport.java =================================================================== RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/SimpleTagSupport.java,v retrieving revision 1.5 diff -u -r1.5 SimpleTagSupport.java --- jsr152/src/share/javax/servlet/jsp/tagext/SimpleTagSupport.java 29 Jan 2003 21:42:13 -0000 1.5 +++ jsr152/src/share/javax/servlet/jsp/tagext/SimpleTagSupport.java 24 Mar 2003 22:35:16 -0000 @@ -76,10 +76,10 @@ private JspTag parentTag; /** The JSP context for the upcoming tag invocation. */ - protected JspContext jspContext; + private JspContext jspContext; /** The body of the tag. */ - protected JspFragment jspBody; + private JspFragment jspBody; /** * Sole constructor. (For invocation by subclass constructors, @@ -144,7 +144,7 @@ * * @return the page context for this invocation */ - public JspContext getJspContext() { + protected JspContext getJspContext() { return this.jspContext; } @@ -165,7 +165,7 @@ * @return the fragment encapsulating the body of this tag, or * null if this tag has a body content type of empty. */ - public JspFragment getJspBody() { + protected JspFragment getJspBody() { return this.jspBody; } 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.5 diff -u -r1.5 Tag.java --- jsr152/src/share/javax/servlet/jsp/tagext/Tag.java 18 Dec 2002 18:35:37 -0000 1.5 +++ jsr152/src/share/javax/servlet/jsp/tagext/Tag.java 24 Mar 2003 22:35:16 -0000 @@ -102,7 +102,8 @@ * to exception handling and resource management. * </ul></p> * - * <IMG src="doc-files/TagProtocol.gif"/> + * <IMG src="doc-files/TagProtocol.gif" + * alt="Lifecycle Details Transition Diagram for Tag"/> * * <p>Once all invocations on the tag handler * are completed, the release method is invoked on it. Once a release 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.5 diff -u -r1.5 TagInfo.java --- jsr152/src/share/javax/servlet/jsp/tagext/TagInfo.java 10 Jan 2003 18:17:02 -0000 1.5 +++ jsr152/src/share/javax/servlet/jsp/tagext/TagInfo.java 24 Mar 2003 22:35:18 -0000 @@ -241,8 +241,7 @@ /** * The name of the Tag. * - * @return The (short) name of the tag, or null - * if not defined. + * @return The (short) name of the tag. */ public String getTagName() { 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.7 diff -u -r1.7 VariableInfo.java --- jsr152/src/share/javax/servlet/jsp/tagext/VariableInfo.java 10 Jan 2003 18:17:02 -0000 1.7 +++ jsr152/src/share/javax/servlet/jsp/tagext/VariableInfo.java 24 Mar 2003 22:35:19 -0000 @@ -119,7 +119,8 @@ * a picture: * * <p> - * <IMG src="doc-files/VariableInfo-1.gif"/> + * <IMG src="doc-files/VariableInfo-1.gif" + * alt="NESTED, AT_BEGIN and AT_END Variable Scopes"/> * *<p> * The JSP 2.0 specification defines the interpretation of 3 values: @@ -141,7 +142,7 @@ * * <blockquote> * <table cellpadding="2" cellspacing="2" border="0" width="55%" - * bgcolor="#999999"> + * bgcolor="#999999" summary="Variable Synchronization Points"> * <tbody> * <tr align="center"> * <td valign="top" colspan="6" bgcolor="#999999"><u><b>Variable Synchronization
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]