JavaServer Faces (JSF) is a Java-based Web application framework intended to simplify development integration of web-based user interfaces.
New Features
- View Declaration Language with Facelets – Templating support
- Easy creation of custom components
- Ajax
- Expand the request processing lifecycle to be aware of Ajax. http://www.jsfmatrix.net/
- State Saving
- Separate the “build the tree” and “render the tree” processes into two separate lifecycle phases.
- Allow for partial tree traversel during lifecycle execution via Ajax.
- Performance
- New scopes
- Flash Scope
- View Scope
- No configuration needed – Magic of Annotations
- Managed Bean Annotations
- Component Annotations
- Improved Validation
- Validationgroups
- Implicit Navigation
- Strategic additions to the Standard HTML RenderKit: Date Picker, Tree, Tab View, File Upload components.
- Provide a mechanism to minimize the “Lost Update” and “Duplicate Button Press” problems. These mechanisms must be pluggable or customizable from the user.
JSF vs. Servlets/JSP
The MVC Architecture
- Bad JSP design
Many books or articles on Java-based Web frameworks start with this example:
<h1>Tiny bit of HTML</h1> <% Java Java Java More Java %> <h1>Tiny bit of HTML</h1>
Then, they redo the example using the framework and comment on how much better it is.
- This proves nothing
- MVC
A fair comparison is to look at the use of the framework vs. the use of MVC with servlets and JSP
A Quick Review of MVC
Advantages of JSF
vs. MVC Using RequestDispatcher
- Custom GUI controls
JSF provides a set of APIs and associated custom tags to create HTML forms that have complex interfaces
- There are many extra-rich third-party JSF libraries
- Event handling
JSF makes it easy to designate Java code that is invoked when forms are submitted. The code can respond to particular buttons, changes in particular values, certain user selections, and so on.
- Managed beans
In JSP, you can use property=”*” with jsp:setProperty to automatically populate a bean based on request parameters. JSF extends this capability and adds in several utilities, all of which serve to greatly simplify request param processing.
- Integrated Ajax support
You can use jQuery, Dojo, or Ext-JS with servlets and JSP. However, JSF lets you use Ajax without explicit JavaScript programming and with very simple tags. Also, the Ajax calls know about the server-side business logic.
vs. Standard MVC
- Form field conversion and validation
JSF has builtin capabilities for checking that form values are in the required format and for converting from strings to various other data types. If values are missing or in an improper format, the form can be automatically redisplayed with error messages and with the previously entered values maintained.
- Centralized file-based configuration
Rather than hard-coding information into Java programs, many JSF values are represented in XML or property files. This loose coupling means that many changes can be made without modifying or recompiling Java code, and that wholesale changes can be made by editing a single file. This approach also lets Java and Web developers focus on their specific tasks without needing to know about the overall system layout.
- Consistent approach
JSF encourages consistent use of MVC throughout your application.
Disadvantages of JSF
vs. MVC with RequestDispatcher
- Bigger learning curve
- To use MVC with the standard RequestDispatcher, you need to be comfortable with the standard JSP and servlet APIs. To use MVC with JSF, you have to be comfortable with the servlet API and a large and elaborate framework that is almost equal in size to the core system.
- Similarly, if you have an existing app and want to add in some small amounts of Ajax functionality, it is moderately easy with jQuery (quite easy if you know JavaScript already). Switching your app to JSF 2.0 is a big investment.
- Worse documentation
Compared to the standard servlet and JSP APIs, JSF has fewer online resources, and many first-time users find the online JSF documentation confusing and poorly organized. True for both Mojarra and MyFaces
vs. Standard MVC
- Less transparent
With JSF applications, there is a lot more going on behind the scenes than with normal Java-based Web applications. As a result, JSF applications are:
- Harder to understand
- Harder to benchmark and optimize
- Undeveloped tool support
There are many IDEs with strong support for standard servlet and JSP technology. JSF 2.0 is pretty new, and IDE support is weak as of 5/2010.
- Rigid approach
The flip side of the benefit that JSF encourages a consistent approach to MVC is that JSF makes it difficult to use other approaches.

The second part will include an overview of the study tasks for the project. Iyana Other
See our Software for Kazakh Language Learning Reading this introduction to Yiddish will help you get an overview of the language you are learning. Custom Wholesale
See our Software for Bengali Language Learning Read our introduction to Farsi if you want an overview of the language you’re learning. Files Protectors
See our Software for Azerbaijani Language Learning If you want an overview of the language that you are learning, read our introduction to Kazakh. Early Learning Wholesale
where is the jsf 2.0 introduction and overview ?
where is the jsf 2.0 introduction and overview ?
See our Software for Kazakh Language Learning Reading this introduction to Yiddish will help you get an overview of the language you are learning. Alena Strings
I randomly browse blogs on the internet, and I discover your article to be very informational. I have already bookmark it on my browser, so that I can view your blog submit again later. Also, I’m wondering whether or not your weblog is open for hyperlink alternate, as I really need to trade links with you. I do not usually do this, but I hope that we can have a mutual hyperlink exchange. Let me know and have a great day!
Nice article.
looks very interesting for me.
Hello webmaster I like your post ….
Is it me or did this article make you want to buy an iPad?
Baby bears, called cubs, are born in a den
See our Software for Azerbaijani Language Learning If you want an overview of the language that you are learning, read our introduction to Kazakh. File Conversion Wholesale