Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

-Dorg.apache.el.parser.COERCE_TO_ZERO for glassfish?

Tags:

jsf

glassfish

Do we have anything like -Dorg.apache.el.parser.COERCE_TO_ZERO for glassfish also?

like image 440
Preet Avatar asked Jan 20 '12 09:01

Preet


1 Answers

No. Glassfish uses a different EL implementation which behaves by default already the same as when you would set -Dorg.apache.el.parser.COERCE_TO_ZERO to false on Tomcat and clones.

Perhaps you're looking for the following JSF context parameter.

<context-param>
    <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
    <param-value>true</param-value>
</context-param>

Note that the above is even required on Tomcat and clones and well if your intent is to let JSF set empty string submitted values as null instead of 0 on primitive wrapper properties like Long, Integer, etc.

like image 59
BalusC Avatar answered Oct 18 '22 06:10

BalusC