Welcome to my blog

I blog my interests and opinions here.

Friday, January 7, 2011

Java Server Faces (JSF) 2.0

The advent of Java Server Faces (JSF) 2.0 has made the life of the UI developer very much easier. A simple JSF would have very minimal files namely XHTML files, a Java bean to hold properties and a web.xml file. Usage of ManagedBean annotations has helped to avoid creating and managing faces-config.xml. Bringing about XHTML files rather than JSP files has created a clear separation of logic between the page designer and the Java Developer. A simple hello world JSF project would have the following files -
1. Hello.xhtml - A well formed XHTML file that contains the JSF tags
2. web.xml - The web descriptor specifies the faces servlet and XHTML contexts
3. HelloBean java bean - A simple Java bean with the "ManagedBean" annotation that holds the properties

All the latest developments on JSF are available in the Mojarra project at http://javaserverfaces.java.net

No comments:

Post a Comment