Working with Web Applications

The following table shows how to work with web applications.

Number one
Create project
  1. Register the target server for your application.
  2. Create the project using the best template for your programming needs. While creating the project, you can let the IDE include libraries and configuration files for JavaServer Faces, Struts, Spring, or Visual Web JavaServer Faces.
  3. Configure the classpath for the project. You can add a JAR file, a library, or an IDE project to the classpath.

Number two
Create web components
  1. Choose File > New File or right-click any project and choose New > Other.
  2. Under Categories, select Web. Under File Type, select the web component that you would like to create.
  3. Click Next and follow the instructions in the wizard.

Number three
Edit web components
  1. In the Projects window or Files window, double-click the web component that you would like to edit.
  2. Use the Source Editor to edit the web component.

Number four
(optional)
Add components from palette

  1. If you are using Visual Web JavaServer Faces, drag a component from the Palette and drop it in the Visual Designer.
  2. To edit the component, click the Java button above the current page or double-click the background of the page to open the Source Editor.

Number five
(optional)
Connect to database
  1. If the database connection is not visible in the  right click the Databases node and choose New Connection, and then add the database connection in the New Database Connection dialog box.
  2. If the database node is broken, right-click the node and choose Connect, and then connect to the database.
  3. If you are using Visual Web JavaServer Faces, open the Tables node and then drag a table from the database connection to the Visual Designer.
  4. You can customize the default query by double clicking table-nameRowSet in the   to use the Visual SQL Editor.
  5. In the Visual SQL Editor, create the SQL query.
  6. If you are using Visual Web JavaServer Faces , in the Visual Designer, right-click the component and choose Bind to Data.
  7. In the Bind Data dialog box, choose the data provider and data field to bind to the component.

Number six
(optional)
Create and connect multiple pages
  1. If you are using Visual Web JavaServer Faces, in the Visual Designer, right-click and choose Page Navigation.
  2. In the Page Flow editor, right-click and choose New Page to create the destination page.
  3. Click the source page to display its components.
  4. In the source page, click the component that triggers the navigation and drag the connector to the destination page.

Number seven

Deploy application
  1. Choose Run > Run Main Project or right-click any project and choose Run.

Number eight
Debug web application
  1. Set breakpoints or watches in your code.
  2. Choose Run > Debug Main Project or right-click any project and choose Debug Project. You can also attach a running process to the debugger.
  3. Step through the program execution.
  4. Choose Run > Finish Debugger Session when you are finished debugging.

Legal Notices