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 .