To open the Web Interaction wizard,
select the Web project folder, then click the Create or Modify a Web interaction icon
on the toolbar. If you have not defined run-time information in the
iSeries Web Tools Run-time Configuration wizard, you will receive a warning
message in the first page of the Web Interaction wizard.
When you start the
Web Interaction wizard you can specify multiple output pages when you select
the Generate output page option on the second page
of the wizard.
- Complete the first page of the wizard and click Next to
proceed to the page Specify the Input and Output Pages for your Web Interaction.
- For the input pages, you can either select the Generate
input page option or the Use input pages option.
If you select Generate input page, the
input page name that is to be generated appears in the field. The page name
is a combination of the Web interaction name plus Input.jsp.
For example, if the Web interaction name specified on the first page of the
wizard is cust, the input JSP file name is custInput.jsp.
If the input JSP file already exists in the Web project, a number is appended
to the JSP file name. In this example, the new input file name is custInput1.jsp.
If
you select Use input pages, the Add button
is enabled. Click Add to open the Input page dialog
box, expand the WebContent folder, select a JSP file
that you want to use as an input page, and click OK to
add the file name to the page in the wizard. Click Add for
each additional input JSP file that you want to specify.
- Select Generate output page.
The
output page that is to be generated appears in the field. The page name is
a combination of the Web interaction name plus Results.jsp.
If the Web interaction name is cust, the output JSP file
name is custResults.jsp. However, if custResults.jsp already
exists in the Web project, a number is appended to the JSP file name to become custResults1.jsp.
If custResults.jsp and custResults1.jsp already
exist in the Web project, then the JSP file name to be generated is custResults2.jsp,
and so on.
- Click Add to open the Output JSP File dialog
box, enter a name for the additional output JSP file and click OK to
add the file name to the page in the wizard.
Each file
name that you enter is checked to determine if it already exists in the Web
project. If you do not include the .jsp extension in the
file name, it is automatically added to the file name for you.
Click Add for
each additional output JSP file that you want to specify.
You can remove
or rename the output files that appear in the list by selecting the file name
to enable the Remove and Rename buttons.
If you click Rename, the Output JSP File dialog box
opens with the selected file name appearing in the field. Enter a new file
name and click OK to update the file name on the wizard
page. (You cannot rename the output file names to be generated if the list
of output files is based on output pages defined in a Web diagram.)
- Click Next to proceed through the pages
in the wizard and to specify the necessary options.
- When you reach the Design the Result Form page, the name
of the first output page that you are designing is above the Output parameters field.

This page contains
an output parameters area, a property values area with Page and Fields tabs,
and a preview area. See The result form for descriptions
of the fields and controls on this page of the wizard.
All of the parameters
that you specified on page 3 of the wizard as input and output, or output
only, are shown in the Output parameters area. If you specified a Java
bean for your interaction, the Java bean methods and properties you selected
appear in the Output parameters area. All of the parameters are selected
for inclusion on the page that the wizard will generate. Clear the check boxes
for any parameters that you want to exclude from the first output page that
is to be generated.
Important: - The properties on the Page tab are used to define
the properties for all of the output pages that are to be generated.
- Whether or not you select parameters for inclusion on this first output
page, you need to use this page to specify the Save to Session and Message
Controller properties that are on the Fields tab.
These properties, as well Name in session, are disabled
on subsequent Design the Result Form pages. Select the parameter in
the Output parameters area on the wizard page and then change the property
value for Save to Session or Message Controller,
if applicable. All other properties on the Fields tab
are available on subsequent Design the Result Form pages.
- Click Next to go to the Design the Result page
for the next output page that you specified.
As before,
the name of the output page that you are designing appears above the Output
parameters field.
The page properties on the Page tab
that are defined for the first output page to be generated, are applied to
all remaining output pages that are to be generated. As a result the page
properties are disabled for this output page and all remaining output pages.
- All of the parameters are selected for inclusion on the page. Clear
the check boxes for the parameters that you want to exclude from this output
page.
All properties on the Fields tab
for each of the parameters are also available except for the Save
to Session, Name in session, and Message
Controller properties.
- When you click Next on the last of the Design
the Result Form pages in the wizard, the Specify flow controller Information page
opens.
The default value in the Flow Controller column
for all of the parameters on the output pages is false. To
change the flow controller value for one of the output parameters, click the
row in the table containing the output parameter name and then click the button
in the row to open the Flow Control Specification window.

- Select true in the list to enable the Value and Output
JSP fields in this window.

See Understanding the Flow controller option for a description of the options.
If you specify
more than one output parameter as a flow controller, an error message appears
in the status area of the wizard page indicating that only one output parameter
can be used.
- Click Finish to create the Web interaction,
the JSP files with iSeries Web components, and Java classes used
to communicate with the program, procedure, or Java bean method and properties.
Tip: Each Web interaction is represented by
a .wit file in your Web project. To modify a
Web interaction, double-click the .wit file to
open the Web Interaction wizard and modify the settings for the interaction.
Restriction: The names of the PCML file and
the MPCML file generated by the Web Interaction wizard are the same as the
Web project name. For example, if the Web project name is
myproj,
then the PCML file that is generated is
myproj.pcml. Similarly,
the name of the MPCML file is
myproj.mpcml.
- If you create a new Web project and then import all of the files, including
the PCML and MPCML files, from another Web project, the name of the PCML and
MPCML files no longer match the name of the new Web project. As a result,
the Web application fails to run correctly. You must rename the PCML and MPCML
files to match the Web project name to resolve this problem.
- If you rename an existing Web project, be sure to rename the PCML and
the MPCML files to match the new Web project name.