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? |
Answer: 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 id attribute value). The rest are clarifications of details that were underspecified in the 1.0 specification, which are important for JSF implementors but not so important for JSF application developers (the target group for the book).I discovered and reported many of these errors while writing the book, and therefore described the features as they should be rather than how the 1.0 specification incorrectly described them. The book therefore already covers most of the JSF 1.1 changes.
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 messagesThe 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. New
|
Author Archives: hans
My JSF book available on Safari
JavaServer Faces is now available online as part of O’Reilly’s Safari Bookshelf service.
JSP 2.0 article, part 4, on ONJava.com
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.
JavaServer Faces examples updated
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.
JavaServer Faces book available
My JavaServer Faces is now released and for sale in bookstores and online at sites like Amazon.com and Barnes & Noble. See this page for details.
JSP 2.0 article, part 3, on ONJava.com
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.
Site and URL changes
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.
Why isn’t my EL expression evaluated?
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:
${now.time} is rendered as: ${now.time} What have I missed? |
Answer: 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 |
JavaServer Faces 1.0 released
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.
3rd Edition at Safari
JavaServer Pages, Third Edition is now available online as part of O’Reilly’s Safari Bookshelf service.