0

I have got simple form (this is the renderend form with values)

  <form> 
     <input id="addrId"  type="hidden" value="1,173"/>
   </form>

backed by object like this

public class FormObject {
BigDecimal addrId;

//getters and setters

}

On tomcat 7 (debian stable) submitting this form raises an error because Spring doesn't resolve value 1,173 as BigDecimal value. On Tomcat 6 and on Tomcat 8 ( on different server ) this works normally. Can I force Spring to render value without the group separator ? Or this may be caused by container or host, JDK setting?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Josef Prochazka
  • 1,273
  • 2
  • 9
  • 28
  • 1
    One hint is that this might be dependend on your locale settings. – mreiterer Oct 10 '14 at 09:07
  • 1
    http://stackoverflow.com/questions/8809098/how-do-i-set-the-default-locale-for-my-jvm – mreiterer Oct 10 '14 at 09:08
  • 1
    How does `Locale` affect `BigDecimal` mapping? – Buhake Sindi Oct 10 '14 at 09:10
  • thank you it was caused by locale under which tomcat was started (/etc/default/locale ). But shouldn't this be handled internally. If the form was rendered under one locale it should be resolved, binded by the same locale that was used for rendering or not ? Or it may be problem if I am using locale interceptor which change locale according tu user setting for each request ? – Josef Prochazka Oct 10 '14 at 09:41

0 Answers0