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 (7Bee 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 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.

Using Jasper from Tomcat 7.0.x (JSP 2.3)

Unfortunately Tomcat team did worse job and tied Jasper more with rest of Tomcat code. So generally you should follow Jasper 6.0.x instructions with the following changes:

Using Jasper from Tomcat 7.0.6x (JSP 2.3)

More files are required from org.apache.tomcat.util. Add classes from this directory and also the following subdirectories:

descriptor
digester
file
res
scan
security
    

The rest is similar as for previous builds, however use overwriting content from jasper7-6x.

Using Jasper from Tomcat 7.0.7x (JSP 2.3)

More files are required from org.apache.tomcat.util. Add classes from this directory and also the following subdirectories:

buf
    

The rest is similar as for previous builds, however use overwriting content from jasper7-7x.

Using Jasper from Tomcat 8.0.x

The procedure is a similar to previous versions of Tomcat.

Using Jasper from Tomcat 9.0.x

Directory /1.x/src/jasper9 provides required resources to patch. The process is similar to previous versions of Jasper.
First, you need to downloaded Tomcat 9 sources from Apache Tomcat site.
It's recommended to create jasper target directory and copy only required content there. Directoriy structures have to be preserved if they are copied. Result directories structure is defined in 85/all-files.txt. Files to patch are:

Build scripts: bee-jasper.xml and env.xml are copied in the root of the target directory.
jasper.jar will be found in build directory after running 7Bee script using command: bee