Press enter to see results or esc to cancel.


JSF Helloworld Netbeans IDE – JSF Tutorial Part 1

Download the project shown in Youtube here.

JSFHelloWorld1

This tutorial shows step by step process how to Start with Java Server Faces. JSF Helloworld program with Netbeans IDE.

  1. 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/
  2. After Installation go on to File > New Project.
    Select Category as Java Web and Project as Web Application. Then Click Next.
  3. Enter The Project name, Select Location and Project Folder. Then Click next.
  4. Select Server and Then Click next.
  5. Finally Select the Framework as Java Server Faces and Click Finish.
  6. The project will be created as shown below. It will have default index.xhtml also.
  7. index.xhtml

    <?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>
    
  8. Now to run the Project. Just right Click on Project and Click Run.
  9. index.xhtml after Running the Project
    http://localhost:8080/JSFHelloWorld1/faces/index.xhtml
  10. Download the Project here.

    JSFHelloWorld1
    

Comments

Leave a Comment