You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jan Tosovsky <j....@email.cz> on 2018/02/07 19:19:46 UTC

_jspService is exceeding the 65535 bytes limit

Dear All,

I've updated ancient tomcat to 8.0.49 and deployed app now throws '65535
bytes limit' exception for certain JSPs.

Following this (older) thread
https://stackoverflow.com/questions/5484253/jspservice-is-exceeding-the-6553
5-bytes-limit I changed that mappedfile parameter, but it didn't help. 

So I downgraded tomcat to 8.0.30 and it works fine again.

Should that mappedfile settings fix the issue so my observation seems to be
a regression in recent versions? Nobody complains this solution doesn't work
in that older thread.

Thanks,

Jan


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


Re: _jspService is exceeding the 65535 bytes limit

Posted by "Terence M. Bandoian" <te...@tmbsw.com>.
On 2/7/2018 4:37 PM, M. Manna wrote:
> If this doesn’t cause pain, I would do the following:
>
> 1) Replace all in-body  scriptlets and use JSTL core tags in offending
> JSPs. Most of the codebloats are caused by using intermediate scriptlets
> e.g.
>
> <% if (foo.bar() == jack.jill() ) { %>
> // lots of jsp code
> <%} else <%{ %>
>
> 2) use all your code in a stand-alone java class or lambda
> Function/BiFunction. And call that using a single line to do all processing.
>
> 3) if you’re using ant for building, you can write a task utilising bcel
> library to weigh the precompiled jsp sizes (65536b). But this is just a
> recommendation.
>
> I know I am asking for a refactor here. But this will help you a lot with
> all the other option provided earlier. From 8.0.39 about 100 jsps in our
> application broke because of The size. Just sharing our approach.
>
> And BTW, don’t disable pooling, it won’t help that much.
>
> Regards,


+1.  I'd suggest performing all data access and generating significant 
segments of dynamic output in separate classes and importing those 
classes into the JSP.

-Terence Bandoian
http://www.tmbsw.com/


>
> On Wed, 7 Feb 2018 at 22:08, Christopher Schultz <
> chris@christopherschultz.net> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> Jan,
>>
>> On 2/7/18 3:13 PM, Mark Thomas wrote:
>>> On 07/02/18 19:19, Jan Tosovsky wrote:
>>>> Dear All,
>>>>
>>>> I've updated ancient tomcat to 8.0.49 and deployed app now throws
>>>> '65535 bytes limit' exception for certain JSPs.
>>>>
>>>> Following this (older) thread
>>>> https://stackoverflow.com/questions/5484253/jspservice-is-exceeding-t
>> he-6553
>> <https://stackoverflow.com/questions/5484253/jspservice-is-exceeding-the-6553>
>>>>
>> 5-bytes-limit I changed that mappedfile parameter, but it didn't help.
>>>> So I downgraded tomcat to 8.0.30 and it works fine again.
>>>>
>>>> Should that mappedfile settings fix the issue so my observation
>>>> seems to be a regression in recent versions? Nobody complains
>>>> this solution doesn't work in that older thread.
>>> It will help but it isn't a guaranteed fix. There are other
>>> options.
>>>
>>> You could try compilation with javac.
>>>
>>> You could also try these settings: trimSpaces - true enablePooling
>>> - false
>>>
>>> Note the disabling pooling may impact performance. It depends on
>>> lot on the complexity of the tags.
>> Also using jsp:include to split pages into separate parts should help.
>>
>> - -chris
>> -----BEGIN PGP SIGNATURE-----
>> Comment: GPGTools - http://gpgtools.org
>> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>>
>> iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlp7eM8dHGNocmlzQGNo
>> cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFgyVxAAqa1kWSJKv39DoR84
>> mZ+mW13VrNB/ruFdAAW/KF6QNVzSB7k0aFmesCpeX01ABKM1LVa6zK4HJa2Bng1+
>> bx5cNM4hZti/jvaIE7sfVRi6vtD15ArQ8gHWtH6Xa8GcC1+tehphyj0Ew6GIK+Xn
>> cvGe3V05Jl8gqYQiscJ33Jq9Xuseaslbvd0g6fJhStdB7i1TiDUvecd0TZqN9U2h
>> +OqAShvRBZvua/MnYfSF5T5Nl+UW7oSjfuVZWY0dPb7L1e9J4zHtwVP0QDdUzp6V
>> V6+CRrwbtKXZPYDmxtX5Vq9TVh6fqXfjiIi46AhQU3Ive5mc3UsuU1et/Mr4dRCu
>> x1fEhahrZuoKACCF5kAfJ12Ngbe6EeuXAjocBHzgyK6v9ZqkS+X1x9GNQtYU0bv0
>> PONoW4x34mLwtPd56pyAbyw2wkoq9fmM8Wi+3KcYG885bnDUG7Ud5+hop3MiExYe
>> J/cvip6CFsgdnJ1/xYcSk4b425ZucX2x2qPEVXOnQXbiJUxGTe7lpTtiwFAbotCI
>> SUyACeNoZHt7rovPh65ldt7G9F4LJjSmpaYQp+bLyRU8zuc89Oj514ZvgM2Y276E
>> DKEchsjD+fVFbBPCi95/A7RyZkIFubxXgWCrOfxuR0j4btu9cnTi1qhgOdoEZCyA
>> 305EWpVOH04uFH6pl/ZAEsJyL4g=
>> =CB2q
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>


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


Re: _jspService is exceeding the 65535 bytes limit

Posted by "M. Manna" <ma...@gmail.com>.
If this doesn’t cause pain, I would do the following:

1) Replace all in-body  scriptlets and use JSTL core tags in offending
JSPs. Most of the codebloats are caused by using intermediate scriptlets
e.g.

<% if (foo.bar() == jack.jill() ) { %>
// lots of jsp code
<%} else <%{ %>

2) use all your code in a stand-alone java class or lambda
Function/BiFunction. And call that using a single line to do all processing.

3) if you’re using ant for building, you can write a task utilising bcel
library to weigh the precompiled jsp sizes (65536b). But this is just a
recommendation.

I know I am asking for a refactor here. But this will help you a lot with
all the other option provided earlier. From 8.0.39 about 100 jsps in our
application broke because of The size. Just sharing our approach.

And BTW, don’t disable pooling, it won’t help that much.

Regards,

On Wed, 7 Feb 2018 at 22:08, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Jan,
>
> On 2/7/18 3:13 PM, Mark Thomas wrote:
> > On 07/02/18 19:19, Jan Tosovsky wrote:
> >> Dear All,
> >>
> >> I've updated ancient tomcat to 8.0.49 and deployed app now throws
> >> '65535 bytes limit' exception for certain JSPs.
> >>
> >> Following this (older) thread
> >> https://stackoverflow.com/questions/5484253/jspservice-is-exceeding-t
> he-6553
> <https://stackoverflow.com/questions/5484253/jspservice-is-exceeding-the-6553>
> >>
> >>
> 5-bytes-limit I changed that mappedfile parameter, but it didn't help.
> >>
> >> So I downgraded tomcat to 8.0.30 and it works fine again.
> >>
> >> Should that mappedfile settings fix the issue so my observation
> >> seems to be a regression in recent versions? Nobody complains
> >> this solution doesn't work in that older thread.
> >
> > It will help but it isn't a guaranteed fix. There are other
> > options.
> >
> > You could try compilation with javac.
> >
> > You could also try these settings: trimSpaces - true enablePooling
> > - false
> >
> > Note the disabling pooling may impact performance. It depends on
> > lot on the complexity of the tags.
>
> Also using jsp:include to split pages into separate parts should help.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlp7eM8dHGNocmlzQGNo
> cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFgyVxAAqa1kWSJKv39DoR84
> mZ+mW13VrNB/ruFdAAW/KF6QNVzSB7k0aFmesCpeX01ABKM1LVa6zK4HJa2Bng1+
> bx5cNM4hZti/jvaIE7sfVRi6vtD15ArQ8gHWtH6Xa8GcC1+tehphyj0Ew6GIK+Xn
> cvGe3V05Jl8gqYQiscJ33Jq9Xuseaslbvd0g6fJhStdB7i1TiDUvecd0TZqN9U2h
> +OqAShvRBZvua/MnYfSF5T5Nl+UW7oSjfuVZWY0dPb7L1e9J4zHtwVP0QDdUzp6V
> V6+CRrwbtKXZPYDmxtX5Vq9TVh6fqXfjiIi46AhQU3Ive5mc3UsuU1et/Mr4dRCu
> x1fEhahrZuoKACCF5kAfJ12Ngbe6EeuXAjocBHzgyK6v9ZqkS+X1x9GNQtYU0bv0
> PONoW4x34mLwtPd56pyAbyw2wkoq9fmM8Wi+3KcYG885bnDUG7Ud5+hop3MiExYe
> J/cvip6CFsgdnJ1/xYcSk4b425ZucX2x2qPEVXOnQXbiJUxGTe7lpTtiwFAbotCI
> SUyACeNoZHt7rovPh65ldt7G9F4LJjSmpaYQp+bLyRU8zuc89Oj514ZvgM2Y276E
> DKEchsjD+fVFbBPCi95/A7RyZkIFubxXgWCrOfxuR0j4btu9cnTi1qhgOdoEZCyA
> 305EWpVOH04uFH6pl/ZAEsJyL4g=
> =CB2q
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: _jspService is exceeding the 65535 bytes limit

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

Jan,

On 2/7/18 3:13 PM, Mark Thomas wrote:
> On 07/02/18 19:19, Jan Tosovsky wrote:
>> Dear All,
>> 
>> I've updated ancient tomcat to 8.0.49 and deployed app now throws
>> '65535 bytes limit' exception for certain JSPs.
>> 
>> Following this (older) thread 
>> https://stackoverflow.com/questions/5484253/jspservice-is-exceeding-t
he-6553
>>
>> 
5-bytes-limit I changed that mappedfile parameter, but it didn't help.
>> 
>> So I downgraded tomcat to 8.0.30 and it works fine again.
>> 
>> Should that mappedfile settings fix the issue so my observation
>> seems to be a regression in recent versions? Nobody complains
>> this solution doesn't work in that older thread.
> 
> It will help but it isn't a guaranteed fix. There are other
> options.
> 
> You could try compilation with javac.
> 
> You could also try these settings: trimSpaces - true enablePooling
> - false
> 
> Note the disabling pooling may impact performance. It depends on
> lot on the complexity of the tags.

Also using jsp:include to split pages into separate parts should help.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlp7eM8dHGNocmlzQGNo
cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFgyVxAAqa1kWSJKv39DoR84
mZ+mW13VrNB/ruFdAAW/KF6QNVzSB7k0aFmesCpeX01ABKM1LVa6zK4HJa2Bng1+
bx5cNM4hZti/jvaIE7sfVRi6vtD15ArQ8gHWtH6Xa8GcC1+tehphyj0Ew6GIK+Xn
cvGe3V05Jl8gqYQiscJ33Jq9Xuseaslbvd0g6fJhStdB7i1TiDUvecd0TZqN9U2h
+OqAShvRBZvua/MnYfSF5T5Nl+UW7oSjfuVZWY0dPb7L1e9J4zHtwVP0QDdUzp6V
V6+CRrwbtKXZPYDmxtX5Vq9TVh6fqXfjiIi46AhQU3Ive5mc3UsuU1et/Mr4dRCu
x1fEhahrZuoKACCF5kAfJ12Ngbe6EeuXAjocBHzgyK6v9ZqkS+X1x9GNQtYU0bv0
PONoW4x34mLwtPd56pyAbyw2wkoq9fmM8Wi+3KcYG885bnDUG7Ud5+hop3MiExYe
J/cvip6CFsgdnJ1/xYcSk4b425ZucX2x2qPEVXOnQXbiJUxGTe7lpTtiwFAbotCI
SUyACeNoZHt7rovPh65ldt7G9F4LJjSmpaYQp+bLyRU8zuc89Oj514ZvgM2Y276E
DKEchsjD+fVFbBPCi95/A7RyZkIFubxXgWCrOfxuR0j4btu9cnTi1qhgOdoEZCyA
305EWpVOH04uFH6pl/ZAEsJyL4g=
=CB2q
-----END PGP SIGNATURE-----

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


Re: _jspService is exceeding the 65535 bytes limit

Posted by Mark Thomas <ma...@apache.org>.
On 07/02/18 19:19, Jan Tosovsky wrote:
> Dear All,
> 
> I've updated ancient tomcat to 8.0.49 and deployed app now throws '65535
> bytes limit' exception for certain JSPs.
> 
> Following this (older) thread
> https://stackoverflow.com/questions/5484253/jspservice-is-exceeding-the-6553
> 5-bytes-limit I changed that mappedfile parameter, but it didn't help. 
> 
> So I downgraded tomcat to 8.0.30 and it works fine again.
> 
> Should that mappedfile settings fix the issue so my observation seems to be
> a regression in recent versions? Nobody complains this solution doesn't work
> in that older thread.

It will help but it isn't a guaranteed fix. There are other options.

You could try compilation with javac.

You could also try these settings:
trimSpaces - true
enablePooling - false

Note the disabling pooling may impact performance. It depends on lot on
the complexity of the tags.

Mark

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