开发者

What's wrong with this JSF EL statement?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜