Getting Started With Project jMaki for the GlassFish v3 Application Server

ProcedureCreating the Server-Side Data

With this task, you are creating a properties file that contains a set of states and a set of cities for each state. This file acts as the database for the application for simplicity's sake.

  1. Expand the plotCity node and right-click on the Source Packages node.

  2. Select New > Java Package.

  3. Enter plotCity as the package name.

  4. Click Finish.

  5. Right-click on the project in the Projects window and choose New > Other

  6. In the New File dialog, select Other from the Categories pane.

  7. Select Properties File from the File Types pane.

  8. Click Next.

  9. Enter cities in the File Name field.

  10. Click Finish.

  11. Select plotCity/src/java/plotCity as the location of the properties file.

  12. Copy the following content to the cities.properties file:

    AK=Anchorage,Fairbanks,Juneau,Nome
    AZ=Mesa,Phoenix,Scottsdale,Tucson
    CA=Los Angeles,Sacramento,San Diego,San Francisco
    OR=Bend,Eugene,Portland,Salem
    WA=Olympia,Seattle,Spokane,Tacoma
  13. Save the file.