Java Server Faces (JSF) is one of the presentation web frameworks in java. There is lots of others frameworks like Spring, GWT, Wickets, Struts. Today this post we ll discuss why JSF is more important then others.Here I am not criticize any frameworks. i just talking about JSF.  


In JSF 1.2 and previous version of JSF used JSP as a view declarative language and JSP life cycle is not matched with JSF and ajax requests. JSF 1.2 are complex to use and they have some short coming in feature.

But JSF 2 is completely changed the adapt lots of technologies, but still its support backward compatible.Its very easy to learn. More over JSF is center piece in Java EE 6 Spec. It means that what are the new components or specification introduced in Java EE 6 are seamlessly integrated into JSF. Because those components spec is designed for JSF in mind.


New Components / Specification added in Java EE6 spec

  • CDI 1.0 (Contexts and Dependency Injection)
  • Bean Validation 1.0
  • Java Persistence API 2.0
  • EL 2.2 (Expression Language)

Above spec is added in Java EE 6 and well integration with JSF. JSF comes with basic components of HTML User Interface (UI). JSF is extensible. So with help of third party libraries like PrimeFaces, IceFaces, ADF Faces, ...   gives Rich UI.

When JSF 2 spec is gives direct competition to other web frameworks. JSF derive lots of good feature from Spring, GWT, Seam Framework.

 Why should I learn JSF

  • JSF spec is controlled by JCP (Java Community Process) and its standard for Java EE server
  • There is no vendor locking, because JSF is spec, we can use any implementation of JSF, for example MojarraMyFaces are JSF2.0 implementation.
  • JSF is part of Java EE 6. so when your server is Java EE 6 compliant server. then its must support JSF 2. so no need to configure externally and no need to put web framework jar in class path.
  • In Java CDI is direct compete with DI in Spring and Guice in Google . In JSF 2 Navigation Component is compete with Spring Web Flow. JSF 2's Ajax Framework components compete with GWT. so what i conclude here, each and every component is good/best
  • In JSF 2 is easy to implement with help of annotation. Annotation is makes all configuration files are optional. No more XML. Now Spring start supporting annotation instead of XML configuration.
  • Java EE components like CDI, Bean Validation, JPA are standardized and used in Enterprise Level and Java SE also. But other frameworks components are de-facto standard.



  • Java EE 5 had a big gap for enterprise application so we need those frameworks to fill the gap. but Java EE6 mostly fill the gap. If your working in Java EE 5 compliant server then you should go with those frameworks.  
  • If you take case study of JPA, before JPA come into picture, EJB 2.1 use persistent entity classes for persistent. its very difficult to study. Then Spring comes with easy solution POJO class used for persistent.  then JPA comes with improved solution with help of annotation. Now JPA is standard for all ORM libraries like Hibernate, EclipseLink,  etc.. Now EJB 3.1 uses JPA 2.0 is persistent purpose.
  •  Now Spring start support for CDI, Bean validation and other components in Java EE 6
  • Even you can easily integrate JSF pages in Spring 
If anything i mentioned wrong please put your thought in comments.


Please Check  Understanding Java Server Faces 2.0 Part 1
                                     Understanding Java Server Faces 2.0  Part 2