226 WCTME: Application Development and Case Study
We updated the imports section of the Web application’s manifest file to record
our dependencies on those bundles and Java classes.
After updating the servlet logic to connect to the bundles, the same code from
our tester bundle, to see the init() method, and to access the other bundles
appropriately when the application’s buttons are selected, see doGet(), and then
adding the login and configure panels, we have a completed sample application
in stand-alone mode.
7.5 Running the completed Web application
You can now run the completed sample application. Navigate into the
ITSORentalsWebApplicationBundle project and select the
CheckInAndSync.java file, right-click and select Run on Server....
See section 2.2, “Running the sample application” on page 25 on steps for
running the sample application.
Note: The steps to synchronize the application’s local database tables with the
sync server will be added in Chapter 10, “DB2e synchronization” on page 271.
The implementation of the device management service will not be covered until
Chapter 11, “Device management” on page 317.
7.6 Troubleshooting
This section covers various tips on how to handle some problems you might run
into, as well as ways to extend the testing of the application.
If when you start the sample application the Web paged does display, make sure
you select the Java servlet file CheckInAndSync when you select Run on
Server. The web application URL is:
http://localhost:(port)/ITSORentals/CheckInAndSync
For a PocketPC, use this Web address:
http://127.0.0.1/ITSORentals/CheckInAndSync
To avoid conflicts, make sure to stop any other Web servers, bundle servers and
runtimes that might be competing for the same ports.
When running the application, the console will display any exception that the
application might throw. For example; before the first sync or creation of sample
Chapter 7. HTTP services, servlets and Java server pages 227
data, the getPendingCustomers() and getArrivedCustomers() calls will throw
exceptions because the database tables do not exist yet.
228 WCTME: Application Development and Case Study

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.