...ah!  Much cleaner.

No, I don't think there's a <nested-el>

Sri
P.S.
I'm sure you meant <html-el:text value="${width * depth}"/>

-----Original Message-----
From: John Espey [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 13, 2003 4:13 PM
To: Struts Users Mailing List
Subject: RE: how to calculate A*B in jsp, where A and B are from nested:write


I'm not familiar with the nested tags, but suppose you were using a struts-el text 
tag, you could do like so:  <html:text value="${width * depth}"/> I'm guessing you can 
do something similar in the nested tags.

> -----Original Message-----
> From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 13, 2003 3:10 PM
> To: Struts Users Mailing List
> Subject: RE: how to calculate A*B in jsp, where A and B are from 
> nested:write
>
>
> There's probably a cute way of doing it with JSTL...somebody chime in, 
> however, here's how you could do it with Struts tags and scriptlet
>
> <nested:define
>   property="width"
>         id="width"/>
> <nested:define
>   property="depth"
>         id="depth"/>
> <%
>   float w = new Float(width).floatValue();
>   float d = new Float(depth).floatValue();
>   float a = w * d;
> %>
>
> Sri
>
> -----Original Message-----
> From: Denis Wang [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 13, 2003 3:59 PM
> To: Struts Users Mailing List
> Subject: how to calculate A*B in jsp, where A and B are from 
> nested:write
>
>
> A newbie question:
> Currently I have
> <nested:write property='width'/>
> <nested:write property='depth'/>
> I want to calculate the area IN JSP (not to modify ActionForm) as 
> width X depth.
>
> I suppose I am going to use scriptlet.  How to achieve this?
>
> Thanks.
> Denis
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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


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

Reply via email to