These are basic steps you need to do for integration with Jasper JSP provider

Tomcat 5.5.x

  1. Download Apache Tomcat sources from http://tomcat.apache.org/download-55.cgi
  2. Extract jasper subdirectory from a source archive
  3. Download Apache commons EL and Logging unless you have them already. Only binaries are required. If you do not use commons for something else, then you can copy commons-el.jar and commons-logging-1.1.jar under dependlib directory inside jasper (the directory needs to be created)
  4. Copy .java files under TJWS distribution which are in src/jasper directory to corresponding place of jasper/src/share directory (accordingly package name)
  5. Remove or rename with different extension  AntCompiler.java, and JDTCompiler.java in jasper/src/share under package org.apache.jasper.compiler
  6. Copy .xml files from TJWS distribution src/jasper to jasper directory
  7. Edit copied  env.xml providing correct paths for variables SERVLET_HOME, JSP_HOME, and commons libraries (expression 'CUSTOM CP')
  8. Download and install 7Bee unless you already have it (it's worth to check for a fresh version though)
  9. Launch bee and get jasper.jar built. You will find it in build directory.
  10. Distribution of TJWS is already pre-configured to be integrated with Jasper, so if you provide correct paths in env.xml of TJWS to Jasper libraries, then you can start using it out of the box. Check with TJWS documentation how to specify additional init parameters for JSP servlets, like Jasper. If you use a start script for launching TJWS, then the following Jasper parameters you may add:
    -j org.apache.jasper.servlet.JspServlet -org.apache.jasper.servlet.JspServlet.classpath %classpath% -org.apache.jasper.servlet.JspServlet.scratchdir %deploydir%/WEB-INF

Using Jasper from Tomcat 6.0.x (JSP 2.1)

  1. Download Apache Tomcat sources from here. Sources only.
  2. Extract downloaded archive in some directory.
  3. Prune Tomcat and JSDK related classes in apache-tomcat-6.0.x-src/java folder, the following packages have to remain
  4. Remove or rename with different extension AntCompiler.java, and JDTCompiler.java in apache-tomcat-6.0.x-src/java under package org.apache.jasper.compiler
  5. Copy *.java files under TJWS distribution which are in src/jasper6 directory to corresponding place of apache-tomcat-6.0.x-src/java directory (accordingly package name). The files may overwrite existing Jasper classes.
  6. Copy .xml files from TJWS distribution src/jasper6 to tomcat-6.0.x-src directory
  7. Edit copied  env.xml providing correct paths for variables SERVLET_HOME unless you preserved all subpackages of javax.servlet
  8. Follow steps 8-10 of the previous section. Note that extra EL and LOG libraries are not required for build and use Jasper from Tomcat 6.x.