Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[JSP] DecimalFomat

1 view
Skip to first unread message

Johannes Hamel

unread,
Jun 14, 2002, 5:42:08 AM6/14/02
to
Tach miteinander,

ich habe einen Apache mit Tomcat auf zwei Rechner zu laufen. Identische Versionen auf beiden Rechnern. Ich habe folgende Code in einer JSP-Seite
<%
DecimalFormat euro=(DecimalFormat)DecimalFormat.getCurrencyInstance();
euro.applyLocalizedPattern("#.##0,00 '&euro;'");
%>
<%= euro.format(1.0) %>

Auf einem Rechner bekomme ich folgende Exception:

java.lang.IllegalArgumentException: Malformed pattern "#.##0,00 '?'"
at java.text.DecimalFormat.applyPattern(DecimalFormat.java:1912)

Auf dem anderen nicht. Jemand eine Idee woran das liegen kann?

Gruß und Dank

Johannes

Linda Radecke

unread,
Jun 15, 2002, 2:53:12 AM6/15/02
to

Johannes Hamel wrote:

Hast du verschiedene JRE-Versionen dort zu laufen? Uebrigens,
das bekomme ich so auch, uebergib doch mal expl. eine Locale
mit, bspw: DecimalFormat.getCurrencyInstance(Locale.GERMANY);

Jedenfalls geht es bei mir dann.


Linda
--
Swift as a shadow, short as any dream / Brief as the lightning in
he collied night / That in a spleen unfolds both heaven and earth
And ere a man hath power to say, "Behold!" The jaws of darkness do
devour it up: So quick bright things come to confusion.* . * . *.
. * . . * . . * . A Midsummernights Dream - William Shakespeare

0 new messages