-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Iain,

On 1/18/2010 10:28 AM, iainmac wrote:
> I am moving from Tomcat 5 to 6, and jsp's that worked fine in 5 now give me
> this length error.  

Unlikely. See below.

> I also have moved from java j2sdk1.4.1_02 to jdk1.6.0_18.

This is going to be the change that matters.

> I know I can rewrite the code, and over time I probably will, but is there a
> way of configuring Tomcat 6 to enable me to compile these jsp's?

No. This is a Java language limit that you are reaching: code may not
exceed 64k for a single method. Since JSPs compile into a single method,
you must simply limit the amount of code in the whole JSP.

This is one of the worst mal-features of JSP that exist IMO. :(

Some options:

1. Use includes to split your pages
2. Move some portions of your code into methods declared within the JSP
3. Move some portions of your code into tag libaries
4. Don't put so much logic into JSPs :)

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktUy6UACgkQ9CaO5/Lv0PAC4ACeMZjuEhMJl25Box4mqbwnrWKX
4C4AoLy/z89rn6VPN+ICsdgKKrpfIS5T
=Sqs4
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to