jboss 中 jsf 中 setter 字符串提交为空串时bean属性不能为NULL的解决方法

在vm 中 "-Dorg.apache.el.parser.COERCE_TO_ZERO=false"
在web.xml 中添加<context-param>
  <description>STRING_SUBMITTED_VALUES_AS_NULL</description>
  <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
  <param-value>true</param-value>

猜你喜欢

转载自laiy2007.iteye.com/blog/2276872