In this example, we will be developing JSF Hello World example application in NetBeans IDE. This example illustrates how to print hello world in JSF application using NetBeans IDE. NetBeans IDE provides simple way to create and test web applications. Its provides standardized directory structure to create the project artifacts such as jsp pages, xml pages, java classes etc.
Steps to create JSF Hello World Example:
1. Go to your project and right click on "Web Pages" folder.
2. The select "New" option and and click on "JSP..." as shown below.
Creating new JSP page in NetBeans IDE
Now it will open a jsp page where you can write your code. For this example, we will use code given in HelloWorld.jsp as below.
Source code of HelloWorld.jsp
Now you need to run the application to see the output for the code written above. The following steps can be used to run the JSF application in NetBeans IDE.
OR, Run the above file by using Shift + f6 keys on keyboard. The output is shown on the browser like below:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: June 10, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles