R4R
Right Place For Right Person TM
 
R4R Java JSF

R4R
provide basic JSF Tutorials concept with JSF Examples . Through R4R you can develop JSF programming concept. R4R provide JSF Interview Questions with answers.R4R provide JSF Languages study materials in easy way.

JSF Tutorials

1.1    JSF Basic Tutorials

JSF Interview Questions with Answers

2.1    JSF Interview Questions And Answers
2.2    JSF Objective Questions And Answers
2.3    JSF Subjective Questions And Answers
2.4    JSF FAQS

Introduction To JSF
Java Server Faces or JSF for short is another new exciting technology for developing web applications based on Java technologies. This JSF Introduction section introduces you with cool JSF technology.

JSF Overview

JSF was developed by Java Community Process(JCP).This is a community of web application experts. These experts are from different groups like Jakarta Struts, Oracle, Sun, IBM, ATG etc. They all collectively worked together to take the best from existing technologies and removed problems.

JavaServer Faces,JSF?

Java Server Faces: JSF is a java based web application framework to simplify the user interface for JEE applications. JSF uses component-based approach instead of traditional request-driven MVC frameworks.

The User Interface state is persisted at the time of a new page request comes from the client and it will be restored when the request is returned back. JSF uses JSP technology for its display. JSF provides to configuration files, the XML schema instead of DTD. JSP provides the portlet related bug fixes.

JSF includes

the default set of User Interface components
state management
managed beans
Unified Expression Language for both JSP and JSF

 

 JSF releases?
JSF started its journey from version 1.0 and now it has come to its latest version JSF1.2. The listing of versions released so far is :

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)
1.2_04     (5 Mar 2007)
1.2_02   (25 Aug 2006)
1.2_01   (14 July 2006)
1.1_02   (24 Apr 2006) 
1.1_01   (07 Sep 2004)


JSF Features
JSF is a rich featured framework of JAVA technology. JSF provides a set of standard features that makes it a powerful and standard among the existing technologies available for the development of web application based on java technologies.

advantages of JSF?
The major benefits of JavaServer Faces technology are:
JavaServer Faces architecture makes it easy for the developers to use. In JavaServer Faces technology, user interfaces can be created easily with its built-in UI component library, which handles most of the complexities of user interface management.
Offers a clean separation between behavior and presentation.
Provides a rich architecture for managing component state, processing component data, validating user input, and handling events.
Robust event handling mechanism.
Events easily tied to server-side code.
Render kit support for different clients
Component-level control over statefulness
Highly 'pluggable' - components, view handler, etc
JSF also supports internationalization and accessibility
Offers multiple, standardized vendor implementations

 


Requirement of JSF to get started
?

Following things required for JSF:

JDK (Java SE Development Kit)
JSF 1.2
Application Server (Tomcat or any standard application server)
Integrated Development Environment (IDE) Ex. Netbeans 5.5, Eclipse 3.2.x, etc.
Once JDK and Application Server is downloaded and configured, one can copy the JSF jar files to JSF project and could just start coding. :-) If IDE is used, it will make things very smooth and will save your time.


 JSF architecture?


When it comes to Java programming, it is important to note that different sublanguages such as JDBC and JSF have different architectures. Knowing the architecture for the language you are writing in is a pretty basic set of facts that you need to know. You may need to take a Javascript for beginners course to get yourself up to speed. JSF has been built on the Model View Controller (MVC) framework and this allows for applications to be scaled better and has better maintainability. The JSF works with a framework that works well with Java Web and user interfaces that fit well within the MVC.

different kinds of Bean Scopes in JSF?
JSF supports three Bean Scopes...

Request Scope: The request scope is short-lived. It starts when an HTTP request is submitted and ends when the response is sent back to the client.
Session Scope: The session scope persists from the time that a session is established until session termination.
Application Scope: The application scope persists for the entire duration of the web application. This scope is shared among all the requests and sessions.
 

The main tags in JSF?
JSF application typically uses JSP pages to represent views. JSF provides useful special tags to enhance these views. Each tag gives rise to an associated component. JSF (Sun Implementation) provides 43 tags in two standard JSF tag libraries:
JSF Core Tags Library.
JSF Html Tags Library.
 

JSF life-cycle phases?
The six phases of the JSF application lifecycle are as follows (note the event processing at each phase):

1. Restore view
2. Apply request values; process events
3. Process validations; process events
4. Update model values; process events
5. Invoke application; process events
6. Render response


 

JSF Fits For Web Applications?
JSF has many advantages over other existing frameworks that makes it a better choice for Java web application development. Some of the reasons are below:

Easy creation of UI:
It makes easier to create complex UI for an applicaton using jsf tags.Its APIs are layered directly on top of servlet APIs that enables us to use presentation technology other than JSP,creating your own custom components and rendering output for various client devices.
Capacity to handle complexities of UI management:
It handles cleanly the complexities of UI management like input validation, component-state management, page navigation, and event handling.
Clean separation between presentation and logic:

One of the greatest advantage of jsf is to clearly separate behaviour and presentation in an application. JSF is based on the Model View Controller (MVC) architecture
Shorter development cycle:
This separation between logic and presentation enables a wide range of users( from web-page designers to component developers). It allows members of team to focus on their own work only , resulting in division of labour and shorter development cycle.
Standard Java framework:
JSF is a Java standard which is being developed through Java Community Process (JCP). Several prominent tool vendors are members of the group and are committed to provide easy to use, visual, and productive develop environments for JavaServer Faces.
An extensible architecture:
JSF architecture has been designed to be extensible.Extensible means additional functionality can be given on the top of JSF core i.e. we can customize the functionality. JSF UI components are customizable and reusable elements. You can extend standard components and create your own complex components like stylish calendar, menu bar etc.
Support for multiple client devices:
Component developers can extend the component classes to generate their own component tag libraries to support specific client. JSF flexible and extensible architecture allows developers to do so.
Flexible rendering model:
Renderer separates the functionality and view of the component. So we can create multiple renderers and give them different functionality to get different appearance of the same component for the same client or different .
International language support:
Java has excellent support for internationalization . It allows you to localize messages with user specific locale. A locale is a combination of a country, a language, and a variant code. Java Server Faces adopts this property and let you specify which locale your application supports. So you can display you messages in different languages.
Robust tool support:
There are several standard tool vendors like Sun Java Studio Creator who provide robust tools that take advantages of JSF to create server side UI easily.

 

 JavaServer Faces Application?
JavaServer Faces applications are just like any other Java web application. They run in a servlet container, and they typically contain the following:

.JavaBeans components containing application-specific functionality and data.
.Event listeners.
.Pages, such as JSP pages.
.Server-side helper classes, such as database access beans.
.In addition to these items, a JavaServer Faces application also has:
.A custom tag library for rendering UI components on a page.
.A custom tag library for representing event handlers, validators, and other actions.
.UI components represented as stateful objects on the server.
.Backing beans, which define properties and functions for UI components.
.Validators, converters, event listeners, and event handlers.
.An application configuration resource file for configuring application resources.
 

JSF Components
Components in JSF are elements like text box , button , table that are used to create UI of JSF Applications. These are objects that manage interaction with a user.


JSF Tags

JSF provides various tags for performing operations like JSF table tags, JSF listener and event tags, JSF converter tags, JSF validator tags, JSF ajax tag, etc.

JSF Listeners And Events

In JSF for event handling various built-in tags are provided. A user can use it for handling the events and listening the listener. For example, actionListener, valueChangeListener, setProperyActionListener, phaseListener, event.

Validation In JSF

In JSF to validate data various of built-in tags are provided. A user can use it for validating the data. For example, validateDoubleRange, validateLength, validateLong, validateRegex, validateRequired etc. A user can create its own validatior using Validator interface and @FacesValidator.

JSF Integration


JSF can be integrated with other frameworks like, Spring, JDBC etc.

Download JSF

You can download JSF from the following link
http://javaserverfaces.java.net/download.html.
 


Tolal:0 Click:
Show All Comments

Post Your Comments

Your Name:

Your Email ID :
Comments :
URL
  =* Enter SUM

Tutorials,Examples,Questions and Answer

R4R
R4R
R4R
R4R
R4R
R4R
R4R
R4R