190 IBM Workplace Forms: Guide to Building and Integrating a Sample Workplace Forms Application
5.5 Adjustments to JSPs for Stage 2
In this section we explain some adjustments to the JSPs for Stage 2.
5.5.1 Where we are in the process: Building Stage 2 of the base scenario
Figure 5-7 is intended to provide an overview of where we are within the key steps involved to
build Stage 2 of the base scenario. This focuses on adding storage capabilities to DB2,
incorporating Web services, modifying the JSPs, and adding an approval workflow.
Figure 5-7 Overview of major steps involved in building Stage 2 of base scenario application
5.5.2 Modifying the index.jsp
There are two additional buttons that you will need to add to the index.jsp in order to connect
to DB2:
1. All Orders (DB2): This button submits a request to the
db2listing.jsp, which returns all the
orders in the DB2 database.
2. My Orders (DB2): This button submits a request to the
db2listing.jsp, which returns only
the orders of the user making the request in the DB2 database.
-Creating tables
-Populating
tables
-Form pre-
population
-Extraction of
form data
-Reading form
data from DB2
DB2 / Data
Storage
1
2
3
Servlet
Access to
Forms
Building the Base Scenario – Stage 2
Web
Services
-Common
scenario for
web services
in forms
-Web Service
Development
-Web Service
Runtime
-Modifying
index1.jsp
-Creating
JSP to view
DB2 data
4
Adjustments
to JSPs
-Importing
WSDL file
-Calling Web
Services
5
Form pre-
population w/
Web
Services
6
Approval
Workflow
-Designing
-Workflow
Chapter 5. Building the base scenario: Stage 2 191
Figure 5-8 shows what the final JSP is going to look like.
Figure 5-8 index.jsp
These are the steps to add these buttons:
1. Open
index.jsp using your application development tool.
2. In the HTML for the Forms Access button table, add the code shown in Example 5-27.
Example 5-27 Code to add the DB2 buttons
<TR>
<TD>
<FORM method=get action="db2listing.jsp">
<INPUT type="submit" value="All Orders (DB2)">
</TD>
<TD><FONT size="-2">Use this option to show all DB2 orders</FONT>
</TD>
</FORM>
</TD>
</TR>
<TR>
<TD>
<FORM method=get action="SubmissionServlet">
<INPUT type="submit" value="My Orders (DB2)">
<INPUT type="hidden" name=action value="getJSP">
<INPUT type="hidden" name=jsp value="db2listing.jsp">
</TD>
<TD><FONT size="-2">Use this option to show all your orders from DB2</FONT>
</TD>
</FORM>

Get IBM Workplace Forms: Guide to Building and Integrating a Sample Workplace Forms Application now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.