Ah. That rings a bell. You could be running into the problem where for large pages the generated java method _jspService(...) is too long (>32k, i think) and the compilation fails. The use of a lot of custom tags REALLY bumps up the size of the generated java code.

In jasper 2 (used in 4.1.x) the compilation process was completely rewritten and a lot of the tag boilerplate code moved out of the _jspService method.

So, you need to either cut down the complexity of your page (probably not an option), use included jsp pages (helps a lot) or migrate to the jasper 2 compiler.

In production we're using 4.0.6 using the jasper 2 compiler. We are heavily using custom tags and jasper 2 has made the jsp pages so much more performant :)

Steps to use jasper 2 in tomcat 4.0.x:
1) Get the latest 4.1.x release.
2) copy the files ant.jar, commons-collections.jar, jasper-compiler.jar, jasper-runtime.jar from the commons/lib directory of the 4.1.x distro to the common/lib directory of your 4.0.x installation (backup files first).
3) Remove jasper-compiler.jar, jasper-runtime.jar from the lib directory of your 4.0.x installation (backup files first).
4) Delete tomcat's work directory
5) Restart Tomcat


Make sure your tags are implemented as per the taglib specs otherwise you could see some 'issues' on migration. By default tags are pooled and reused so use instance variables with care ;)

Good luck,

Jon

Steven Shand wrote:

I've been having the very same problems. I narrowed it down to only happening on OS X and on Solaris.
It only seemed to be happening in situations where there were 'many' custom tags being used.


As a last resort I migrated my project to Tomcat 4.1.x and this solved the problem.

I guess there was something broken in the older version of Jasper that was fixed in the new version.

Steven Shand

On Friday, March 7, 2003, at 11:16 am, Guillaume Albini wrote:

Hi,

I use Tomcat 4.0.1 and Struts 1.0.2.

I created a JSP file using lots of Struts tags.
When Tomcat compile this JSP, i have lots of errors of type :

" Variable _jspx_th_bean_write_12 may not have been initialized.
if (_jspx_th_bean_write_12.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)"


But when i comment one or two lines (any of them) of my JSP file, Tomcat compile my file without errors or warning.
Then I uncomment this lines and Tomcat can't compile my file


Then , I try to compile with javac my java file that provoke the errors and I don't have errors.

I dont understand this problem.

Help me please and sorry for my english !!!!

Good day

Guillaume Albini

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to