I've managed to compare the .java files created by JSPC in the precompilation step to the .java files created when I deply the .jsp files as part of my WAR file. I've found the differences that are causing the problem. Here's a snippet from a method in an inner class of one of the .java files created by the JSPC precompilation:
This private inner class extends org.apache.jasper.runtime.JspFragmentHelper, which has a protected field _jspx_page_context (a javax.servlet.jsp.PageContext type).
The .java file created by Tomcat when the same .jsp file is deployed as part of the WAR file looks different, and uses this _jspx_page_context field from the superclass in place of the pageContext variable:
I'm still at a loss as to why the generated .java files are different when using JSPC to precompile the .jsp files and when Tomcat does it during deployment. I'm using the Maven Tomcat plug-in. I may try to use an Ant script to see if I have the same problems, but I don't see any reason to believe I will get different results.
Any suggestions?
Todd Farmer
[ August 17, 2005: Message edited by: Todd Farmer ]