try <s:param> instead of <s:property>.
(*Chris*)
On Tue, Jul 13, 2010 at 12:11 PM, Chris Miles <[email protected]> wrote:
> At the moment I have in my struts.xml
>
> <constant name="struts.custom.i18n.resources" value="ApplicationResources"
> />
>
> ApplicationResources.properties is being packaged within WEB-INF\classes
> within a WAR within an EAR.
>
> The file contains: format.currency={0,number,currency}
>
> In my JSP I have <s:text name="format.currency"><s:property
> value="product.price"/></s:text>
>
> Without the s:text the price is displayed (a Double).
>
> When the s:text is included all I get is: {0}
>
> thanks
>
> Chris
> ----- Original Message ----- From: "Chris Pratt" <[email protected]>
> To: "Struts Users Mailing List" <[email protected]>
> Sent: Sunday, July 11, 2010 1:25 AM
> Subject: Re: Currency Formatting
>
>
>
> Define something like:
>>
>> format.currency={0,number,currency}
>>
>> In your applications.properties file, then use:
>>
>> <s:text name="format.currency"><s:param value="%{amount}"/></s:text>
>>
>> HTH
>> (*Chris*)
>>
>> On Sat, Jul 10, 2010 at 5:53 AM, Chris Miles <[email protected]>
>> wrote:
>>
>> Hi
>>>
>>> If I am displaying a Double to a JSP page what is the recommended way to
>>> format this is as a currency to two decimal points?
>>>
>>> Thanks
>>>
>>> Chris
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>