Tomcat : The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65...

 

10:50:27,027 ERROR LogErrorInfoImpl:42 - Error Happen:

---------------20170221105027027.1001---------------

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.

因为JSP文件太大了导致此错误。

找到Tomcat安装目录下conf文件夹下的web.xml文件,在如下位置,添加红色字体的参数。

(D:\apache-tomcat-5.5.26\apache-tomcat-5.5.26\conf\web.xml

<!-- The JSP page compiler and execution servlet, which is the mechanism -->
<!-- used by Tomcat to support JSP pages. Traditionally, this servlet -->
<!-- is mapped to the URL pattern "*.jsp". This servlet supports the -->
<!-- following initialization parameters (default values are in square -->
<!-- brackets): -->
<!-- -->
<!-- mappedfile Should we generate static content with one -->
<!-- print statement per input line, to ease -->
<!-- debugging? [true] -->
<!-- -->
<!-- If you wish to use Jikes to compile JSP pages: -->
<!-- Please see the "Using Jikes" section of the Jasper-HowTo -->
<!-- page in the Tomcat documentation. -->

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

之后重启Tomcat。

如果未解决 观察eclipse中Servers工程里面的web.xml

按如上方法维护 Tomcat安装目录下conf文件夹下的web.xml文件 和 eclipse中Servers工程里面的web.xml .

 

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值