Cut it into multiple JSPs, with no try catch block, in the header add code
to redirect to an error page in case of an exception.  

You might be better off if you consider alternate options to display it as
JSPs, as it may very well become a maintenance nightmare.

Thanks
-Manoj Pooleery.
Sr. Software Developer,
Synygy Inc.

-----Original Message-----
From: Dean Fantham [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 30, 2003 10:49 AM
To: 'Tomcat Users List'
Subject: 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">&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



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to