Skip to main content
Windward

Running your Java application on Tomcat 5.5

Overview

Running your Java application on Tomcat 5.5.

Resolution

Installing_the_Servlet_Sample10.jpg

 

Downloads: Attached to this post

Configuring your Application

This document shows how to install and run a servlet-based sample on Tomcat that uses Windward Reports. The JSP example above can also be used and its installation is basically identical.

 
  1. Install Tomcat. This step is not shown as we assume you already have Tomcat installed.
    1. The root for Tomcat (CATALINA_HOME) in this example is C:\Tomcat 5.5. I do this because the directories in Tomcat get deep enough without having C:\Program Files\Apache Software\Tomcat 5.5 on the front of them.
  2. Under the directory C:\Tomcat 5.5\webapps create the folder WindwardReports 
    Installing_the_Servlet_Sample1.jpg
  3. Copy sample 5 and its subdirectories:
    Installing_the_Servlet_Sample2.jpg
    to the newly created WindwardReports directory: 
    Installing_the_Servlet_Sample3.jpg
  4. Create an images subdirectory (needed for html reports with images): 
    Installing_the_Servlet_Sample4.jpg
  5. Copy WindwardReports.properties to the WEB-INF folder. This is necessary so that Windward Reports will find a license key. 
    Installing_the_Servlet_Sample5.jpg
  6. Create a lib folder under WEB-INF and copy WindwardReports.jar and all of the jars in the lib directory to it: 
    Installing_the_Servlet_Sample6.jpg
  7. Build the java files. Go to the directory C:\Tomcat 5.5\webapps\WindwardReports\WEB-INF\classes\com\windwardreports and run the file build.bat. This creates a class file for each java file.
    Installing_the_Servlet_Sample7.jpg
    Please note the addition of servlet-api.jar. This is a Tomcat file and is its java servlet API implementation. This must be in the classpath.
  8. If Tomcat is stopped, start it. If it is started, you may need to stop and start it: 
    Installing_the_Servlet_Sample8.jpg
  9. You should now see: 
    Installing_the_Servlet_Sample9.jpg
  10. Click on the “Click here to go to the first screen” (do not click the link as it assumes the servlet was placed in WindwardReportsServlet and we named the servlet just Windward Reports) and you will get: Installing_the_Servlet_Sample10.jpg
  11. Congratulations, your servlet is now running. Select one of the formats (I selected html with css) and click “Generate Report”: 
    Installing_the_Servlet_Sample11.jpg
  12. If for any reason the report generation failed, look in the tomcat log localhost.date.log where “date” is today’s date. The problem should be listed there.
  • Was this article helpful?