130 IBM Workplace Forms: Guide to building and integrating a sample Workplace Forms application
4.9 Creating JSPs
In the following discussion, we show you how to create the JSPs.
4.9.1 Where we are in the process: Building Stage 1 of the base scenario
Figure 4-50 is intended to provide an overview of the key steps involved to build the base
scenario. This focuses on building the Form, the Servlet, and the JSPs.
Figure 4-50 Overview of major steps involved in building the core base scenario application
Java Server Pages (JSP)s allow you to develop dynamic, content driven Web pages that
separate the user interface (UI) from constantly changing data that may be generated from an
external source. JSP tags can be combined with HTML to allow you to format the appearance
of the content on the Web page.
For the example used in this stage of the Redbook, you will need to create 3 JSPs namely:
index1.jsp, dirlisting1.jsp and success1.jsp. You can use any Web application development
tool such as Rational® Application Developer (RAD), Eclipse or DreamWeaver in order to
create these JSPs. All the JSPs contained here were created using RAD and subsequently all
the screen-shots will have a RAD context.
index1.jsp
The index1.jsp is the main entry point and navigation page for the Web application that your
sales team will use as a launching point to access all the forms that they need to initiate or
complete a sale as well as to see all the data associated with their customers.
Employees, Managers, and Directors are able to see unique views to all the forms that are
stored on the file system — new orders, any items in their own workbasket that require review
and approval, all approved forms, and all forms that have been rejected or cancelled.
-Designing the
layout
-Layout and input
items
-Calculations and
logic
-Adding to the
data model
-Security
Access Level
buttons
-- Forms access
buttons
Building and
Designing
Form
Template
1
2
3
Building the
JSPs
Building the Base Scenario – Stage 1
Building the
Servlet
Chapter 4. Building the base scenario: Stage 1 131
Figure 4-51 shows what the final page is going to look like. You can change the HTML layout,
stylesheet, and graphics to suit your own taste. The important functionality, however, is
contained in the buttons that you see on the page.
Figure 4-51 index1.jsp
Important: In order to run this Web application on WebSphere Application Server
correctly, you will need to save all the JSPs to the root WebContent directory and not in
the WEB-INF directory. All graphics and cascaded style-sheets should be stored in a
directory called themes, also in the root.
132 IBM Workplace Forms: Guide to building and integrating a sample Workplace Forms application
1. Using your Web application development tool create a new JSP file, name it index1.jsp,
and save it to the root
WebContent directory (Figure 4-52).
Figure 4-52 New JSP creation
2. In the <HEAD> section of the JSP file, give the path to the cascaded style-sheet you will
use for the page in the <LINK href=”theme/...> section and enter the <TITLE> as
Sales
Homepage
as shown in Example 4-19.
Example 4-19 Coding example (<TITLE> = Sales Homepage)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM Software Development Platform">
<META http-equiv="Content-Style-Type" content="text/css">
<LINK href="theme/blue.css" rel="stylesheet" type="text/css">
<TITLE>Sales Homepage</TITLE>
</HEAD>
<
3. Next, in the <BODY> section, you will create some tables to display:
a. Logo graphics
b. Security access level buttons
c. Form access buttons

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.