0

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

4

1 回答 1

1

也许它可以帮助:

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

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

在 web.xml 中:

<context-param>
    <param-name>com.sun.faces.expressionFactory</param-name>
    <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
</context-param>
于 2011-05-31T13:28:16.290 回答