tomcat的jsp页面超过65535,导致500报错
Posted 经典鸡翅
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tomcat的jsp页面超过65535,导致500报错相关的知识,希望对你有一定的参考价值。
错误信息
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报错的主要内容,如果未能解决你的问题,请参考以下文章
使用tomcat部署jsp页面,tomcat运行成功,访问时报500错误