tomcat jsp pages more than 65,535, resulting in 500 error

Error Messages

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 158 in the generated java file

The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit.

Solution

Find tomcat web.xml file, search fork, locate the following code

<servlet>
    <servlet-name>jsp</servlet-name>
    <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
    <init-param>
        <param-name>fork</param-name>
        <param-value>false</param-value>
    </init-param>
    <init-param>
        <param-name>xpoweredBy</param-name>
        <param-value>false</param-value>
    </init-param>
    <load-on-startup>3</load-on-startup>
</servlet>

Increase the allocation

<init-param>
    <param-name>mappedfile</param-name>
    <param-value>false</param-value>
</init-param>

Guess you like

Origin www.cnblogs.com/jichi/p/11921396.html