TomCat Problem with large .jsp pages

X-Application Version: 3.1.1
Tamino Version : 3.1.1
Platform : NT
WebContainer : Tomcat 3.3a
JDK Version : 1.3.1


My page contains quite a few jsp tags and is retrieving a fare bit of data.

This is the error message that is displayed:
Error: 500
Location: /TestPlan/view.jsp
Internal Servlet Error:

java.lang.VerifyError: (class: view_1, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Illegal target of jump or branch
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at org.apache.tomcat.facade.ServletHandler.getServlet(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.preInit(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.init(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)

It looks like a javac problem. JDK´s javac compiler seems to produce illegal byte code that doesn´t pass the verifyer.

I see two possible solutions:

1. Outsource static HTML data in the generated java code
Tomcat generates java code to write the static html parts of your jsp page. For large jsp pages with a lot of static HTML tomcat can be forced to put this in an extra file. This reduces the size of the generated service method.

Add in /conf/server.xml:

quote:
<JspInterceptor keepGenerated=“true”
largeFile=“true”
useJspServlet=“false”
/>

2. Switch tomcat to IBM´s jikes Compiler
You just need to download and unpack jikes from http://ibm.com/developerworks/oss/jikes/ and add it to your system environment path.

Then add in /conf/server.xml:

quote:
<JspInterceptor keepGenerated=“true”
javaCompiler=“jikes”
largeFile=“false”
useJspServlet=“false”
/>

Regards, Harald