You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "PILGRIM, Peter, FM" <Pe...@rbos.com> on 2003/05/02 18:06:26 UTC

RE: [WORKAROUND] RE: [OT] Struts / JSTL fmt:formatDate / Tomcat 4 .1.2 4 lethal concocti on

> -----Original Message-----
> From: PILGRIM, Peter, FM 

--////--

> It turns out that JSPC is caching or pooling on JSP tag attributes. 
> In other words it examines how the tag attributes are used. 
> The pooling implementation thus appears to look only at this set 
> of arguments
> 
> {  "product[counter].decisionDate" , "dd-MMM-yyyy" }
> 
> The WORKAROUND is to not use JSTL here, but to use, surprise surprise,
> <bean:write> and a <logic:iterate> tags
> 
> <logic:iterate ... indexId="counter">
> 
>    The Decision Date 
>    <c:out value="${product[counter].title}" /> 
>    <% String 
> dynaPropDate="product["+counter.intValue+"].decisionDate"; %>
>    <bean:write property="<%= dynaProp %>" format="dd-MMM-yyyy" />
> 
> </logic:iterate/>

No. It still does not work despite my attempt to solve very quickly.
The bug is definitely within Tomcat itself.

Reading up on the specification "Tag.setPageContext()" is the first
method called before the tag is used. Unfortunately it does not
say if this method is called on every tag invocation. If this
was true then you could intercept the method and clear any
tag attribute you required.

I am not sure what the solution is, except to use RAW Java scriptlets.
Which is a proper workaround. Ah well. 

Nice May Day weekend to all!

--
Peter Pilgrim,
Struts/J2EE Consultant, RBoS FM, Risk IT
Tel: +44 (0)207-375-4923


***********************************************************************
      Visit our Internet site at http://www.rbsmarkets.com

This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
The Royal Bank of Scotland plc is registered in Scotland No 90312
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB 
Regulated by the Financial Services Authority
***********************************************************************

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