开发者

What's wrong with this JSF EL statement?

开发者 https://www.devze.com 2023-02-15 06:42 出处:网络
Code <c:if test=\"#{a开发者_如何学Gottr1 && !attr2 && (empty attr3)}\"> Error returned

Code

<c:if test="#{a开发者_如何学Gottr1 && !attr2 && (empty attr3)}">

Error returned

The entity name must immediately follow the '&' in the entity reference.

I simply need to check if attribute 1 is true, attribute 2 is false and attribute 3 is not set. Tried without parentheses on first chance, same result.

Thank you


It expects entity name, like &amp;. You can use &amp; &amp; or replace it with and for better readability.


The reason for the behavior you're seeing is that & is a reserved character in XML. Replace with &amp or and like n0weak advised.

0

精彩评论

暂无评论...
验证码 换一张
取 消