You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter Hubbard <pe...@staff.telkomsa.net> on 2006/05/12 14:15:07 UTC

Re: The code of method _jspService(...) is exceeding the 65535 byteslimit

On Fri, 2006-05-12 at 14:02 +0200, lk wrote:
> Hi,
> 
> I got this bad error.
> 
> Is there a way to solve this problem (maybe in the configurations file)?
> 
> Thanks

This simply means you have way too much jsp code in one file.

Maybe you could split them up, or remove some of the functionality from
the jsp itself into helper classes.

As far as I know, it is a limit placed on method size by the JVM - I'm
not sure if it can be changed.


-- 
Peter Hubbard <pe...@staff.telkomsa.net>


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


Re: The code of method _jspService(...) is exceeding the 65535 byteslimit

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Konstantin,

On 1/18/2010 7:08 PM, Konstantin Kolinko wrote:
> 2010/1/18 iainmac <ia...@hotmail.com>:
>>
>> Hi,
>>
>> I am moving from Tomcat 5 to 6, and jsp's that worked fine in 5 now give me
>> this length error.
>>
>> I also have moved from java j2sdk1.4.1_02 to jdk1.6.0_18.
>>
>> 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?
>>
> 
> If you add the following option
> 
>         <init-param>
>             <param-name>mappedfile</param-name>
>             <param-value>false</param-value>
>         </init-param>
> 
> to the JspServlet declaration in conf/web.xml, the JSP engine will not
> generate separate write() command for each line of your JSP.

I didn't know you could do that (though it's right there in conf/web.xml
if I had cared to read it). Thanks for the tip.

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

iEYEARECAAYFAktVyLMACgkQ9CaO5/Lv0PBjiwCgh8pDvmF5VmrIjMdwFoAPGXzx
Oe8AnjESQ9PRroz5ZX6TYHV+wrQP3J98
=V3YA
-----END PGP SIGNATURE-----

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


Re: The code of method _jspService(...) is exceeding the 65535 byteslimit

Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/1/18 iainmac <ia...@hotmail.com>:
>
> Hi,
>
> I am moving from Tomcat 5 to 6, and jsp's that worked fine in 5 now give me
> this length error.
>
> I also have moved from java j2sdk1.4.1_02 to jdk1.6.0_18.
>
> 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?
>

If you add the following option

        <init-param>
            <param-name>mappedfile</param-name>
            <param-value>false</param-value>
        </init-param>

to the JspServlet declaration in conf/web.xml, the JSP engine will not
generate separate write() command for each line of your JSP.

Maybe that will allow you to postpone hitting the limit.

Best regards,
Konstantin Kolinko

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


Re: The code of method _jspService(...) is exceeding the 65535 byteslimit

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: The code of method _jspService(...) is exceeding the 65535 byteslimit

Posted by iainmac <ia...@hotmail.com>.
Hi,

I am moving from Tomcat 5 to 6, and jsp's that worked fine in 5 now give me
this length error.  

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

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?

Thanks,

Iain


Peter Hubbard wrote:
> 
> On Fri, 2006-05-12 at 14:02 +0200, lk wrote:
>> Hi,
>> 
>> I got this bad error.
>> 
>> Is there a way to solve this problem (maybe in the configurations file)?
>> 
>> Thanks
> 
> This simply means you have way too much jsp code in one file.
> 
> Maybe you could split them up, or remove some of the functionality from
> the jsp itself into helper classes.
> 
> As far as I know, it is a limit placed on method size by the JVM - I'm
> not sure if it can be changed.
> 
> 
> -- 
> Peter Hubbard <pe...@staff.telkomsa.net>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/The-code-of-method-_jspService%28...%29-is-exceeding-the-65535-byteslimit-tp4356835p27212087.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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