Running your Java application on Tomcat 5.5.
Downloads: Attached to this post
- Watch a video demonstrating the below configuration
- The source code for this example
- Source code using JSPs instead of servlets
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.
- Install Tomcat. This step is not shown as we assume you already have Tomcat installed.
- 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.
- Under the directory C:\Tomcat 5.5\webapps create the folder WindwardReports
- Copy sample 5 and its subdirectories:
to the newly created WindwardReports directory:
- Create an images subdirectory (needed for html reports with images):
- Copy WindwardReports.properties to the WEB-INF folder. This is necessary so that Windward Reports will find a license key.
- Create a lib folder under WEB-INF and copy WindwardReports.jar and all of the jars in the lib directory to it:
- 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.
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.
- If Tomcat is stopped, start it. If it is started, you may need to stop and start it:
- You should now see:
- 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:
- Congratulations, your servlet is now running. Select one of the formats (I selected html with css) and click “Generate Report”:
- 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.