struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Carlén <johann...@yahoo.com>
Subject RE: Memory consumption of tags
Date Fri, 22 Feb 2002 15:53:57 GMT
Well, actually, look at the code Tomcat generated:

org.apache.struts.taglib.bean.WriteTag writeTag = new
org.apache.struts.taglib.bean.WriteTag();
writeTag.setPageContext(pageContext);
writeTag.setParent(_jspx_th_html_html_0);
writeTag.setName("testBean");
writeTag.setProperty("value");
try {
int result = writeTag.doStartTag();
if (result ==
javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED)
throw new JspTagException("Since tag handler class
org.apache.struts.taglib.bean.WriteTag does not
implement BodyTag, it can't return
BodyTag.EVAL_BODY_TAG");
if (result != javax.servlet.jsp.tagext.Tag.SKIP_BODY)
{
do {
// end
// begin
[file="/testWrite.jsp";from=(16,0);to=(16,46)]
} while (writeTag.doAfterBody() ==
javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
}
if (writeTag.doEndTag() ==
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return;
} finally {
writeTag.release();
}

It doesn't make any calls to the introspecthelper
method at all. It sets the attributes on the tag
directly. So websphere does some extra work here...
Could this be recognized as a bug? Or is it just an
"old" way of handling tags?

/Johannes


 --- Dave J Dandeneau <Dave.Dandeneau@viant.com>
wrote:
> We actually opened a support issue with WebSphere
> because our JSPs were generating "Branch too large"
> exceptions in Websphere but in no other servers.
> They told us that there was an optimization in the
> works that a client is testing but it is not public
> yet. 
> 
> Here is what the jsp compiler generates for each
> message tag on Websphere 4.0.1:
> 
> MessageTag messagetag = new MessageTag();
> messagetag.setPageContext(pagecontext);
> messagetag.setParent(htmltag);
> JspRuntimeLibrary.introspecthelper(messagetag,
> "key", "Loginlogout.login.title", null, null,
> false);
> try
> {
>   int k = messagetag.doStartTag();
>   if(k == 2)
>     throw new JspTagException("Since tag handler
> class org.apache.struts.taglib.bean.MessageTag does
> not implement BodyTag, it can't return
> BodyTag.EVAL_BODY_TAG");
>  
>   if(k == 0);
>   
>   if(messagetag.doEndTag() == 5)
>   {
>     return;
>   }
> } finally {
>   messagetag.release();
> }
> ((JspWriter) (obj3)).print(_jspx_html_data[6]);
> 
> It doesn't look like too many objects are created,
> but it seems like there may be some way to optimize
> it further.
> 
> Thanks,
> dave dandeneau
> 
> -----Original Message-----
> From: Patrick Logé [mailto:plog@emakina.com]
> Sent: Friday, February 22, 2002 8:20 AM
> To: Struts Users Mailing List
> Subject: RE: Memory consumption of tags
> 
> 
> We plan to do so using WS 3.5.4, and we should
> have some load...
> 
> you'r frighten me <:(
> 
> ....
> 
> Has anyone running Struts on Websphere noticed these
> oddities as well or maybe explain the reason for
> this?
> 
> /Johannes
> 
>
_____________________________________________________
> Hitta snörapporter... 
> från 500 olika skidorter i Europa
> på http://se.snow.yahoo.com
> 
> --
> To unsubscribe, e-mail:  
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
>  

_____________________________________________________
Hitta snörapporter... 
från 500 olika skidorter i Europa
på http://se.snow.yahoo.com

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message