首页 > Web开发 > 详细

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

时间:2014-03-14 18:21:18      阅读:775      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣
如果你是通过搜索来到本文的,相信你应该是遇到了如下的错误
The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
这个错误是因为JSP文件太大了导致的。
如果是纯粹的Tomcat,找到Tomcat安装目录下conf文件夹下的web.xml文件,在如下位置,添加红色字体的参数。
(D:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\web.xml)
<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>mappedfile</param-name>
            <param-value>false</param-value>
        </init-param>
<load-on-startup>3</load-on-startup>
</servlet>
重启Tomcat,问题基本解决。
为什么说基本解决呢,因为
1、这样做,只是让Tomcat不为JSP每行都添加print语句,但是实际上,当文件达到一定程度,还是会发生错误,所以最根本的还是尽量减小JSP大小。
TIP:mappedfile : 是否对每个输入行都用一条print语句来生成静态内容,以方便调试。缺省为true。
bubuko.com,布布扣

摘自:https://harde.org/blog/2013/06/how-to-fix-the-code-of-method-is-exceeding-the-65535-bytes-limit.html

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

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

原文:http://www.cnblogs.com/huige-you/p/3599295.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!