Getting the SampleApp Solution

Procedure

  1. Download the SampleApp.zip file.
  2. Unzip the file to a suitable local directory C:\temp\SampleApp.
  3. To view the source files and enhance the sample provided, open SampleApp in Eclipse or a suitable IDE.
    The solution project contains:
    • Source files containing the classes and methods to develop the basic client application.
    • JSP files which provide the client user interface.
    • Other resources such as CSS files, images, etc.
    • Libraries required to build and run the client application.
      Note: SampleApp.zip does not include the Service Connector libraries. You must copy the libraries into the CLASSPATHof the sample application. For example, copy the libraries to WEB-INF\lib.

      Also, ensure that the Build Path is configured properly before running the sample application.

  4. To run SampleApp:
    1. Edit the C:\temp\SampleApp\config.properties file to specify the location where all the binary files of the service connector are available.
      For example: service-connector-dir=C:\\temp\\service-connector.

      See Enabling the Java Service Connector for Your Development Environment for details on how to obtain the service connector binaries.

    2. Open a console window and navigate to C:\temp\SampleApp.
      This folder contains the build.xml file. Execute:
      ant -f build-sampleapp.xml clean war

      The script:

    • copies the service connector binaries to the SampleApp WEB-INF folder (C:\temp\SampleApp\WebContent\WEB-INF\lib).
    • builds the sampleapp.war file at C:\temp\SampleApp\build\dist, which can be used to deploy the sample application to any web server.
    1. Copy the sampleapp.warfile to the webapps folder of the servlet container.
      For example, C:\Program Files (x86)\apache-tomcat-6.0.32\webapps.
    2. Start the servlet container (or restart if it is already running).
    3. Open a browser window and navigate to http://localhost:9090/sampleapp to open the login form.