An error occurred at line: 307 in the generated java file The code of method _jspService (HttpServle

It is possible that after an upgrade you may encounter this error on some of the more complex pages of Asset Bank, such as the Asset Detail page. If you see a stack trace on the screen the same as the one below then you can add a configuration setting to Tomcat to stop it.

org.apache.jasper.JasperException: Unable to compile class for JSP:  An error occurred at line: 307 in the generated java file The code of method _jspService (HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit Stacktrace:  at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)  at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)  at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)  at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)  at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)  at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)  at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)  at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)  at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)  at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)  at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)  at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)  at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)  at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)

Locate the file [Tomcat_Home]/conf/web.xml and search the file for 'JspServlet'. This should return an xml node of <servlet> containing some <init-param> values. You will need to add an additional <init-param> the same as the below.

<init-param>
<param-name>mappedfile</param-name>
<param-value>false</param-value>
</init-param> 

The resulting block of the web.xml file, once you have inserted the above, should look like the code below.

    <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> 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值