3.2 Obtaining GreenPages

This document provides instructions for building the complete GreenPages application and running it in dm Server as well as running tests and executing it from the SpringSource Tool Suite. In addition, the application is examined in development stages from SpringSource Tool Suite, stepping through the development process and comparing this to the solution.

To get the completed GreenPages application, including tests and explanatory skeleton parts:

  1. download the latest ZIP file from

    http://dist.springframework.org/release/DMSS/greenpages-2.1.0.RELEASE.zip
  2. extract all the files from the ZIP file to a convenient directory (preserving the directory structure).

To extract the files on Windows:

prompt> mkdir c:\springsource\samples
prompt> cd c:\springsource\samples
prompt> jar xf c:\path\to\greenpages-2.1.0.RELEASE.zip
prompt> set GREENPAGES_HOME=c:\springsource\samples\greenpages-2.1.0.RELEASE

To extract the files on Unix systems:

prompt$ mkdir -p /opt/springsource/samples 
prompt$ cd /opt/springsource/samples 
prompt$ unzip /path/to/greenpages-2.1.0.RELEASE.zip 
prompt$ export GREENPAGES_HOME=/opt/springsource/samples/greenpages-2.1.0.RELEASE

The environment variable GREENPAGES_HOME set here is not used by the projects, but is used as a shorthand in the instructions that follow.

The GreenPages zip file contains two main directories called solution and start. The solution directory contains the completed application which can be built and tested (as described in the next section). The start directory contains an initial skeleton of the GreenPages application which can be used to generate the full application. The examination steps refer to this skeleton by way of illustration.

To follow the examination steps read Chapter 4, The Web Module after installing the full application in the following section.