struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boraldo <>
Subject Float conversion: requires comma as floating point symbol.
Date Wed, 01 Apr 2009 18:54:04 GMT

I have a float field on my form. When I type 1.1 (point as floating point
symbol) it shows conversion error
    java.lang.NoSuchMethodException: setPrice([Ljava.lang.String;)
But I do have a method 
    public void setPrice(Float price) {
        this.price = price;
If I type 1,1 (comma as floating point symbol) everything goes well but if
there were errors on the form, on the redisplayed form I see 1.1

Why Struts requires comma for conversion but uses point for displaying ?

View this message in context:
Sent from the Struts - User mailing list archive at

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

View raw message