Find JSRs
Submit this Search


Ad Banner
 
 
 
 

JSP 2.1 Change Logs: Part I: JSP

JSR 245 JavaServerTMPages JSP 2.1 Maintenance Review 2 Part I

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

This is a maintenance review for JSR-245, JavaServerTM Pages 2.1 Specification (JSP 2.1). There are two parts in the MR, Part I covers the JSP specification, and part II covers the Expression Language specification.

The main goal for this part of the maintenance review is is to introduce minor enhancements to JSP, to add clarifications, and to fix errors in the examples.

Proposed Changes

1. Minor Feature Enhancements

  • Add JSP.3.3.9 Declaring Default Content Type

    The JSP configuration element default-content-type can be used to specify the default contentType property of a group of JSP pages defined using the jsp-property-group element.

    The valid values for the default-content-type element are those of the contentType attribute of the page directive. It specifies the default contentType for the response if the page directive does not include a contentType attribute.

  • Add JSP.3.3.10 Setting Default Buffer Size

    The JSP configuration element buffer can be used to specify the default buffering model for the initial out JspWriter for a group of JSP pages defined using the the jsp-property-group element.

    The valid values for the buffer element are those of the buffer attribute of the page directive. It can be used to specify if buffering should be used for the output to Response, and if so, the size of the buffer to use.

  • Add JSP.3.3.11 Raising Errors for Undeclared Namespaces

    Currently, if a tag with an unknown namespace is used in a JSP page it is silently ignored, causing much confusion to page authors. To make the mistakes obvious, this JSP configuration element can be used to force an error when an unknown namespace is used in a JSP page, as is already the case for JSP documents (XML syntax).

    The error-on-undeclared-namespace element is a subelement of jsp-property-group (See 3.3.1). It has no subelements. Its valid values are true and false, with false being the default. If it is set to true, then an error must be raised during the translation time, when an undeclared tag is used in a JSP page.

  • Table JSP.5-7 Attributes for the standard action, add a new attribute omit

    Optional boolean attribute. Can be request-time expression. Defaults to false. This attribute is ignored if <jsp:attribute> is used inside a standard or custom action. If the <jsp:attribute> is used inside a <jsp:element>, and if the value of this attribute evaluates to true, then the attribute specified by the <jsp:attribute> is omitted from the output of the tag element constructed by the enclosing <jps:element>.

2. Clarifications

  • JSP.3.3

    The page-encoding and is-xml properties in a property group are applied to each JSP file matched by its URL pattern.

  • JSP.5.1

    In <jsp:useBean>, the inspection of the object needs to be done synchronized only for application or session scopes.

  • JSP.5.6

    In <jsp:include> or <jsp:forward>, the additional parameters specified in the action are added in the order of appearance.

  • Table JSP.8-3 Description for deferredValueType

    Removed the sentence "Defaults to java.lang.String if not specified."

  • Table JSP.8-4

    In a tag file, a variable alias must be unique.

  • Part II, javax.servlet.jsp.tagext package description
    A tag handler with an empty body must not reuse any previous tag handler with a non-empty body.

3. Errors

  • Part II, javax.servlet.jsp.tagext package description, "Invocation of a JSP fragment", step 1, second to last sentence

    Change "the scoped attribute is removed from the tag file's page scope" to "the scoped attribute is removed from the calling page's page scope".

  • JSP.8.3

    Change <%attribute ... > to <%@ attribute ... >.

    Change <%taglib ... > to <%@ taglib ... >.

  • JSP.10.3.3, JSP.10.3.4, and JSP.10.3.5

    Fixed errors in the examples.

  • JSP.1.12.2

    Fixed an error in the example.