These are basic steps you need to do for integration with Jasper JSP provider
Tomcat 5.5.x
- Download Apache Tomcat sources from
http://tomcat.apache.org/download-55.cgi
- Extract jasper subdirectory from a source archive
- 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)
- Copy .java files under TJWS distribution which are in src/jasper
directory to corresponding place of jasper/src/share directory
(accordingly package name)
- Remove or rename with different extension AntCompiler.java,
and JDTCompiler.java in jasper/src/share under package org.apache.jasper.compiler
- Copy .xml files from TJWS distribution src/jasper to jasper
directory
- Edit copied env.xml providing correct paths for variables SERVLET_HOME, JSP_HOME,
and commons libraries (expression 'CUSTOM CP')
- Download and install
7Bee unless you already have it (it's worth to check for a fresh version
though)
- Launch bee and get jasper.jar built. You will find it in build
directory.
- 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)
- Download Apache Tomcat sources from
here. Sources only.
- Extract downloaded archive in some directory.
- Prune Tomcat and JSDK related classes in apache-tomcat-6.0.x-src/java folder, the
following packages have to remain
- javax.el
- javax.servlet.jsp
- javax.servlet.resources
- javax.servlet and all subpackages of it (optional unless
you do not have a separate JSDK)
- org.apache
- org.apache.el and all subpackages of it
- org.apache.juli and all subpackages of it
- org.apache.jasper and all packages of it
- 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
- 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.
- Copy .xml files from TJWS distribution src/jasper6 to tomcat-6.0.x-src
directory
- Edit copied env.xml providing correct paths for variables SERVLET_HOME
unless you preserved all subpackages of javax.servlet
- 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.