|The JavaServer Faces specification version 1.1 was released May 28, 2004. Does this mean that the JavaServer Faces book is now obsolete, since it’s written for the 1.0 version of the specification?|
The 1.1 version of the specification is what’s formally called a “maintenance release”, but between you and me, “bug fix release” would be a more appropriate label in this case. Most of the changes are corrections of things that were clearly wrong in the 1.0 spec, such as copy/paste errors in JavaDocs method descriptions, descriptions of behavior that didn’t match the Reference Implementation (RI), and descriptions of behavior that resulted in invalid HTML (such as multiple HTML elements with the same
There are, however, a few details (primarily in the Appendices) that are affected by JSF 1.1 and a few things about the JSF 1.1 RI that you should be aware of. They are described below.
Default error messages
The JSF 1.1 RI includes the component client ID in the default error messages, so the message shown in Figure 7-1 looks slightly different. This is a change that isn’t described in the specification so other implementations may not support the message text parameter needed for this to work (which arguably means that the RI isn’t spec-compliant). Including a component identifier in the error messages is a good idea, but the client ID is a very poor identifier, because it can’t be localized and it’s typically a string that the end user doesn’t understand (such as “_id1:_id2”). A future version of the JSF specification will likely address the need for localizable, user friendly component identifiers in the standard messages in a much better way.
Part 4 of my JSP 2.0 article series is now available on OnJava.com. It describes two new, simpler ways to develop tag handlers: tag files and the simple tag handler API.
A new version (1.0.1) of the JavaServer Faces examples is now available. It contains a work- around for a JSF RI bug that caused the custom ViewHandler examples to fail when accessed through Internet Explorer. See the release notes in the examples ZIP file for details.
Part 3 of my JSP 2.0 article series is now available on OnJava.com. It discusses improvements and new features for JSP pages as XML documents.
In preparation for the release of my latest book, JavaServer Faces, I’ve renamed and rearranged the content on this site a bit. The new official URL is www.hansbergsten.com. The old www.TheJSPBook.com URL will also point to this site for some time, but it will eventually be deactivated. If you link to the site, please change your link URLs.
The site now contains information about all my books, recent articles, consulting services, and references to many other useful server-side Java resources. Please let me know if you have suggestions about other information or features for this site.
|In a JSP 2.0 container, such as Tomcat 5, my EL expressions in template text and action element attributes are not evaluated, they are used as-is instead. For instance:
is rendered as:
What have I missed?
The EL evaluation is disabled for a web application with a Servlet 2.3/JSP 1.2 deployment descriptor (web.xml file) for backwards compatibility reasons.
You need to update the
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd" version="2.4"> ... </web-app>
As an alternative, you can enable EL evaluation of a page-by-page basis with the
The long awaited JavaServer Faces (JSF) 1.0 specification is finally available in its final form. JSF is the latest addition to the Java web tier technology toolbox, allowing you to use a design model similar to the one used for traditional GUI programming for web application development.
I contributed to the specification as a member of the JSF “expert group” (EG) and have written a book about how to use this new and exciting technology. The book is scheduled for release late April 2004, and you can pre-order it now at Amazon.com and other online book stores.