JSF 2 RichFaces 4 Example

RichFaces is an UI component framework for integrating Ajax capabilities into JSF web applications. In this tutorial, we are going to use some of RichFaces features in a JSF 2 web application to build a registration form.   1. Technologies used JSF…

JSF 2 Hello World using Maven

JavaServer Faces (JSF) is a standard Java framework for building user interfaces for Java Web applications. It combines an MVC design approach with a standard component based UI development framework. In this tutorial, we will create our first JSF 2 application using…

Spring Security Resources Access Control

In this example, we will use Spring Security to secure application resources so they can be accessed only by users with the required authorities. The resources, in our case, will be XHTML pages.   1. Technologies used Spring Security 3.2.5.RELEASE JSF 2.2.8 MySQL…

JSF2 CommandButton Example

In this example, we will see how to add an HTML button in a JSF page using the tag <h:commandButton ../>   1. Project structure   2. The JSF pages We will add three buttons in the entering page : A submit button…

Spring Security Authorize Tag Example

  In Spring Security, the authorize tag is used to secure resources inside the JSP pages, like buttons, labels, links,.. In this example, we will add an HTML link to a JSP page and we will use the authorize tag to…

JSF2 Password Field Example

  In this example, we will see how to add a password field in a JSF page using the <h:inputSecret ../>  tag. Password field is similar to text field,  the difference is that the characters in the password field are masked (shown…

JSF 2 InputText Example

  In this example, we will see how to add an input text in a JSF page using the <h:inputText ../>  tag.   1. Project structure   2. JSF pages We will add an inputText and link it to the name…

JSF 2 Navigation Rules Example

  In this example, we will see how to define navigation rules using the faces-config file and annotations. We will implement the following navigation rules : Access to the index page : If the name value is different from ‘walid‘, then go to error…

JSF 2 Spring Hibernate Example

  In this example, we will see how to integrate JSF 2, Spring IoC, Spring Security and Hibernate in a simple web application. The application will provide : registration page to add new users, login page to perform authentication and…

JSF 2 Implicit Navigation

  In a JSF 2 application, the navigation rules are used to describe which view to render when a button or a link is clicked, they can be defined either in faces-config.xml or in managed beans. We can also implement…