RE: Branch Too Large Exception with Nested Iterator

2003-06-03 Thread Kommana, Sridhar
This is related to a hard limit in the JVM.  Each tag generates a if within
the service method of the Servlet generated from the JSP.  If the then or
else of this if statement becomes to large it can no longer be compiled.
The size of these two branches is than related to the number and type of tag
instances contained.

I've struggled with the same problem on one of my applications .  I mostly avoid the
problem.  The best techniques of used are :

1). Make sure tags that do not need to implement BodyTag don't.  The code
generated by IBM's JSP compiler is more verbose for BodyTags.
2). If two tags almost always appear next to each other make the second an
option or attribute of the first.  This eliminates one tag.
3). I have 12 dropdown lists in my jsp.i reduced size of jsp by replacing 
html:option with html:options.


-Original Message-
From: ashokd [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 7:17 AM
To: Struts Users Mailing List
Subject: Branch Too Large Exception with Nested Iterator


Hi,

1)
I am using Nested Iterator to display the content as text boxes. In each row
I have 10 fields, If the rows are increasing I am getting the Branch Too
Large Exception. I have 3 types of grids in a page, If I kept 2 Grids it is
working fine, If I kpet 3 Grids then it is giving error.

jsp converted java file size is 384KB (5500 lines).

Their is any limitation for J2EE container w.r.t jsp size ?

2)
To over come above problem I tried to include as separate jsps (each grid as
separete jsp), It is asking form tag in that jsps.
My requirement is I need to submit 3 Grids at a time when the user Clicks
the update button. Any suggestions on this.

Their is any other way to display the nested:iterator Grids with out using
form tag (like logic:iterator by using id).

Thanks in Advance,
Ashok.D



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


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



Re: Branch Too Large Exception with Nested Iterator

2003-06-03 Thread Arron Bates
 Hi,
 
 1)
 I am using Nested Iterator to display the content as text boxes. In each row
 I have 10 fields, If the rows are increasing I am getting the Branch Too
 Large Exception. I have 3 types of grids in a page, If I kept 2 Grids it is
 working fine, If I kpet 3 Grids then it is giving error.
 
 jsp converted java file size is 384KB (5500 lines).
 
 Their is any limitation for J2EE container w.r.t jsp size ?
 
 2)
 To over come above problem I tried to include as separate jsps (each grid as
 separete jsp), It is asking form tag in that jsps.
 My requirement is I need to submit 3 Grids at a time when the user Clicks
 the update button. Any suggestions on this.
 
 Their is any other way to display the nested:iterator Grids with out using
 form tag (like logic:iterator by using id).
 
 Thanks in Advance,
 Ashok.D


There is a limit to the size of a single method in a Java class (62K), and
there's tricks that JSP compilers use to get around it. Obviously you
container has gotten around it to a point. You're already starting to make
some includes which should alleviate the pain.

Regarding losing the form tag, the nested tags can use the nested:root tag to
start things off with a bean reference outside of an action.

Also, if you can, try using a recent nightly, or latest update of the nested
tags themselves (just throw the following jar into the WEB-INF/lib directory)...
http://keyboardmonkey.com/downloads/km-nested-v2.03.jar

...only saying this because it will help carve things up into include files,
as they use the request object to pass the nested properties and bean
reference, meaning you can literally just cut the JSP into includes and
include them without worry that the tags in the includes will get the reference.


Arron.

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



Branch Too Large Exception with Nested Iterator

2003-06-02 Thread ashokd
Hi,

1)
I am using Nested Iterator to display the content as text boxes. In each row
I have 10 fields, If the rows are increasing I am getting the Branch Too
Large Exception. I have 3 types of grids in a page, If I kept 2 Grids it is
working fine, If I kpet 3 Grids then it is giving error.

jsp converted java file size is 384KB (5500 lines).

Their is any limitation for J2EE container w.r.t jsp size ?

2)
To over come above problem I tried to include as separate jsps (each grid as
separete jsp), It is asking form tag in that jsps.
My requirement is I need to submit 3 Grids at a time when the user Clicks
the update button. Any suggestions on this.

Their is any other way to display the nested:iterator Grids with out using
form tag (like logic:iterator by using id).

Thanks in Advance,
Ashok.D



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