Backward Compatibility of Gassfish with JSF 1.0 Applications

One of the goals of JSP 2.1 is to provide a unified expression language (EL) for JSP and JSF. One key feature of the unified EL is the introduction of deferred expressions. Deferred expressions was first used in JSF 1.0, which used the syntax #{...} to represent a deferred expression. The same syntax is used in JSP 2.1, to ease migration of JSF 1.0 and JSF 1.1 applications to JSF 1.2, bundled in Glassfish.

Additionally, it is imperative that a JSF 1.0 applications can be deployed without modification in Glassfish. A JSF 1.0 application typically runs with JSP version 2.0 or earlier. In JSP 2.0, specifying a "#{...}" as a tag attribute has no special meaning, and the literal string is passed to the tag handler without any processing by the container. In contrast, in JSP 2.1, the compiled version of "#{...}" is passed to the tag handler. To maintain backward compatibility, the JSP container in Glassfish must handle "#{...}" in a JSF 1.0 application as a literal.

Fortunately for us, there is a required "jspversion" tag in the tag library descriptor (TLD) for a tag handler. Based on jspversion in the TLD, the container can then decide to either compile the deferred expression, or to pass the string unchanged.

All this has been working in Glassfish up to build 32 (the one the appserver 9.0 beta was based). Unfortunately, a regression was introduced in b34 which causes the container to (wrongly) issue an error when encountering "#{...}" in a tag attribute. This has been fixed b36.

Comments:

Post a Comment:
Comments are closed for this entry.
About

kchung

Search

Top Tags
Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks