目录
二,基于jsp文件过大问题,在tomcat 的conf 文件夹web.xml 文件中添加配置
出现问题:
Stacktrace:] with root cause
java.lang.RuntimeException:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [96] in the generated java file: 路径.jsp]
The code of method _jspService(HttpServletRequest, HttpServletResponse)
is exceeding the 65535 bytes limit
点击跳转jsp 文件时,出现这个问题
解决思路:
出现这个问题是因为jsp 中内容太大了,而且我用的jdk8,tomcat要用7,
解决教程:
一,tomcat版本要低于jdk版本
二,基于jsp文件过大问题,在tomcat 的conf 文件夹web.xml 文件中添加配置
可以直接搜索JspServlet ,然后把这段覆盖原有内容。
<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>