码迷,mamicode.com
首页 > Web开发 > 详细

tomcat的jsp页面超过65535,导致500报错

时间:2019-11-24 12:01:16      阅读:104      评论:0      收藏:0      [点我收藏+]

标签:method   init   eth   xml文件   app   -name   错误   搜索   pac   

错误信息

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.

解决办法

找到tomcat的web.xml文件,搜索fork,找到如下代码

<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>

增加配置

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

tomcat的jsp页面超过65535,导致500报错

标签:method   init   eth   xml文件   app   -name   错误   搜索   pac   

原文地址:https://www.cnblogs.com/jichi/p/11921396.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!