velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Delamere" <mdelam...@morelogs.de>
Subject Re: Velocity config + special characters...
Date Wed, 11 Sep 2002 12:07:50 GMT
thanks for your reply.

Regards,

Michael


----- Original Message -----
From: "Geir Magnusson Jr." <geirm@optonline.net>
To: <velocity-user@jakarta.apache.org>
Sent: Wednesday, September 11, 2002 1:44 PM
Subject: Re: Velocity config + special characters...


On 9/11/02 4:37 AM, "Michael Delamere" <home@michael-delamere.de> wrote:

> Hi,
>
> could someone answer me the followig 2 questions:
>
> 1. In my tomcat log I have the line " Velocity   [info] Default Properties
> File: org\apache\velocity\runtime\defaults\velocity.properties".  Does
this
> mean that my properties file is not being read and instead a default is
> being used?

The default properties are always applied - they are used to configure
Velocity to a useful state, and then any properties that you add 'overlay'
the configuration, so the log will state the default properties that are
being applied.

There is no automatic read of a properties file - when you init velocity,
you can pass it a Properties object in the init() method, but the
construction of the Properties object is up to you.

>
> 2. When displaying various currencies, there is no problem in displaying
the
> "$" and the "£" sign.  However I can´t get it to display the "€" (Euro)
> sign.  It comes up with a question mark instead.  I´m using the
NumberFormat
> class to get the formatted value:
>
> Locale locale = new Locale("de", "DE", "EURO");
> formattedTotalPrice =
> NumberFormat.getCurrencyInstance(locale).format(totalPrice);
>
> Any help would be really appreciated.
>

This comes down to output encoding, and depends on the application of
Velocity.  If using the default servlet base class, there is an init
property you can set for the servlet (since that creates and manages the
Writer the template is written to...)

--
Geir Magnusson Jr.
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
To unsubscribe, e-mail:
<mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:velocity-user-help@jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message