Error returns The entity should immediately...">

What happened to this JSF EL statement?

code

<c:if test="#{attr1 && !attr2 && (empty attr3)}"> 

Error returns

The entity should immediately follow the "&" in the entity link.

I just need to check if attribute 1 is true, attribute 2 is false, and attribute 3 is not set. I tried without parentheses at the first chance, the same result.

thanks

+4
source share
2 answers

It expects the name of the entity, for example , & amp;. You can use & amp ; & amp ; or replace it for better readability.

+15
source

The reason you see the behavior is that & is a reserved character in XML. Replace with & or and as described below.

0
source

Source: https://habr.com/ru/post/1342278/


All Articles