You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Emmanuel Bridonneau <eb...@cariocas.com> on 2002/11/20 21:30:27 UTC

Illegal target of jump or branch w/Tomcat

Some double talk,
so I ran into this JVM exeption after switching from the "oh you're too expensive for me" Weblogic to "you're great for a free software" JBoss.
Turns out that Tomcat (used in conjunction w/JBoss) has a 64kb limitation whilst generating the servlet code from a JSP.
I intend to follow some suggestion I read and reduce the size of the .class files by:
 - reducing the number of tags used by merging some functionalities at the expense of a clean code
 - putting some code outside of the jsp and including these snippets at run time

It's a rather nasty and long undertaking.
If anyone has encountered this type of exeption can you confirm this assumption and what were the steps you took to overcome this limitation?
Heard of a future Tomcat release that'll increase the 64kb limit?
Thanks

Configuration details:
JBoss 2.4.4 bundle w/Tomcat 4.0.1
Struts 1.0.2


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Illegal target of jump or branch w/Tomcat

Posted by Martin Cooper <ma...@apache.org>.

On Wed, 20 Nov 2002, Martin Cooper wrote:

>
>
> On Wed, 20 Nov 2002, Emmanuel Bridonneau wrote:
>
> > Some double talk,
> > so I ran into this JVM exeption after switching from the "oh you're too expensive for me" Weblogic to "you're great for a free software" JBoss.
> > Turns out that Tomcat (used in conjunction w/JBoss) has a 64kb limitation whilst generating the servlet code from a JSP.
> > I intend to follow some suggestion I read and reduce the size of the .class files by:
> >  - reducing the number of tags used by merging some functionalities at the expense of a clean code
> >  - putting some code outside of the jsp and including these snippets at run time
> >
> > It's a rather nasty and long undertaking.
> > If anyone has encountered this type of exeption can you confirm this assumption and what were the steps you took to overcome this limitation?
> > Heard of a future Tomcat release that'll increase the 64kb limit?
>
> The latest versions of Tomcat use Jasper2 to compile JSP pages. Jasper2
> apparently breaks up the generated code to avoid hitting the limit you are
> encountering. If you can move to a later Tomcat, that would probably be
> the best way to go.
>
> If you can't switch container, one other point to bear in mind is that
> non-body tags generate less code than body tags. If you have your own tag
> library, you might consider changing some of the body tags to non-body
> tags. If you're really desperate, you could created modified versions of
> some of the Struts tags so that they are non-body tags, or create
> composite tags. (This is something I ended up having to do some time ago
> because some of my pages were blowing the limit on a daily basis!)

One other thing I forgot to mention - you can also use <jsp:include> to
break your pages into smaller chunks for the JSP compiler, and put them
back together at run time.

--
Martin Cooper


>
> --
> Martin Cooper
>
>
> > Thanks
> >
> > Configuration details:
> > JBoss 2.4.4 bundle w/Tomcat 4.0.1
> > Struts 1.0.2
> >
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Illegal target of jump or branch w/Tomcat

Posted by Martin Cooper <ma...@apache.org>.

On Wed, 20 Nov 2002, Emmanuel Bridonneau wrote:

> Some double talk,
> so I ran into this JVM exeption after switching from the "oh you're too expensive for me" Weblogic to "you're great for a free software" JBoss.
> Turns out that Tomcat (used in conjunction w/JBoss) has a 64kb limitation whilst generating the servlet code from a JSP.
> I intend to follow some suggestion I read and reduce the size of the .class files by:
>  - reducing the number of tags used by merging some functionalities at the expense of a clean code
>  - putting some code outside of the jsp and including these snippets at run time
>
> It's a rather nasty and long undertaking.
> If anyone has encountered this type of exeption can you confirm this assumption and what were the steps you took to overcome this limitation?
> Heard of a future Tomcat release that'll increase the 64kb limit?

The latest versions of Tomcat use Jasper2 to compile JSP pages. Jasper2
apparently breaks up the generated code to avoid hitting the limit you are
encountering. If you can move to a later Tomcat, that would probably be
the best way to go.

If you can't switch container, one other point to bear in mind is that
non-body tags generate less code than body tags. If you have your own tag
library, you might consider changing some of the body tags to non-body
tags. If you're really desperate, you could created modified versions of
some of the Struts tags so that they are non-body tags, or create
composite tags. (This is something I ended up having to do some time ago
because some of my pages were blowing the limit on a daily basis!)

--
Martin Cooper


> Thanks
>
> Configuration details:
> JBoss 2.4.4 bundle w/Tomcat 4.0.1
> Struts 1.0.2
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Illegal target of jump or branch w/Tomcat

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 20 Nov 2002, Emmanuel Bridonneau wrote:

> Date: Wed, 20 Nov 2002 12:30:27 -0800
> From: Emmanuel Bridonneau <eb...@cariocas.com>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: "'Struts Users Mailing List' (E-mail)"
>     <st...@jakarta.apache.org>
> Subject: Illegal target of jump or branch w/Tomcat
>
> Some double talk,
> so I ran into this JVM exeption after switching from the "oh you're too expensive for me" Weblogic to "you're great for a free software" JBoss.
> Turns out that Tomcat (used in conjunction w/JBoss) has a 64kb limitation whilst generating the servlet code from a JSP.
> I intend to follow some suggestion I read and reduce the size of the .class files by:
>  - reducing the number of tags used by merging some functionalities at the expense of a clean code
>  - putting some code outside of the jsp and including these snippets at run time
>
> It's a rather nasty and long undertaking.
> If anyone has encountered this type of exeption can you confirm this assumption and what were the steps you took to overcome this limitation?
> Heard of a future Tomcat release that'll increase the 64kb limit?
> Thanks
>
> Configuration details:
> JBoss 2.4.4 bundle w/Tomcat 4.0.1
> Struts 1.0.2
>

Recent Tomcat 4.1.x releases include a completely rewritten "Jasper 2" JSP
Page Compiler.  Besides running custom tags a ***lot*** faster (very
visible on a page with lots of Struts tags), this compiler tries to work
around the 64k limit on method size by factoring out some nested chunks of
code into separate methods, thus arbitrarily increasing the maximum size
of a page.  This works, however, only if you have zero scriptlets -- but
that should not be a problem for well-designed JSP pages.

You'd have to check with the JBoss folks when they plan to integrate with
a 4.1 release of Tomcat.

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>