ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

Monitoring Applications with Palm OS & Tomcat

by Derek Ferguson

In this article, I will teach you a little bit about how Expand Beyond Corp. uses Java and the Palm operating system to build a system that allows our clients to monitor and manage their mission-critical systems from virtually anywhere in the world.

I'll begin by talking about our choice of the Palm Operating System as our client platform, and introduce you to Palm Query Applications. After that, we'll move across the network to the server side, to look at the Java that needs to run on the application server to support the wireless monitoring and management of mission-critical systems. I'll show you how to install and configure Tomcat. Then we'll finish up with an example of how to use a wireless handheld to remotely start an Oracle "listener," a vital part of most mission-critical database applications.

Gentlemen, start your emulators!

At the moment, Expand Beyond's software runs on Palm OS, though we are porting it to other platforms, including PocketPC. Since Palm's operating system still holds nearly three-fourths of the PDA market, it's a good starting platform for any wireless software organization.

To develop a client-side application for Palm OS, you must first have a Palm OS-based device at your disposal for testing purposes. If you want to save yourself the expense of purchasing such a device, you are in luck: Palm distributes a free software emulator in the developer section of its Web site.

Screen shot of emulator.
Figure 1.

You will also need to download the ROMs, which is slightly more involved, since you have to register and wait a couple of business days. Once you have the emulator up and running on your system, it should look like Figure 1.

And now, as I would say to my 15-month old daughter, Elizabeth, "You try!" In this section, we will create the user interface for our listener-starting application and examine it using the Palm OS Emulator (POSE).

All about Web Clipping markup

Modern PalmOS handheld devices connect to the Internet primarily through use of a technology called Web Clipping. Web Clipping can be thought of as traditional Web browsing, with two important differences:

  • It supports only a small subset of HTML, and
  • Some content is pre-loaded on the client.

Web Clipping doesn't support client-side scripting or binary content (such as applets), nested tables, or extensive control over fonts.

Web Clipping documents must include certain meta tags to let client devices know these pages are safe for Palm consumption. Code Listing 1 shows the markup that we will use for our client application. For further information about syntax, see the Web Clipping documentation on Palm's Web site.

  <title>Start Listener</title>
  <meta name="PalmComputingPlatform" content="true">
  <meta name="PalmLauncherRevision" content="1.0">
  <form method="post" action="http://www.pocketdba.com/starter">
  <input type="hidden" name="command" value="lsnrctl">
  <input type="submit" value="Start the Listener">

We're going to first save that code as an HTML file, and then save it with other relevant files into a Palm Query Application, or .pqa file. Then we'll install the PQA file onto our device.

To create the PQA file from the code listing above, follow these steps.

Emulator screen shot.
Figure 2.

  1. Download and install the Web Clipping Application Builder tool from the Developer's Tool section of the Palm OS Web site.

  2. Save the code from Listing 1 to a text file named index.html.

  3. Start the WCA Builder tool, open the File menu, and choose Open Index.

  4. Select the index.html file you created in Step 2.

  5. Open the File menu and select Build PQA.

  6. Enter a name for the PQA and click on Build.

At this point, you are ready to start the Palm OS emulator and load your Web Clipping application for examination. If you are on Windows, you may do this by right-clicking in the frame of the emulator and choosing Install Application from the pop-up context menu. Select the PQA file you created in Step 6 above. After a few seconds, the icon for your new application should appear on the display. Click this icon to see the interface, as shown in Figure 2.

Pages: 1, 2, 3

Next Pagearrow