Apache el実装は、空の文字列(または0のint値)を行います。あなたはorg.apache.el.parser.AstValueクラスでそれを見つけることができます。
public void setValue(EvaluationContext ctx, Object value)
throws ELException {
Target t = getTarget(ctx);
ctx.setPropertyResolved(false);
ELResolver resolver = ctx.getELResolver();
// coerce to the expected type
Class<?> targetClass = resolver.getType(ctx, t.base, t.property);
if (COERCE_TO_ZERO == true
|| !isAssignable(value, targetClass)) {
resolver.setValue(ctx, t.base, t.property,
ELSupport.coerceToType(value, targetClass));
} else {
resolver.setValue(ctx, t.base, t.property, value);
}
if (!ctx.isPropertyResolved()) {
throw new PropertyNotFoundException(MessageFactory.get(
"error.resolver.unhandled", t.base, t.property));
}
}
あなたは(-Dorg.apache.el.parser.COERCE_TO_ZERO = false)をfalseにCOERCE_TO_ZEROを設定することができます。
または使用する他のELのimpl:
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
<version>2.2</version>
</dependency>
と設定コンテキストのparam:
servletContext.setInitParameter("com.sun.faces.expressionFactory", "com.sun.el.ExpressionFactoryImpl");
EL-API側でした。
その他の側はJSFです。JSF用にこのコンテキスト・パラメータを設定する必要があります。
servletContext.setInitParameter("javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL", "true");
私の英語のために申し訳ありません!
実装上のバグかもしれません。環境をデバッグして、それがmojarraソースのバグかどうかを確認できますか? –
Java EE 7/EL 3.0以来、[javax.faces.INTERPRET \ _EMPTY \ _STRING \ _SUBMITTED \ _VALUES \ _AS \ _NULLの複製はもう使用できません](http://stackoverflow.com/questions/21880017/javax-faces -interpret-empty-string-submitted-values-as-null-does-not-work-anymor) – BalusC