2

I need to check type to display correct message like:

${row.type} <c:if test="${row.stype ==\"Note\" }">Important Note</c:if>

But the problem that escaping produce strange error: Unable to analyze EL expression due to lexical analysis error

How it can be fixed? Thanks.

Lorenzo Manucci
  • 850
  • 2
  • 14
  • 28

1 Answers1

2

Double quotes must not be escaped in EL. Use single quotes if the tag attribute is in double quotes, and vice-versa:

<c:if test="${row.stype == 'Note'}">Important Note</c:if>

or

<c:if test='${row.stype == "Note"}'>Important Note</c:if>
JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255