• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts 2 + Number format

 
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Hello every one,

I am using Struts 2.0 . In my application when I chose browser language German "de" and work with decimal number and submit form if increase one zero.

like if I submit 3.01 and submit and update it converts 30.01.

In German it decimal number looks like 3,01.

It use comma instead of dot.

So how to format my number at Jsp page when browser is German.

Please reply ASAP
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which version?

IIRC there was a bug for this that was resolved; I can't find it in JIRA at the moment though so I'm not sure.
 
Nishan Patel
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hello David ,

What you excellently want to say.

Please explain with more description. I am not getting. My problem is with German language browser.

 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm saying I believe there was a bug that caused this behavior, and I believe it was fixed. That's why I asked what version you're using.

I can't *find* the bug in the bug database, so I don't know for certain.
 
Nishan Patel
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks David,


I am using Mozila Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6

and struts 2.0

And by the way which version you are talking about ? Browser or Struts.

 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Struts.

You should see if you can find the bug report in the Struts 2 JIRA; I looked a little bit this morning but couldn't find it.
 
Nishan Patel
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks David,

SO, Tell me what I have suppose to do ?

This application is basically for our German client so we have to give them to solution for this bug.

Give some sol. for this is you have any ......



 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Either update to a version of S2 that includes the bug fix or find the bug fix and patch whatever version of Struts you're using.

Searching further, I found this:

https://issues.apache.org/struts/browse/WW-2176

It doesn't look like it's been fixed, although I think the bug is actually in XWork rather than Struts.

If that's the case, another workaround would be to use a custom type converter rather than relying on the XWork one (again, if it isn't really fixed--have you tried the same thing in a recent version? For some reason you won't tell me what version you're using so I can't really try a more recent version, since I don't know what a "more recent version" would be).
 
Nishan Patel
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks a lot David for your reply,

By the way we are using Bundle-Version: 2.1.2 of Struts .


So, If you get something please tell us.


 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know what else to tell you; the S2 ticket is still open, if you need further information I'd try looking at other S2 tickets or see if there's an XWork ticket for the same issue. I provided you with an irritating workaround if the bug is still open.
 
Nishan Patel
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks David your best reply.

Thanks a lot.
reply
    Bookmark Topic Watch Topic
  • New Topic