jsp界面报错:The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
通用的通用jsp文件:*_inlude.jsp
调用通用文件的写法:<%@include file='/模块/*_include.jsp'%>
jsp报错内容:The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
修改include调用方法:修改为<jsp:include flush="true" page="/模块/*_include.jsp"/>,不再报错。
分析:因为<%@ include file=" "%>标签是在jsp容器里将jsp翻译成servlet文件,并编译它时,是静态包含jsp的,也就是编译出来是一个类文件,而java类文件是不允许超过65K这么大的,所以会报错如标题所示。而<jsp:include flush="true" page=" "/>在翻译并编译后,产生的两个类文件,也就是说呗调用的jsp文件生成独立的类文件,而调用它的jsp生成的类文件中,只包含一个调用jsp的方法。

浙公网安备 33010602011771号