tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Turoff, Steve" <Steve.Tur...@tenethealth.com>
Subject RE: code too large for try statement
Date Fri, 23 May 2003 18:11:49 GMT
Yes, my code is definitely producing gigantic java files - on the order of 260K. I didn't realize
there was a limit. In looking at the code more thoroughly, I see that the same file is being
included multiple times:

    _jspx_includes.add("/templates/leftNav/default.jsp");
    _jspx_includes.add("/templates/leftNav/default.jsp");
    _jspx_includes.add("/templates/leftNav/about.jsp");

I think the best short term option is to refactor so that each file that needs to be included
is only included once. Long term, it's probably better to use taglibs <template:get>
, <template:put>, etc.

Steve

>-----Original Message-----
>From: Tim Funk [mailto:funkman@joedog.org]
>Sent: Friday, May 23, 2003 12:45 PM
>To: Tomcat Users List
>Subject: Re: code too large for try statement
>
>
>For the sake of sanity in debugging, can you refactor to do this:
><% if (someVariable.equals("someValue")) { %>
>    <jsp:include page="/some/file.jsp" />
>    <jsp:include page="/some/otherfile.jsp" />
>    <jsp:include page="/some/otherotherfile.jsp" />
><% } %>
>
>I beleive, your code is creating one GIGANTIC java file which 
>is over some 
>limits of the java language. It has nothing to do with bufferSize.
>
>-Tim
>
>Turoff, Steve wrote:
>> Greetings,
>> 
>> I am running Tomcat 4.1.24 and Apache/1.3.19 (Unix)  on 
>Redhat 7.1. I recently made some modifications to a JSP page 
>and am now getting the following error:
>> 
>> Generated servlet error:
>>     [javac] Since fork is true, ignoring compiler setting.
>>     [javac] Compiling 1 source file
>>     [javac] Since fork is true, ignoring compiler setting.
>>     [javac] 
>/var/jakarta-tomcat-4.1.24/work/Standalone/localhost/_/index_js
p.java:7265: code too large for try statement
>>     [javac]     } catch (Throwable t) {
>>     [javac]       ^
>>     [javac] 
>/var/jakarta-tomcat-4.1.24/work/Standalone/localhost/_/index_js
p.java:131: code too large for try statement
>>     [javac]     try {
>>     [javac]         ^
>>     [javac] 2 errors
>> 
>> The jsp in question contains many blocks such as:
>> 
>> <% if (someVariable.equals("someValue")) { %>
>> 	<%@ include file="/some/file.jsp" %>
>> 	<%@ include file="/some/otherfile.jsp" %>
>> 	<%@ include file="/some/otherotherfile.jsp" %>
>> <% } %>
>> 
>> If I remove a few of the included files, the page works 
>fine. It doesn't matter which included files I remove. Is 
>there a limit to the size of a jsp page?
>> 
>> In 
>/var/jakarta-tomcat-4.1.24/work/Standalone/localhost/_/index_js
p.java:134, I see 
>> 
>> pageContext = _jspxFactory.getPageContext(this, request, response,
>>                         null, true, 8192, true);
>> 
>> Am I getting this error because the buffer (8192) is too 
>small? If so, how do I increase it?
>> 
>> Stacktrace is below.
>> 
>> Thanks,
>> 
>> Steve
>>  
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message