• Post Reply Bookmark Topic Watch Topic
  • New Topic

Precompiling JSP's in Tomcat  RSS feed

Tony Moses
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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/${webapp.name}">
<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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!