0

We have an application which is currently deployed on JBoss where it works fine. We are now trying to deploy the same on Jetty. But while accessing one of the JSPs we get the below exception.

PWC6199: Generated servlet error:|code too large for try statement

While looking for a possible solution to this problem, I came upon this stackoverflow question which says that it has to do with the size of the Java class. "Code too large" compilation error in Java

But this JSP compiles fine in JBoss. Is there any configuration in jetty that would compile the JSP in a different way (smaller class size) and help solve this issue? As of now, the only solution I can think of is to refactor the JSP into smaller JSPs with dynamic reports.

We are using Jetty 9.2

Community
  • 1
  • 1
Anoop
  • 813
  • 2
  • 10
  • 24
  • what is your `JDK version` ? have you checked its compatibility with jetty – Santhosh Aug 07 '14 at 05:44
  • I am using JDK 1.7.0_60. I am seeing this issue only for a couple of JSPs which are big in size. Rest of the application works fine. – Anoop Aug 08 '14 at 08:58

1 Answers1

0

Added the trimspaces init-param to jetty's webdefault.xml.

<init-param>
    <param-name>trimSpaces</param-name>
    <param-value>true</param-value>
</init-param>

This helped for the JSPs in my case.

Anoop
  • 813
  • 2
  • 10
  • 24