Windward Reports Servlet Example

This is a basic example on how to use the Windward Reports Java engine in a web application. This example is a pure servlet implementation (no JSPs or EJBs).

You are free to use this sample in any way you wish. The instructions are for Windows systems, but the setup process is very similar for any other system that Tomcat supports.

There are two front-end sites for this example.

Installation of Tomcat - (all links assume you are running on localhost)

  1. First, install the Java SE JDK Either the 32 or 64 bit version will work.
  2. Setup environment variable JAVA_HOME (point this to the root installation of your Java installation; for example "C:\Program Files\Java\jdk1.6.0_23").
  3. Download the ZIP file for Tomcat 6.0 and NOT THE WINDOWS INSTALLATION. The code in Tomcat that runs the windows service does not work.
  4. Extract the ZIP file to a directory on your system, IE C:\tomcat6.
  5. Startup Tomcat: Go to C:\tomcat6\bin from a command prompt and run 'startup.bat'.
  6. Open a web browser and navigate to http://localhost:8080. If you see the Tomcat webpage, you have successfully installed Apache Tomcat.
  7. If Tomcat is not running on your local computer, change "localhost" to the name of the remote computer's name.
  8. Shutdown Tomcat: Go to C:\tomcat6\bin from a command prompt and run 'shutdown.bat'.
  9. Follow the directions below to setup the Windward Reports Java Servlet example.

Setup Windward Java Servlet on Tomcat

  1. Copy the contents of the example 'htmlhelp\examples\ServletExample' into the 'C:\tomcat6\webapps\ServletExample folder'. You will end up with the following items in 'C:\tomcat6\webapps\ServletExample':
  2. If you did not enter your license key during the install or you installed using the ZIP file, copy and paste your Java Engine key into the 'C:\tomcat6\webapps\ServletExample\WEB-INF\WindwardReports.properties' file.
    (The key already in the WindwardReports.properties file is not valid).
  3. Startup Tomcat: Go to 'C:\tomcat6\bin' from a command prompt and run 'startup.bat'.

Testing the sample

  1. Once you have done all that go to http://localhost:8080/ServletExample/ and you should see the servlet.
  2. Click here to go to the first example.
  3. Click here to go to the second example.

Notes