tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dean Fantham" <d...@fantham.com>
Subject JSP Compilation Issues
Date Tue, 30 Sep 2003 14:48:52 GMT
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">&nbsp;</td></tr><tr><td
align="center" colspan="5">RDO</td></tr>
	
<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</
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\">&nbsp;");
      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>&nbsp;");
      out.write("</td>");
      out.write("<td>&nbsp;");
      out.write("</td>");
      out.write("<td>&nbsp;");
      out.write("</td>");
      out.write("<td>&nbsp;");
      out.write("</td>");
      out.write("<td>&nbsp;");
      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



Mime
View raw message