try <s:param> instead of <s:property>.
  (*Chris*)

On Tue, Jul 13, 2010 at 12:11 PM, Chris Miles <ch...@chrismiles.org> 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" <thechrispr...@gmail.com>
> To: "Struts Users Mailing List" <user@struts.apache.org>
> 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 <ch...@chrismiles.org>
>> 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: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to