File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Precompiling JSP's in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Precompiling JSP Watch "Precompiling JSP New topic

Precompiling JSP's in Tomcat

Tony Moses

Joined: Aug 21, 2002
Posts: 22
I am supporting a J2EE application using the Struts framework. The web/app server being used is Tomcat 5.5.9. I am having a problem seeing changes made to JSP's. I have tried "touching" JSP's and changing the .java files generated. I have also read in other threads that I should look at the "work" directory for the JSP's. All I find here is tldCache.ser files. How can I make changes to JSP's and see these changes?

Note: I have found an xml file named tomcat-precompile-jsp.xml that appears to contain the information being used by Tomcat to compile the JSP's. If this is true, how do I interpret this and utilize this feature in Tomcat? Following are some nodes I am looking at in the tomcat-precompile-jsp.xml file:

<target name="jspc">
<taskdef classname="org.apache.jasper.JspC" name="jasper2" >
<classpath id="jspc.classpath">
<pathelement location="${java.home}/../lib/tools.jar"/>
<fileset dir="${tomcat.home}/server/lib">
<include name="*.jar"/>
<fileset dir="${tomcat.home}/common/lib">
<include name="*.jar"/>
<echo>Compiling generated classes from JSPC</echo>
<foreach target="do-jsp-compile" param="dir-path">
<dirset dir="${webapp.path}/WEB-INF/src"/>
<move todir="${tomcat.home}/work/Standalone/localhost/${}">
<fileset dir="${webapp.path}/WEB-INF/src">
<include name="**/*.*"/>
<target name="do-jsp-compile">
<echo>Compile JSP in: ${dir-path}</echo>
<javac destdir="${dir-path}"

Thanks in advance for an help/insight you can offer.
I agree. Here's the link:
subject: Precompiling JSP's in Tomcat
It's not a secret anymore!