-Dorg.apache.el.parser.COERCE_TO_ZERO 用于 glassfish?
我们也有类似 -Dorg.apache.el.parser.COERCE_TO_ZERO 的 glassfish 吗?
Do we have anything like -Dorg.apache.el.parser.COERCE_TO_ZERO for glassfish also?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不会。Glassfish 使用不同的 EL 实现,其默认行为与您在 Tomcat 和克隆上将
-Dorg.apache.el.parser.COERCE_TO_ZERO
设置为false
时的行为相同。也许您正在寻找以下 JSF 上下文参数。
请注意,上面的内容甚至在 Tomcat 和克隆上也是必需的,并且如果您的目的是让 JSF 将空字符串提交值设置为
null
而不是0
等原始包装器属性上的0
代码>长整型、整数
等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
tofalse
on Tomcat and clones.Perhaps you're looking for the following JSF context parameter.
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 of0
on primitive wrapper properties likeLong
,Integer
, etc.