Download the project shown in Youtube here.
This tutorial shows step by step process how to Start with Java Server Faces. JSF Helloworld program with Netbeans IDE.
- First install NetBeans IDE in your windows PC. Visit this post to see how to install NetBeans IDE. https://chillyfacts.com/how-to-install-netbeans-ide-in-windows-pc/
- After Installation go on to File > New Project.
Select Category as Java Web and Project as Web Application. Then Click Next.
- Enter The Project name, Select Location and Project Folder. Then Click next.
- Select Server and Then Click next.
- Finally Select the Framework as Java Server Faces and Click Finish.
- The project will be created as shown below. It will have default index.xhtml also.
<?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html"> <h:head> <title>Facelet Title</title> </h:head> <h:body> Hello from Facelets </h:body> </html>
Now to run the Project. Just right Click on Project and Click Run.
index.xhtml after Running the Project
- Download the Project here.