JSF started its journey from version 1.0 and now it has come to the latest version of JSF is 1.2.
JSF started its journey from version 1.0 and now it has
come to the latest version of JSF is 1.2. The listing of versions released so
far are :
- JSF 1.2 (11 may 2006) -
Latest release of JSF specification.
- JSF 1.1 (27 may 2004) -
Bug fix release. No specification changes. No HTML renderkit changes.
- JSF 1.0 (11 mar 2004) -
Initial release of JSF specification.
There are many releases of 1.1 and 1.2 and these
are listed below showing released date also:
- 1.2_04 P01 (20 Mar 2007)
(5 Mar 2007)
(25 Aug 2006)
(14 July 2006)
(24 Apr 2006)
(07 Sep 2004)
The JSF specification was developed under the Java
Community Process (JCP) as JSR 127, which released JSF 1.0
and 1.1, and JSR 252 which released JSF 1.2. The first
release of JSF is JSF 1.0 in 2004. JSF 1.0 supports servlet 2.3 and
jsp 1.2. After JSF 1.0, JSF 1.1 was released. The main purpose of this
release was bug-fixing. There were no specification or HTML renderkit changes. This
version also works with same version of servlet 2.3 and jsp 1.2 as
in the case of JSF 1.0.
JSF 1.1_01 release features bug fixes and
performance improvements. Improvements include compression of views
serialized to the client, failover support when storing views on the server,
renderer fixes, and several other bug fixes and enhancements.It supports JDK
1.3.1 or later. Many bugs have been fixed so if your application
depends on one of these bugs, it needs to be changed.
JSF 1.2 is the latest release and
it works with servlet 2.5 and jsp 2.1. If you want to run JSF
1.2 on Tomcat, you want 6.0 not 5.5. So
JSF needs a web container that supports atleast servlet 2.3 and jsp 1.2 and
these are part of J2EE 1.3.
New in JSF 1.2
In this section we will go through some new features and changes in JSF 1.2
specification. JSF 1.1 was designed for JSP 1.2 and so could not take advantage
of newer JSP features and JSP could not be changed to fill the needs of JSF.
This resulted in a number of new features and changes. For ex.
- Unified Expression Language(EL) :
Unified EL has been added to JSTL to overcome problems when integrating JSP
EL with the JSF EL.EL was used to access data objects in a simple way. It is
used mainly as a short-hand for accessing values. Later it was included in
JSP 2.0 with more functionality.When JSF was released it also needed EL.JSF
and JSP each has its own EL.The JSP EL is much flexibile to the web
application developer but JSF people were unsatisfied by the JSP EL.One of
the reason was that it requires JSP engine to evaluate expression at the
appropriate time during the lifecycle, but JSP expressions are evaluated
immediately. The second reason behind it was that JSP functions could only
call static methods in TLD and they cannot be used to invoke public methods
dynamically on server side objects during lifecycle to validate data and
handle component evevts.
So these were the reasons for developing such an EL that would work for both
JSP and JSF and make using JSP and JSF together easier. This new EL is
called unified EL. So this was inspired by EL used in JSTL and JSP. There is
a package "el" in javax package that represents EL.
In addition to the features already available in the JSP EL, unified EL has
the following features :
1. Deferred evaluation of expressions i.e.evaluation of the expression
at the appropriate time during the page lifecycle from JSP engine.
2. Support for expressions that can set and get values
3. Support for expressions that can invoke methods.
4. A pluggable API for resolving expressions
- Ajax Support :
JSF framework can make things a little easier to write AJAXian JSF
components.JSF allows to map different instances of the FacesServlet with
different lifecycles.For example, one mapping for standard JSF requests and
another for AJAX JSF requests.
- New Tree Creation and Content Interweaving Model
for Faces applications that use JSP :
We can make JSF application without using any JSP page but it can also
be developed using both JSP and JSF.Using JSP makes some developers easy to
handle.Sometimes When integrated it did not respond as we expect. These
problems have been resolved in JSF 1.2.There have been made some changes in
specification of the implementation of the FacesViewHandler for JSP and JSP
custom tag base class.
- Integration with JSTL :
Using JSTL's <c:forEach> tag to contain Faces input components was
one of the problem, because JSP has no notion of a postback, it was not
possible to apply the values correctly to the nested input components on
postback. Some new concepts in EL make it possible to use this tag fully
with any kind of JSF component.
- Back Button issues and Multi Frame or Multi
Window Faces Apps :
JSF have fixed the problem related to Multi Frame or Multi Window
applications.The browser back button also created some problems. These
problems were because of deficiency in the State Management API.
- Associating a message with a particular component
in the page :
Previously we could not include label of a component dynamically in an
error message for that component. Now it's possible in new JSF 1.2.It's also
possible to override the conversion or validation message that is displayed
to the user on a per-instance basis.
- Expose an application wide ResourceBundle to the
<resource-bundle> element in faces-config allows listing many
resource bundles that should be exposed to the EL using the new ELResolver
chain.This optimize performance and prevent the need to create a
ResourceBundle for every request.
- Use of multiple renderKits.
- Provide XML Schema for the config files, instead
of using DTD.
- Security enhancements for client side state
- Solve the "duplicate button press"
- The portlet related bug-fixes.
JSP 2.1 is developed under JSR-245 and JSF
1.2 is developed under JSR-252. These two groups have experts and
they are working independently but the main focus of development was to provide
more support and compatibility between these two technology that are powerful
web presentation technology so that they can be useful for each other.