Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

_jspService is exceeding the 65535 bytes limit

So I'm dealing with a legacy servlet code that runs on Websphere 7 (JDK 6). Development environment setup uses Tomcat 6 (JDK 6).

  1. Why does it work on Websphere 7 and not in Tomcat 6?
  2. Is this something related to the application server?

If your answer is yes for no. 2, do you have a workaround for this on Tomcat 6 (JDK 6) aside from breaking down the code or using dynamic includes?

The schedule does not agree with changing static includes to dynamic includes primarily because most pages are coupled with the business model code including the main template of the app.

like image 906
setzamora Avatar asked Mar 30 '11 09:03

setzamora


People also ask

Is exceeding the 65535 bytes limit Java?

Re: exceeding the 65535 bytes limit Hi, Wikipedia: A Java class or interface can have at most 65535 methods. The code of a constructor in Java is limited to 65535 bytes.

Is exceeding the 65535 bytes limit JSP Tomcat?

To solve the issue you need to locate the file [Tomcat_Home]/conf/web. xml and search the file for 'JspServlet'. This should return an xml node of containing some values.

Is exceeding the 65535 bytes limit Talend?

This is because Talend Studio is a code generator and creates Java code for each Talend Job. Each subjob is a method in the Job class. If a subjob is too big, the size of the final generated code will exceed 65536 bytes.


1 Answers

It sounds like you're hitting a 64k method limit, probably due to how Tomcat builds a class out of your JSP. This page suggests changing your static includes like this:

<%@ include file="test.jsp" %> 

To dynamic includes like this to avoid the issue:

<jsp:include page="test.jsp" />  
like image 100
WhiteFang34 Avatar answered Oct 05 '22 22:10

WhiteFang34