目录

JasperExceptionUnabletocompileclassforJSP

# 出错信息

出现这种情况往往都是在 include 多个JSP页面后出现,报错信息为: ERROR LogErrorInfoImpl:42 - Error Happen:

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.
1
2
3
4
5
<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>
    <init-param>
        <param-name>enablePooling</param-name>
        <param-value>false</param-value>
    </init-param>
    <init-param>
        <param-name>mappedfile</param-name>
        <param-value>false</param-value>
    </init-param>
    <load-on-startup>3</load-on-startup>
</servlet>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

在web.xml中添加上段红色代码,之后重启Tomcat再次即可。


转载自:https://www.cnblogs.com/mayabei/p/6856602.html

上次更新: 2024-11-06, 19:27:10
最近更新
01
java playwright爬虫
11-06
02
连接chrome调试
07-23
03
连接chrome调试
07-23
更多文章>