velocity-user mailing list archives

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



----- Original Message -----
From: "Geir Magnusson Jr." <>
To: <>
Sent: Wednesday, September 11, 2002 1:44 PM
Subject: Re: Velocity config + special characters...

On 9/11/02 4:37 AM, "Michael Delamere" <> 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\".  Does
> 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
> "$" 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
> 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.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message