It's not a secret anymore!*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Precompiling JSP Watch "Precompiling JSP New topic
Author

Precompiling JSP's in Tomcat

Tony Moses
Greenhorn

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>
<fileset dir="${tomcat.home}/common/lib">
<include name="*.jar"/>
</fileset>
</classpath>
</taskdef>
...
<echo>Compiling generated classes from JSPC</echo>
<foreach target="do-jsp-compile" param="dir-path">
<path>
<dirset dir="${webapp.path}/WEB-INF/src"/>
</path>
</foreach>
<move todir="${tomcat.home}/work/Standalone/localhost/${webapp.name}">
<fileset dir="${webapp.path}/WEB-INF/src">
<include name="**/*.*"/>
</fileset>
</move>
...
<target name="do-jsp-compile">
<echo>Compile JSP in: ${dir-path}</echo>
<javac destdir="${dir-path}"
optimize="off"
debug="on"
failonerror="false"
srcdir="${dir-path}"
>

Thanks in advance for an help/insight you can offer.
 
Don't get me started about those stupid light bulbs.
 
subject: Precompiling JSP's in Tomcat
 
Similar Threads
include directive
JSP precompilation with Jasper2
Pre Compiling jsp
JSP Compilation using ANT
Precompile JSPs