防止在WebSphereJSF中将null请求参数转换为零
我们在faces配置中使用#{param.customId}从请求中获取参数。在glassfish2中,它工作正常,但在WebSphere7.0下,未定义的BigDecimal空值更改为零(0)。如何将websphere配置为与glassfish一样工作以获得这些值?也许它可以帮助: 在tomcat7中,空双字段的值在更新模型阶段更改为零。在我用glassfish el impl更改默认的tomcat“el”implemantation之后,这些值被读取为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
<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}值实现自定义转换器时遇到了麻烦。