How To Create A Java Server Faces (JSF) Web Application

jsf-web-application-example

Hi, In this article, we will learn How to create a Java Server Faces (JSF) Web Application. In this example, we will learn How to create a JSF application, and also we will run to see that our application is up and running with the output of Hello From Facelets.

To Create This Java Server Faces Application We will use Netbeans IDE 8.2. you can choose any other Java IDEs. I am choosing this because this IDE already has Apache Tomcat 8.0.27 and GlassFish Server. We will use Apache Tomcat to run our application.

If You don’t have Netbean IDE 8.2 -> Click Here to Download – NetBeans IDE 8.2

Okay then let’s start.

1. Create A Project

Open NetBeans IDE and Click File -> New Project or Press cltr shift N.

001 - File new Project

 

2. Choose A Project

in this step, we will choose the Project as Java Web -> Web Application .

002 - Choose Project - Java Web - Web Application

3. Name and Location

In this step, we will name our project in Project Name, Choose The Project Location Where it will save and Choose What will be the Project Folder name. You can keep as Default It is.

003 - Name and Location - Project Name Project Location Project Folder

4. Server and Settings.

in this step, as we install NetBeans IDE 8.2 and it already has the Apache Tomcat 8.0.27 Installed. So we will choose this server and Java EE Version we will keep as the default.

004 - Server and Settings server java EE Version

5. Select Frameworks

In this step, we will choose our JavaServer Faces Framework for our application and as a Registered Libraries, we will choose JSF 2.2. Other things keep as default and click Finish to create our JSF web application.

005 - Frameworks JavaServer Faces JSF2.2

6. Finally, Run The Application

Click on your project and select Run.

006 - Project Run

here you can notice that Our Application Build Successfully and You can see the Tab for Apache Tomcat 8.0.27 and it’s Log also.

007 - Output .. Tomcat Log

Final Output Of Our JSF Hello From Facelets Application

final output hello from facelets

Booyah !!! So this is our application up and running. I hope it’s as simple as it is. If you have any trouble creating or building it up. Please comment below I would love to help you.

The next step is we will create another application that will use ManagedBean and JSF UI elements. Bookmark this website to practice more with practice house.

Thank You So Much !!!

Leave a Reply

avatar
  Subscribe  
Notify of