Adding iSeries Web components and standard HTML components to JSP pages

When you create JSP pages for a Web application, you can add iSeries Web components and standard HTML components to the pages for the fields and controls that are used in the Web interaction.

The following table shows the iSeries Web components and the equivalent standard HTML components that are supported for Web interactions in iSeries Web applications.

iSeries Web component HTML component supported for Web interactions
Button Submit Button
Check Box Check Box
Combo Box Drop-Down Box
Hyperlink -
Image -
Image Button -
Label -
Radio Button Group Radio Button
Selection Box List Box
Table (also used for subfiles) -
- Simple Table
Text Area Text Area
Text Entry Text Field
Before adding iSeries Web components or standard HTML components to a JSP page, you need to create a dynamic Web project that is used specifically for iSeries Web tools. See Creating a dynamic Web project for iSeries Web development for information about this task. When the dynamic Web project has been created, you can proceed to create a JSP file in it:
  1. Right-click the WebContent folder, select New > JSP File and enter a name for the JSP file in the File Name field.
  2. Click Finish to create the file. The JSP file is added to the WebContent folder and it also opens in the Page Designer editor. (The three tabs at the bottom of the editor view are Design, Source, and Preview.)
Note: All iSeries Web components, with the exception of the iSeries Table Web component, and all standard HTML components, must be contained within a form. The iSeries Table Web component needs to be outside of the form.

To insert a form at the cursor position on the JSP page, click the Palette tab in the frame on the right of the Web perspective, click the iSeries Web Components button, select Form from the list, and drag and drop it on the JSP page. (You can press CTRL+O to add a form to the page.)

Drag and drop iSeries Web components or standard HTML components on the JSP page

Drag and drop iSeries Web components or standard HTML components on the JSP page that is open in the Design view or the Source view as follows:

  1. When the JSP file is open in the editor view, and you have inserted a form on the JSP page, place your cursor within the form in the Design view, or between the FORM tags in the Source view. Note that you must place your cursor outside of the form if you are inserting an iSeries Table Web component.
  2. Click the Palette tab in the frame on the right of the Web perspective.
  3. Access the iSeries Web components by clicking on the iSeries Web Components drawer. Standard HTML components are available in the Form Tags drawer.
  4. Select an iSeries Web component or standard HTML component from the respective lists in the drawer, and drag and drop it on the JSP page.
  5. The Properties view should open at the bottom of the Web perspective. If not, select the Properties tab in that frame.
  6. Specify the properties for the iSeries Web component in the Properties view. Each iSeries Web component has specific tabs in the Properties view for its properties. See iSeries Web components for information about defining these properties.
Tip: You can also add an iSeries Web component or a standard HTML component at the cursor position in the Design view or the Source view of the JSP page by double-clicking the iSeries Web component or the HTML component in the menu.

Use the Insert menu to add standard HTML components

Use the Insert menu item to add standard HTML components to a JSP page opened in the Design view or the Source view as follow:

  1. When the JSP file is open in the editor view, and you have inserted a form on the JSP page, place your cursor within the form in the Design view, or between the FORM tags in the Source view.
  2. Select Insert > Form and Input Fields to open the standard HTML components menu.
  3. Select the standard HTML component that you want to insert on the JSP page, and click OK.
  4. The Properties view should open at the bottom of the Web perspective. If not, select the Properties tab in that frame.
  5. Specify the properties for the Web component in the Properties view. Each one has specific tabs in the Properties view for its properties.
Note: When you create a JSP page, the default workbench encoding is used for the page. When you insert an iSeries Web component, the following message appears:

It is recommended to use UTF-8 for encoding. Do you want to change it?

Select Yes to ensure that the page encoding and the charset values are changed to UTF-8. UTF-8 page encoding enables you to have globalization support in your Web application.