Creating a Sample Visual Web JSF Application

See Also

The IDE 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.

This topic covers the following subjects:

   Setting up the IDE
   Creating a Sample Application
   Connecting to a Java DB Database
   Viewing Data in a Database

Setting up the IDE

  1. Ensure that a server is registered in the IDE
  2. In the Services window, choose Databases > Java DB > Start Server.

Creating a Sample Application

  1. Choose File > New Project.

    The New Project Wizard opens.

  2. In the Categories pane of the New Project Wizard, expand the Samples node and select Java Web (Visual JSF).
  3. Select the sample project from the Projects pane and click Next to continue.
  4. Type the name of the project in the Project Name field.

    The IDE suggests a name that you can edit.

  5. 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.

  6. Click Finish to create the project.

Connecting to a Java DB Database

  1. Make sure that the Java DB Database is running.
  2. In the , expand the Databases node Database node icon, right-click the database you want to access, and choose Connect.
  3. Enter the User ID and Password.
  4. The IDE connects the database, making the data accessible.

Viewing Data in a Database

  1. Connect to the database.
  2. Expand the database-name node.
  3. Expand the Tables folder and select the item you want to view.
  4. Right-click the item and choose View Data.

    The table or view opens in the Visual SQL Editor.

See Also
Adding a Database Connection
About Binding Components to Data
Adding a Database Table to a Visual Web JSF Page

Legal Notices