JSTL 1.2 MR2 Errata - October 3, 2006


Please send feedback to kin-man.chung@sun.com and jan.luehe@sun.com.

The following is a list of corrections to the JavaServer PagesTM Standard Tag Library 1.2 Maintenance Release 2 (JSTL 1.2 MR2) specification (dated May 8th, 2006), with the intent to bring the JSTL 1.2 MR2 specification into alignment with the JSTL 1.2 MR2 implementation and TCK. This errata does change the intent of the JSTL 1.2 MR2 specification, and all issues will be incorporated into the JSTL 1.2 MR2 Rev A specification.

This errata has been created according to the Maintenance step of the JCP process, and will be posted for a 30 day public review before being declared final.

The errata starts with a list of all issues. Each issue is then described in more detail, and a resolution is given. All references are to the JSTL 1.2 MR2 specification.

Issues Summary

Issue 1: Alignment with Unified Expression Language
Issue 2: Generification of javax.servlet.jsp.jstl.tlv.ScriptFreeTLV.setInitParameters
Issue 3: Miscellaneous changes

Issue 1: Alignment with Unified Expression Language

In order to accommodate the Unified Expression Language (EL) developed by the JSR 252 (JavaServerTM Faces 1.2) and JSR 245 (JavaServerTM Pages 2.1) Expert Groups, adjustments had been made to the API classes supporting JSTL's <c:forEach> and <c:forTokens> tags in time for the JSTL 1.2 MR2 public review.

Unfortunately, after the public review period for JSTL 1.2 MR2 ended on September 26th, 2005, the Unified EL was further refined, requiring the following additional changes to the JSTL 1.2 MR2 APIs:

  1. javax.servlet.jsp.jstl.core.StringTokenValueExpression

    This class has been removed. It was never supposed to have been exposed as a public interface. Instead, it was supposed to have provided an implementation, with package private scope, of how string tokens that are passed as deferred expressions work with <c:forTokens>. This class never handled all cases of string tokens correctly, and its functionality is now covered by the more generic javax.servlet.jsp.jstl.core.IteratedValueExpression.

  2. javax.servlet.jsp.jstl.core.IteratedExpression

    The constructor of this class takes an additional parameter named delims of type java.lang.String:

      public IteratedExpression(javax.el.ValueExpression orig, java.lang.String delims)
    
    which specifies the delimiter that should be used to separate any tokens in case the given javax.el.ValueExpression evaluates to a String. The new delims parameter to the constructor is also stored in an instance variable of the same name with protected visibility:
      protected final String delims;
    
  3. javax.servlet.jsp.jstl.core.LoopTagSupport

    A new method with the following definition and default implementation has been added to this class:

        /**
         * Get the delimiter for string tokens. Used only for constructing
         * the deferred expression for it.
         */
        protected String getDelims() {
            return ",";
        }
    

Issue 2: Generification of javax.servlet.jsp.jstl.tlv.ScriptFreeTLV.setInitParameters

Appendix B.1 mentions that javax.servlet.jsp.jstl.tlv.ScriptFreeTLV.setInitParameters leverages J2SE 5.0 generics, but this change was actually never reflected by the API itself. In order to do so, the signature of this API has been modified from

  public void setInitParameters (java.util.Map initParms)
to
  public void setInitParameters (java.util.Map<java.lang.String, java.lang.Object> initParms)

Issue 3: Miscellaneous changes

  1. Several places in the JSTL 1.2 MR2 specification still refer to Appendix A for the definition of the Expression Language (EL).

    This made sense in JSTL 1.0, when Appendix A covered the EL syntax, but from JSTL 1.1 onwards, Appendix A has covered backwards compatibility issues, and the definition of the EL has moved into the JSP specification. The introduction to Chapter 3 of the JSTL 1.2 MR2 specification already reflects this change. Notice that as a result of moving the specification of the EL from the JSTL to the JSP specification, it has become the JSP container's responsibility to enforce the syntax of EL expressions.

    Incorrect references to Appendix A are being removed from the following places in the JSTL 1.2 MR2 specification:

    • Section 2.7:

      Change:

      All syntax errors (as defined in the syntax section of each action, as well as the syntax of EL expressions as defined in Appendix A) must be reported at translation time.
      

      to:

      All syntax errors as defined in the syntax section of each action must be reported at translation time.
      
    • Section 4.3:

      Change:

      If the type of the value to be set does not match the type of the bean property, conversion is performed according to the conversion rules defined in the expression language (see Section A.7)
      

      to:

      If the type of the value to be set does not match the type of the bean property, conversion is performed according to the EL conversion rules.
      
  2. Sections 2.8 and 4.3: The word coersion should read coercion.

  3. Section 4.3: Syntax 5 of the <c:set> action is missing an optional scope attribute, whose value must be equal to page. The amended syntax definition, which is already implemented by the RI and tested by the TCK, reads as follows:
    Syntax 5: Set a deferred value
         <c:set var="varName" value="deferred-value" [scope="{page}"]/> 
    
  4. Section 15.4, Null & Error Handling:
    If substring is null, it is processed as an empty string.
    
    should read:
    If suffix is null, it is processed as an empty string.