NetBeans contains several sample web applications. To use a sample application, you must
create a new Web project with the framework that uses the application, and then connect the
project to the sample database if one is provided.
Updates to the IDE might include new sample databases and sample applications for web
devlopment. After an update, to see if there are new sample applications, choose File >
New Project to open the New Project wizard, and then choose Samples > Web to see the
list of sample applications in the right pane.
In the Services window, choose Databases > Java DB > Start Server.
For troubleshooting, see
Creating a Sample Application
Choose File > New Project.
The New Project Wizard opens.
In the Categories pane of the
New Project Wizard, expand the Samples node and select Web.
Select the sample project from the Projects pane and click Next to continue.
Note: Visual Web is a subcategory.
Type the name of the project in the Project Name field.
The IDE suggests a name that you can edit.
Based on the project name, the IDE suggests the Project Location and Project Folder. You
can change the project location
The IDE creates a folder name based on the information you enter.
Click Finish to create the project.
Connecting to a Java DB Database
Make sure that the Java DB Database is running.
In the , expand the Databases node , right-click the database you want to access, and
choose Connect.
Enter the User ID and Password.
For Java DB databases included with the Sun Java System Application Server 9, the
password is the same as the user ID. For example, for the Travel database the username
and password are both travel.
The IDE connects the database, making the data accessible.
Viewing Data in a Database
Connect to the database.
Expand the database-name node.
Expand the Tables folder and select the item you want to view.