We are trying to migrate our legacy application from Weblogic 10.3.6.0 to Weblogic 12cR2. While pre-compiling JSP using APPC we are getting below error in multiple JSPs.
Error:
OMUHVPostPaidServiceGrid1.jsp:9:1: The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
String contextPath = request.getContextPath();
^---------^
CVDataDetails.jsp:11:2: The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
<jsp:useBean scope="session" id="RSIQueueMgmtToolForm" class="net.cingular.opus.administration.RSIQueueMgmtToolForm"/>
^---------^
SimplifiedFooter.jsp:38:2: The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
<jsp:useBean id="mysession" scope="request" class="poslite.common.utils.HeaderBean" />
^---------^
Cart.jsp:53:1: The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
String contextPath = request.getContextPath();
While searching google, I have seen few suggestions which are not working in weblogic 12cR2.
Tomcat:
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
...
<init-param>
<param-name>mappedfile</param-name>
<param-value>false</param-value>
</init-param>
...
</servlet>
https://support.assetbank.co.uk/hc/en-gb/articles/115005208888-How-do-I-fix-a-65535-bytes-limit-Stacktrace-
JBoss:
<jsp-config development="true" mapped-file="false"/>
Weblogic:
In Weblogic 12cR2, <jsp-config> <jsp-property-group> not having mappedfile property.
https://docs.oracle.com/cd/E13222_01/wls/docs103/webapp/configurejsp.html
web.xml Deployment Descriptor Elements
Where as the older version of weblogic had mappedfile property.
https://docs.oracle.com/cd/E19226-01/820-7693/6niuehrdi/index.html
mappedfile - true - If set to true, generates static content with one print statement per input line, to ease debugging.
I understand that the generated byte code limit is exceeding 64k limit but fixing this legacy code in over 100 jsp files are going to be very hard for us. Please let us know any other way to overcome this issue? We will surely fix this in a long term. Appreciate your responses.