struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Don Brown (JIRA)" <>
Subject [jira] Updated: (WW-1581) Problems with handling of Double in the request parameters
Date Mon, 01 Jan 2007 08:33:17 GMT


Don Brown updated WW-1581:

    Fix Version/s:     (was: 2.0.3)

> Problems with handling of Double in the request parameters
> ----------------------------------------------------------
>                 Key: WW-1581
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Actions
>    Affects Versions: 2.0.2
>         Environment: windows XP [Polish locale], tomcat 5.5.17, Java 6
>            Reporter: Dariusz Wojtas
>         Assigned To: Don Brown
>            Priority: Critical
> I have a property in my form
>   private Double someValue;
> with get/set methods
> Then I display it on my form
>    <s:textfield name="someValue" cssStyle="width: 100px;"/>
> fill some value:  1234
> and submit the form [Firefox]
> the URL looks like this:
>    /my.action?someValue=1234.0
> and is automatically generated by the browser.
> On the console I get stacktrace and no hint what is going on:
> java.lang.NullPointerException
> 	at com.opensymphony.xwork2.DefaultActionInvocation.createResult(
> 	at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
> 	at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(
> 	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
> 	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
> 	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
> 	at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(
> 	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
> 	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
> (A bit related to WW-1577)
> If I change URL to one of:
>    /my.action?someValue=1234,0     [colon instead of dot]
>    /my.action?someValue=1234
> then it works.
> IE 6 does not add '.0' if the number is an integer.
> But if I add it by hand:
>    1234.5   [english user using my polish server]
> then if fails.
> Most likely the Double handler initializes itself with the machine specific locale (in
Poland colon is the separator for doubles) and it fails.
> In fact this is a highly critical issue if this cannot accept simple numeric value on
non english server machine.
> Solution?
> I am not sure if this is not in conflict with some other conditions, but possibly the
Double converter should use one specific locale and try to convert input data first to be
> For example use locale ENGLISH, and try to format the input strings by replacing comma
with dot.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message