In this tutorial, you will use the NetBeans IDE to create and run a simple Web application, the Hello Web. This sample application requires you to enter a name and then use that name to display a message. First, you need to use an input box to implement this page. You can then replace the input box with a drop-down list with the user's choice of name. The name entered in the Drop-down list comes from the database table.
This tutorial requires support for the following technologies and resources
JavaServer Faces component/java EE Platform |
1.2 with Java EE 5*1.1 with EE 1.4 |
Travel Database (installed) |
Need |
* To take full advantage of the performance of Java EE 5 in NetBeans 6.0, use an application server that is fully applicable to the Java EE 5 specification, such as the Sun Java System Application Server 9 (GlassFish Mesh).
If you are using the MySQL database, see the FAQ in NetBeans IDE 6.0 to open the MySQL sample database Tavel get the appropriate instructions.
This tutorial is made in accordance with specifications for the use of GlassFish v2 application Server. If you are using a different server, refer to the publish documentation and FAQs for known issues and working backgrounds. For more information about supported servers and the Java EE platform, see Publishing a document.
Tutorial Requirements
Before you begin, make sure you have checked the requirements for this section.
The software required for this tutorial
Before you start, you need to install the software on your computer:
NetBeans IDE 6.0 with Web and Java EE features (includes web and Java EE and all versions of downloads).
Create a project
From the main menu, select File > New item.
In the New Project Wizard, select Web from the list, and then select Web Application from the projects lists. Click "Next".
Name the project Helloweb and then click Next.
Select the Visual Web JavaServer Faces Framework and click Finish.
Your project will be created and the initial page (Page1) opens in the visual designer. Design a page
Before you begin, please design a page as shown in the following figure.
Design of Figure 1:page1