182 IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines
6.4.2 Presentation layer
In this section we describe how you configure and test the presentation layer of
our sample application.
HTML client
1. Configuring the HTML client.
First, create the servlets needed and then configure them by performing the
following tasks:
a. Expand the BaseSampleWeb project. Right-click the Java Resources
folder and select New Package to create a new package named
com.ibm.btt.samples.appl.
b. Right-click the com.ibm.btt.samples.appl package and select New
Class to create a Java class named StartServerServlet.
For the source code, refer to the Appendix (Appendix A, “Branch
Transformation Toolkit development and runtime requirements” on
page 477 and Appendix B, “Setting up a Branch Transformation Toolkit
sample application” on page 493).
c. Copy the bttevent.jar file from the BaseSample project to the
/WebContent/WEB-INF/lib folder of the BaseSampleWeb project.
d. Configure the project to fix the compile errors. Right-click the project and
choose Properties from the pop-up menu to open the Properties window.
e. Select Java JAR Dependencies from the left panel and check
BTTFormatterEJB.jar, BaseSampleEJB.jar, BaseSampleProcess.jar,
BaseSampleProcessEJB.jar, and UserDefineJar.jar from the list. See
Figure 6-47 on page 183.
Chapter 6. Post-migration activities 183
Figure 6-47 Java JAR depencies for BaseSampleWeb
f. Select Java Build Path from the left panel and select the Libraries tab.
Click Add Variable and select WAS_EE_V51 from the list. Click Extend
and expand the Libraries folder. Select the following JAR files to add to
the build path. Click OK to close the window.
acwa.jar
•bpe.jar
distexcep.jar
•wsif.jar
See Figure 6-48 on page 184.
184 IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines
Figure 6-48 Java build partn for BaseSampleWeb
2. Edit the JSP files.
a. Expand the BaseSampleWeb project. Remove all the four JSP files, that
is, accountStatement.jsp, customerSearch.jsp, error.jsp, and txn.jsp
from the WebContent/jsp folder, and reorganize them in separate folders.
b. Within the WebContent/jsp folder, create new folders and new JSP files:
Create new folder startUp. Create new JSPs, that is, welcome.jsp and
errorpage.jsp.
For welcome.jsp:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="/WEB-INF/btt-html.tld" prefix="btt" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
Chapter 6. Post-migration activities 185
<btt:html>
<head>
<title>Welcome</title>
<META name="GENERATOR" content="IBM WebSphere Studio">
</head>
<body text=#ffffff bgColor=#3366ff
background="/BaseSampleWeb/jsp/images/back_interior.gif" >
<FONT face=Arial color=#ffffff size=5>Demo Bank - Welcome</FONT>
<br>
<br>
<HR>
<center>
<btt:form action="/prepareCustomerSearch">
<TABLE cellSpacing=0 cellPadding=0 width="60%" border=0>
<TBODY>
<TR>
<TD align=center><FONT face=Verdana color=#ffffff
size=1><html:submit property="Click to
start"/></FONT></TD></TR></TBODY></TABLE>
<BR>
<BR>
</center>
</btt:form>
<br>
<br>
</body>
</btt:html>
For errorpage.jsp:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Message Page</title>
<META name="GENERATOR" content="IBM WebSphere Studio">
</head>
<body BGCOLOR="#EEEEEE">
<h3 align=center>System Message</h3>
<P></P>
<P>You may go back and correct the application. If you have any
question, please call <B>99-9-999-999-9999</B> and we will be happy
to help you to take your application.</P>
</body>
</html>
Create a new folder customerSearchBP. Create new JSPs,
customerSearch.jsp, customerSearchList.jsp, and errorpage.jsp.
For customerSearch.jsp:
186 IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="/WEB-INF/btt-html.tld" prefix="btt" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<btt:html>
<head>
<title>Customer log on</title>
<META name="GENERATOR" content="IBM WebSphere Studio">
</head>
<body bgcolor="#3366FF" text="#FFFFFF"
background="/BaseSampleWeb/jsp/images/back_interior.gif" >
<btt:errors/>
<btt:form action="/customerSearchBP">
<br>
<br>
<center>
<table align="center" border="1" cellspacing="1" cellpadding="0"
width=60%>
<TR>
<TD height="40" bgcolor="#002184" width="40%"
align="center"><FONT face="Verdana" size="2"
color="#FFFFFF"><STRONG>Customer ID: </STRONG></FONT></TD>
<TD bgcolor="#0A35B8" align="center"><FONT face="Verdana"
size="2" color="#FFFFFF"><input type=text name="customerId"
value=""></FONT></td><td></TD>
</TR>
</table>
<BR>
<BR>
<table align="center" border="0" cellspacing="0" cellpadding="0"
width=60%>
<TR>
<TD align="center">
<FONT face="Verdana" size="1" color="#FFFFFF">
<input type=submit value="Search">
</FONT>
</TD>
</TR>
</table>
</center>
</btt:form>
<br>
<br>
</body>
</btt:html>

Get IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines 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.