Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 29554 invoked from network); 13 Jul 2010 22:24:10 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Jul 2010 22:24:10 -0000 Received: (qmail 38265 invoked by uid 500); 13 Jul 2010 22:24:08 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 38179 invoked by uid 500); 13 Jul 2010 22:24:07 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 38169 invoked by uid 99); 13 Jul 2010 22:24:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jul 2010 22:24:07 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [69.89.12.240] (HELO chrismiles.org) (69.89.12.240) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jul 2010 22:23:59 +0000 Received-SPF: none (chrismiles.org: chris@chrismiles.org does not designate permitted sender hosts) receiver=chrismiles.org; client-ip=90.195.49.43; helo=OBIWAN; envelope-from=chris@chrismiles.org; x-software=spfmilter 0.97 http://www.acme.com/software/spfmilter/ with libspf2-1.0.0; Received: from OBIWAN (5ac3312b.bb.sky.com [90.195.49.43]) by chrismiles.org (8.13.8/8.13.8) with SMTP id o6DMNafG016278 for ; Tue, 13 Jul 2010 22:23:37 GMT Message-ID: <005e01cb22da$0af3b5f0$0400a8c0@OBIWAN> From: "Chris Miles" To: "Struts Users Mailing List" References: <000601cb202e$f69622d0$0400a8c0@OBIWAN><002701cb22bf$2cff2e10$0400a8c0@OBIWAN><004a01cb22d4$632c7460$0400a8c0@OBIWAN> Subject: Re: Currency Formatting Date: Tue, 13 Jul 2010 23:23:37 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3664 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3664 X-Virus-Checked: Checked by ClamAV on apache.org Chris, I have a list of products which contain a double price. I now have. £ Chris ----- Original Message ----- From: "Chris Pratt" To: "Struts Users Mailing List" Sent: Tuesday, July 13, 2010 11:04 PM Subject: Re: Currency Formatting > puts the value on the top of the stack, so if you have a list > of doubles, we'll call it amounts, it would look something like this: > > > > > > (*Chris*) > > On Tue, Jul 13, 2010 at 2:43 PM, Chris Miles wrote: > >> Chris, >> >> Hi that works perfectly for >> >> >> >> where total is public Double getTotal >> >> but causes all rendering to stop at the following within an iterator. >> >> >> >> where List getProducts (for the iterator), public Product >> getProduct and public Double getPrice >> >> and also fails just on >> >> >> >> where public Product getProduct >> >> Is there places where different mechanisms need to be used here? I dont >> understand the inconstistant result I now get. >> >> Nothing in the log files on TRACE >> >> >> Thanks >> >> Chris >> ----- Original Message ----- From: "Chris Pratt" >> >> To: "Struts Users Mailing List" >> Sent: Tuesday, July 13, 2010 8:16 PM >> Subject: Re: Currency Formatting >> >> >> >> try instead of . >>> (*Chris*) >>> >>> On Tue, Jul 13, 2010 at 12:11 PM, Chris Miles >>> wrote: >>> >>> At the moment I have in my struts.xml >>>> >>>> >>> 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 >>> value="product.price"/> >>>> >>>> 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" < >>>> thechrispratt@gmail.com> >>>> To: "Struts Users Mailing List" >>>> 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: >>>>> >>>>> >>>>> >>>>> HTH >>>>> (*Chris*) >>>>> >>>>> On Sat, Jul 10, 2010 at 5:53 AM, Chris Miles >>>>> 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-unsubscribe@struts.apache.org >>>> For additional commands, e-mail: user-help@struts.apache.org >>>> >>>> >>>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org >> For additional commands, e-mail: user-help@struts.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org