Hi,

First of all, according to MVC pattern, JSP (presentation layer) should
contain
only HTML, very less amount of Java code. The controller logic should
reside either
in Servlet or in a Java bean. In your case, it seams that Java code itself
is more
than 16KB which is coming in between try-catch block, and it is too much.
Try to
put this business logic in Java bean or in a servlet. Get the data to be
processed
from the bean itself(no processing logic in JSP). Then I think, you will
not have
any kind of problem.

-ShriKant

"Sharan, Dharmendra" wrote:

> Hi JSP Developers,
>
>      I am getting this error in JSP of "code size too large for try catch
> block" and
>      when I looked into the compiled java file it has this huge block of
> code translated
>      from the included JSPs inside of a try catch block.
>
>      I think it was more that 8k or 16k lines of code I don't exactly
> remember it right now.
>
>      The only way I was able to work around it was by putting some of the
> functionality into
>      one of the Servlet class and calling the function from JSP.
>
>      I was wondering if there is something wrong I am doing in the way I
am
> including the JSPs..
>
>      The way it is doing it now is more like a MACRO translation and puts
> the equivalent
>       translated Java code for the included JSPs, this makes the same
lines
> being included several times
>       causing the huge try catch block in the java source for the JSP.
>
>       I have been including JSPs using :-
>
>           <%-- some JSP code (and/or HTML) here --%>
>                    ....
>                    ....
>          <%@ include file="/path_to_jsp/included_jsp_file1.jsp"%>
>
>           <%-- some more JSP code (and/or HTML) here --%>
>
>          <%@ include file="/path_to_jsp/included_jsp_file2.jsp"%>
>
>           <%-- some more JSP code (and/or HTML) here --%>
>
>          <%@ include file="/path_to_jsp/included_jsp_file3.jsp"%>
>                    ....
>                    ....
>
>       Am I missing something here ? Or is there an alternative approach
to
> address this problem of code size too large in JSP ? Any experience with
the
> same problem or insights into the same is appreciated.
>
>       Thanks! (in anticipation),
>
>       Dharmendra
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to