struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: code too large for try statement
Date Sat, 21 Dec 2002 18:35:10 GMT

On Sat, 21 Dec 2002, Jitendra Singh wrote:

> I am a newbie ...but i read somewhere that there is a restrcition on the
> size of JSP, in-built in J2EE.

The "built in restriction" is actually the JVM's limit of 64kb on the size
of a particular method.  It's not anything imposed by J2EE or the JSP

First generation JSP page compilers often generated the code for an
entire JSP page in a single service method, which indirectly created a
limit on the size and complexity of your page.  Indeed, this is basically
required if you are using scriptlets that need access to the scripting
variables created by things like <jsp:useBean>.

Modern page compilers (like Jasper2 used in Tomcat 4.1 and 5.0) know how
to subdivide the code for your page into multiple methods, as long as you
are not using scriptlets and scripting variables.  Fortunately for Struts
developers, that tends to be the way we program already :-), so we can
take immediate advantage of things like this.

If you *do* use Tomcat, using the new Jasper2 compiler is reason enough to
upgrade to the latest 4.1 production quality release (4.1.18) if you're
still using Jasper1.  Besides the fact that the 64kb limit no longer
bothers you much, the performance improvement is so dramatic that you have
to see it to believe it.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message