200 WCTME: Application Development and Case Study
򐂰 Convert this Web application into a bundle
򐂰 Add the code that accesses the local database bundle, calls the local Web
service and sends an MQe message when the bus driver checks in the
customer.
7.4 Converting from a J2EE Web application to a bundle
In this section, we convert the J2EE Web application into a bundle. This will allow
the Web application to run as a true servlet in the SMF environment.
1. If WebSphere Studio Site Developer is not running, click Start
Programs IBM WebSphere Studio Site Developer 5.1.x.
2. Open the Web Perspective, or the SMF Perspective.
3. From the Project manager (or Package Explorer) view select File New
Other.
4. As in Figure 7-10 on page 201, select Extension Services Convert Web
to Extension Services Project and Click Next.
Chapter 7. HTTP services, servlets and Java server pages 201
Figure 7-10 Converting the Web project into a Web application bundle
5. As in Figure 7-11 on page 202, Select the project
ITSOCheckInAndSyncWebProject. Make sure to check the Copy before
creating box and enter the new name ITSORentalsWebApplicationBundle.
Click Next.
202 WCTME: Application Development and Case Study
Figure 7-11 Converting the Web project
6. In the Platform Profile field (Figure 7-12 on page 203) choose Extension
Services: jclFoundation (5.7.0.).
Chapter 7. HTTP services, servlets and Java server pages 203
Figure 7-12 Converting the Web project
7. Click Finish.
You might have noticed that you did not get to pick some other options that you
get when you create a bundle from scratch. We will need to add the other
required projects to the build path manually, but a bundle activator file was
created by default.
Before we fix the build path and add the remaining code to our application, we
need to run the generated bundle.
204 WCTME: Application Development and Case Study
8. Navigate into the ITSORentalsWebApplicationBundle project just created
and select the CheckInAndSync.java file, right-click and select Run on
Server.... See Figure 7-13.
Figure 7-13 Run on local server
9. On the Server Selection panel, we are going to Create a new server. In the
Server Type field, select the Extension Services, Local Server. Click
Finish.
Important: Stop the bundle server and the runtime if they are running.
Also, stop the WebSphere Test Environment server if it is still running

Get IBM Workplace Client Technology Micro Edition Version 5.7.1: Application Development and Case Study 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.