Getting Started With Project jMaki for the GlassFish v3 Application Server

The plotCity Example

This section describes the plotCity example and tells you how to run it.

What the plotCity Example Does

With the plotCity example, you can plot a city on a map by performing the following tasks:

  1. Select a state from a Dojo combobox widget, thereby populating another Dojo combobox widget with a list of cities located in that state.

  2. Select a city from the second Dojo combobox widget, thereby causing the application to access the city's coordinates from an external service and plot the city on a map represented by a Google map widget.

This tutorial uses the plotCity example to demonstrate using the primary features of jMaki:

Downloading and Running the Example

This section tells you how to get the example, build it, and run it.

ProcedureDownloading the Example

  1. Go to the jMaki sample WAR files download area .

  2. Download one of the following files:

    • plotCity.war: Download this file if you just want to deploy and run the example the way you do for any other web application.

    • Download this file if you want to load the plotCity project in NetBeans IDE 6.1, build it, deploy it, and run it.

  3. If you downloaded the file, extract the zip file.

ProcedureBuilding and Running the plotCity Application in NetBeans IDE 6.1

With this task, you'll be able to run plotCity in your browser.

  1. Select File->Open Project in NetBeans IDE 6.1.

  2. Select the plotCity project that you extracted from the zip file in the previous task, and click OK.

  3. Right click on the plotCity application in the Projects pane and select Run Project.

    This will compile the classes, package the files into a WAR file, deploy the WAR to your GlassFish v3 Technology Preview 2 Application server instance, and open a web browser to the following URL:

    http://<server>:<server port>/plotCity/
  4. Select a state from the State combobox. Then select a city from the City combobox. You'll see that city plotted on the map.