The Artima Developer Community
Leading-Edge Java | Discuss | Print | Email | First Page | Previous | Next
This article is sponsored by the Java Community Process.

Leading-Edge Java
JSF and JSP: What's New in Java EE 5
A Conversation with Ed Burns and Jan Luehe
by Frank Sommers
May 17, 2006

Page 1 of 3  >>


Ed Burns is co-specification lead for JSR 252, JavaServer Faces 1.2, and Jan Luehe leads JSR 245, Java Server Pages 2.1. Artima interviewed the two spec leads on April 14, 2006, and then in a subsequent email exchange, about new JSF and JSP features included in Java EE 5. Burns and Luehe discuss the JSP and JSF common expression language, AJAX, and the role annotations play in dependency injection.

Frank Sommers: What are the new features in the latest JSP and JSF specifications?

Ed Burns: The main theme of Java EE 5 is ease of development, and the key new JSP and JSF features echo this desire. Both technologies evolved over many years, and what you see now in the current specification versions is the result of that evolution.

Before delving into the details of new JSP and JSF features, it might help your readers if I explained a bit the history of these specs. JSP [together with the Servlet API] was one of the earlier specifications, starting sometime around the year 2000, but the technology predated that initial JSR. At that time, the specs were defining Servlet 2.3 and JSP 1.2, and would then become part of J2EE 1.3.

JSF 1.0 came out around February of 2004 as an independent technology [of J2EE], and it relied on Servlet 2.3 and JSP 1.2. JSF defined a standard UI model for the Web. Many people confuse it with an application framework, but it's really a component framework. Components have properties, methods, and events, and that's what JSF brings to Web programming.

JSF 1.0 had important innovations to deliver on its own schedule. JSF 1.1 was mainly a bug- fix release [Editor's note: also developed as JSR 127] and worked with the same version of the Servlet API as JSF 1.0 did. The first version of the JSF spec to be included in Java EE is the current version, JSF 1.2, and it works with Servlet 2.5 and JSP 2.1, which are also part of Java EE 5.

While it may be confusing at first to look at these version changes, it helps in understanding how JSP and JSF technologies evolved relatively independently until recently. The main thrust of the current JSF and JSP specs has been the desire the align these technologies. That's in keeping with the Java EE 5 theme of ease of development, and the JSF and JSP expert groups worked very hard together to ensure that the resulting specs make it easier to work with JSF and JSP together.

At the heart of the JSP-JSF alignment is a unified expression language. JSP included an expression language since the 1.2 version, but because these technologies have different purposes—for instance, JSP and JSF component life cycles are different—their respective expression languages did not align well with each other. Although part of the JSP 2.1 release, the unified expression language now has its own specification, and we can imagine uses of this expression language outside of JSF as well.

Jan Luehe: We also added features to align these specs with other parts of Java EE 5. Again, here the chief goal was to provide greater development ease. We now have annotations that can potentially reduce the amount of code a developer has to write. For instance, you can use annotations to specify dependency injection in servlets now. JSPs can take advantage of the entire Java EE 5 persistence model as well.

Page 1 of 3  >>

Leading-Edge Java | Discuss | Print | Email | First Page | Previous | Next

This article is sponsored by the Java Community Process.

Sponsored Links

Copyright © 1996-2018 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use