0

I'm trying to dispaly a jsp page (generated at runtime) in my app and when I choose the button on my main page to dispaly the results of an operation that generates the jsp, I get the following error:

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: [38] in the generated java file: [C:\Users\Tom\Programming IDEs\workspace-eclipse-java-web\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\work\Catalina\localhost\LAEWeb\org\apache\jsp\WEB_002dINF\test_jsp.java]
The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit

How do you display jsp pages with over 64k of data? The jsp has numbers data with over 16,800 lines with five numbers per line.

te7
  • 601
  • 1
  • 6
  • 23
  • What container are you using? See [here](http://stackoverflow.com/q/7495985/1391249) and [here](http://stackoverflow.com/q/5484253/1391249). – Tiny Apr 05 '15 at 11:26
  • In the normal circumstances the JSP rarely needs to exceed the limit. What is the source code it looks like? – Roman C Apr 05 '15 at 12:01
  • divide your jsp page with more than one page and use jsp include directive.it will work – Sanjay Apr 06 '15 at 07:19

2 Answers2

2

if possible then divide your jsp page with more than one page and use jsp include directive.it will work.

Sanjay
  • 2,481
  • 1
  • 13
  • 28
  • I used the for dynamic content and it worked. Thanks. It took a while streamlining the code to print multiple jsp pages, but I finally got it. If anyone would like to see the code, leave a comment and I'll post it. By the way, I'm using eclipse with tomcat. – te7 Apr 07 '15 at 08:22
0

Another solution for above question is

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

<init-param>
    <param-name>mappedfile</param-name>
    <param-value>false</param-value>
</init-param> 
Sanjay
  • 2,481
  • 1
  • 13
  • 28