You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dean Fantham <de...@fantham.com> on 2003/09/30 16:48:52 UTC
JSP Compilation Issues
I have a JSP page that is large (contains a large series of tables for
displaying lots of data). It is about 2000 lines of HTML. When trying to
run this on Tomcat 4.1.27 I get the following error:
[ServletException in:/schedule/operational/view.month.jsp] Unable to compile
class for JSP An error occurred at line: -1 in the jsp file: null
Generated servlet error: [javac] Compiling 1 source file
C:\dean\dev-tools\Tomcat
4.1\work\Standalone\localhost\_\schedule\operational\view_month_jsp.java:116
12: code too large for try statement } catch (Throwable t) { ^
C:\dean\dev-tools\Tomcat
4.1\work\Standalone\localhost\_\schedule\operational\view_month_jsp.java:30:
code too large for try statement try { ^ C:\dean\dev-tools\Tomcat
4.1\work\Standalone\localhost\_\schedule\operational\view_month_jsp.java:17:
code too large public void _jspService(HttpServletRequest request,
HttpServletResponse response) ^ 3 errors '
I reviewed the jsp_*.java file that was created (I am assuming by Jasper)
and saw that evert individual HTML taq is outputted to the new line, e.g.
<table width="80"><tr><td align="center" colspan="5"> </td></tr><tr><td
align="center" colspan="5">RDO</td></tr>
<tr><td> </td><td> </td><td> </td><td> </td><td> </
td></tr></table>
Which is two lines in my JSP, becomes the following in the servlet/java
file:
out.write("<table width=\"80\">");
out.write("<tr>");
out.write("<td align=\"center\" colspan=\"5\"> ");
out.write("</td>");
out.write("</tr>");
out.write("<tr>");
out.write("<td align=\"center\" colspan=\"5\">RDO");
out.write("</td>");
out.write("</tr>\r\n\t\t\t\t\t\t\t\t\t\t");
out.write("<tr>");
out.write("<td> ");
out.write("</td>");
out.write("<td> ");
out.write("</td>");
out.write("<td> ");
out.write("</td>");
out.write("<td> ");
out.write("</td>");
out.write("<td> ");
out.write("</td>");
out.write("</tr>");
out.write("</table>\r\n\t\t\t\t\t");
i.e. it is blowing out the individual tags to individual lines (including
end tags), and thus making my 2000 line html become 11,000 lines in the
servlet and causing the above error (I believe that the there is a 10,000
line limit for a try statement).
Is there options to force jasper to compile and not parse out any tag to a
new line?? Or is there a way around this???
Dean
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: JSP Compilation Issues
Posted by Tim Funk <fu...@joedog.org>.
There is a JAVA language spec limitation that a method may only be "so big".
You are over the limit.
There is a jasper option to map text to a file. I've never used it myself and
don't know if it works (still). But look at $TOMCAT_HOME/conf/web.xml and
look at the JSP options. There should be something about mappedFiles
documented there.
-Tim
Dean Fantham wrote:
> I have a JSP page that is large (contains a large series of tables for
> displaying lots of data). It is about 2000 lines of HTML. When trying to
> run this on Tomcat 4.1.27 I get the following error:
>
> [ServletException in:/schedule/operational/view.month.jsp] Unable to compile
> class for JSP An error occurred at line: -1 in the jsp file: null
> Generated servlet error: [javac] Compiling 1 source file
> C:\dean\dev-tools\Tomcat
> 4.1\work\Standalone\localhost\_\schedule\operational\view_month_jsp.java:116
> 12: code too large for try statement } catch (Throwable t) { ^
> C:\dean\dev-tools\Tomcat
> 4.1\work\Standalone\localhost\_\schedule\operational\view_month_jsp.java:30:
> code too large for try statement try { ^ C:\dean\dev-tools\Tomcat
> 4.1\work\Standalone\localhost\_\schedule\operational\view_month_jsp.java:17:
> code too large public void _jspService(HttpServletRequest request,
> HttpServletResponse response) ^ 3 errors '
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: JSP Compilation Issues
Posted by Tim Funk <fu...@joedog.org>.
There is a JAVA language spec limitation that a method may only be "so big".
You are over the limit.
There is a jasper option to map text to a file. I've never used it myself and
don't know if it works (still). But look at $TOMCAT_HOME/conf/web.xml and
look at the JSP options. There should be something about mappedFiles
documented there.
-Tim
Dean Fantham wrote:
> I have a JSP page that is large (contains a large series of tables for
> displaying lots of data). It is about 2000 lines of HTML. When trying to
> run this on Tomcat 4.1.27 I get the following error:
>
> [ServletException in:/schedule/operational/view.month.jsp] Unable to compile
> class for JSP An error occurred at line: -1 in the jsp file: null
> Generated servlet error: [javac] Compiling 1 source file
> C:\dean\dev-tools\Tomcat
> 4.1\work\Standalone\localhost\_\schedule\operational\view_month_jsp.java:116
> 12: code too large for try statement } catch (Throwable t) { ^
> C:\dean\dev-tools\Tomcat
> 4.1\work\Standalone\localhost\_\schedule\operational\view_month_jsp.java:30:
> code too large for try statement try { ^ C:\dean\dev-tools\Tomcat
> 4.1\work\Standalone\localhost\_\schedule\operational\view_month_jsp.java:17:
> code too large public void _jspService(HttpServletRequest request,
> HttpServletResponse response) ^ 3 errors '
>