Menu - Ngang

Sunday, October 12, 2014

How to Fix 65535 bytes limit Exceed problem when reloading a jsp page?

When you create new file jsp.I'm getting error is The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
you using static include such as
<%@ include file="/jsp/common/createScriptMsg.jsp" %> 
Or you also try dynamiac include such as
<jsp:include page="/jsp/common/createScriptMsg.jsp" />
 
It is possible that after an upgrade you may encounter this error on 
some of the more complex pages of Asset Bank, such as the Asset Detail 
page. If you see a stack trace on the screen the same as the one below 
then you can add a configuration setting to Tomcat to stop it. 
Solution: 
- We "fixed" this here by setting mappedfile to false for JspServlet in our Tomcat-Config.
Go to %TOMCAT_HOME%/conf/web.xml and add the following init-param to the JspServlet:
 
<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>
 
 Save the file and restart the Tomcat service