Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
防止在WebSphereJSF中将null请求参数转换为零_Jsf_Configuration_Websphere_El_Faces Config - Fatal编程技术网

防止在WebSphereJSF中将null请求参数转换为零

防止在WebSphereJSF中将null请求参数转换为零,jsf,configuration,websphere,el,faces-config,Jsf,Configuration,Websphere,El,Faces Config,我们在faces配置中使用#{param.customId}从请求中获取参数。在glassfish2中,它工作正常,但在WebSphere7.0下,未定义的BigDecimal空值更改为零(0)。如何将websphere配置为与glassfish一样工作以获得这些值?也许它可以帮助: 在tomcat7中,空双字段的值在更新模型阶段更改为零。在我用glassfish el impl更改默认的tomcat“el”implemantation之后,这些值被读取为null <depende

我们在faces配置中使用#{param.customId}从请求中获取参数。在glassfish2中,它工作正常,但在WebSphere7.0下,未定义的BigDecimal空值更改为零(0)。如何将websphere配置为与glassfish一样工作以获得这些值?

也许它可以帮助:

在tomcat7中,空双字段的值在更新模型阶段更改为零。在我用glassfish el impl更改默认的tomcat“el”implemantation之后,这些值被读取为null

    <dependency>
        <groupId>org.glassfish.web</groupId>
        <artifactId>el-impl</artifactId>
        <version>2.2</version>
    </dependency>

org.glassfish.web
厄尔尼普勒
2.2
在web.xml中:

<context-param>
    <param-name>com.sun.faces.expressionFactory</param-name>
    <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
</context-param>

com.sun.faces.expressionFactory
com.sun.el.ExpressionFactoryImpl

看起来它知道这个问题。我正在寻找通用的解决方案,如定制转换器或在jsf上更改版本。但是我在为#{param.xxx}值实现自定义转换器时遇到了麻烦。