Hi Krithivasan,

Read this....(on Struts-User list)

________________________________
Julio Cesar
SOFTSITE Tecnologia 
http://www.softsite.com.br
________________________________


On Mon, 10 Jun 2002, Thinh Doan wrote:

> Date: Mon, 10 Jun 2002 23:52:33 -0500
> From: Thinh Doan <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>,
>      [EMAIL PROTECTED]
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: RE: jsp/tomcat  croaks on too many <html:text>
>
> Craig,
>
> Your response got lost in the netherworld somewhere.  Please repost.
>

The problem is a limitation in the way that the Java code for a JSP page
is generated -- the JVM imposes a 64kb limit on the size of a method,
and the entire page is rendered as a single method (for technical
reasons, this is basically the only choice).  Current JSP page compilers
generate a
*lot* of code for each tag, and when you get up to around 70 (imagine
that), you tend to overflow the 64k limit.

There is a lot of effort going on in the Tomcat 4.1.x development branch
to replace the original page compiler -- both for improved execution
speed (which is *very* visible to Struts users, or anyone else who uses
lots of custom tags) and to reduce the impact of this limitation for
pages that do not have scriptlets in them (like well-formed Struts pages
:-).  You might try the recent 4.1.3 beta and see if it's better
(although they haven't changed everything planned to deal with the
method size limit yet).


In the absence of a better page compiler, you've only got two choices:

* Reduce the number of tags used on your page, and/or

* Break your page up by using <jsp:include> to grab
  pieces of it.  (Using <%@ include %> will not help,
  because it does the include at compile time and
  still creates the large method.

> Thanks much,
>
> Thinh

Craig


>
> -----Original Message-----
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 10, 2002 8:21 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: jsp/tomcat croaks on too many <html:text>
>
>
>
>
> On Mon, 10 Jun 2002, Thinh Doan wrote:
>
> > Date: Mon, 10 Jun 2002 19:03:41 -0500
> > From: Thinh Doan <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List
<[EMAIL PROTECTED]>,
> >      [EMAIL PROTECTED]
> > To: Struts-User <[EMAIL PROTECTED]>
> > Subject: jsp/tomcat  croaks on too many <html:text>
> >
> > I had a jsp with about 70 <html:text.../> input fields. At about 60 
> > fields or so, tomcat (4.0.3 on Win NT) died. Does anyone know what 
> > the reason
> might
> > be? I changed the page buffer and it did not help.
> >
> > Thanks for your help.
> >
> > THinh
> >
> > PS: each <html:text.../> has an accompanied label using 
> > <bean:message key.../> tag.
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> --
> To unsubscribe, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



-----Mensagem original-----
De: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]] Em nome de
Balasubramaniyan K
Enviada em: ter�a-feira, 9 de julho de 2002 14:17
Para: [EMAIL PROTECTED]
Assunto: Re: Tomcat crashes on too many custom tags in a jsp

Hi

That did not help.



Thanks & Regards
Balasubramaniyan Krithivasan



-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
Adrian Janssen
Sent: Tuesday, July 09, 2002 12:40 PM
To: [EMAIL PROTECTED]
Subject: Re: Tomcat crashes on too many custom tags in a jsp


Have you tried increasing the stack size by setting the environment
variable
CATALINA_OPTS. This is used to specify additional JVM settings for
tomcat.

For example (on Windows): SET CATALINA_OPTS = %CATALINA_OPTS% -Xss1024k

Note flag syntax may vary depending on trhe JVM you are using.

> -----Original Message-----
> From: Balasubramaniyan K [SMTP:[EMAIL PROTECTED]]
> Sent: 09 July 2002 05:06
> To:   [EMAIL PROTECTED]
> Subject:      FW: Tomcat crashes on too many custom tags in  a jsp
>
> Hi,
>
> We are working with tomcat 4.0.1  We are using a struts like framework
> having extensive tag library. We display all the data using custom
tags.
>
> We have noticed that when the number of custom tags for a jsp page is
> too large, our tomcat crashes. Our JSP has more than 125 <bean:message
> key.../> tag apart from other custom tags.
>
> We hunted for the solution in mailing lists.  As per a suggestion, we
> should split the JSP into multiple JSPs and include the pieces by
using
> <jsp:include> directive. We have split the JSPs but the problem
> persists.
>
> At times (But not always!) tomcat log file shows  java.stackoverflow
> error when server crashes.
>
> Can anybody suggest a work around?
>
> Thanks and Regards
>
>
________________________________________________________________________
__
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
--

It is the strict policy of Truworths that its e-mail facility and all
e-mail communications emanating therefrom, should be utilised for
business purposes only and should conform to high professional and
business standards.   Truworths has stipulated certain regulations in
terms whereof strict guidelines relating to the use and content of
e-mail communications are laid down. The use of the Truworths e-mail
facility is not permitted for the distribution of chain letters or
offensive mail of any nature whatsoever.   Truworths hereby distances
itself from and accepts no liability in respect of the unauthorised
use of its e-mail facility or the sending of e-mail communications
for other than strictly business purposes.   Truworths furthermore
disclaims liability for any  unauthorised instruction for  which
permission was not granted.    Truworths Limited accepts no liability
for any consequences arising from or as a result of reliance on this
message unless it is in respect of bona fide Truworths business for
which proper authorisation has been granted.

Any recipient of an unacceptable communication, a chain letter or
offensive material of any nature is requested to notify the Truworths
e-mail administrator ([EMAIL PROTECTED]) immediately in order that
appropriate action can be taken against the individual concerned.

________________________________________________________________________
___
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

________________________________________________________________________
___
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to