问题
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.
回答1:
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>
来源:https://stackoverflow.com/questions/6641650/jsp-error-escape-quotes-in-expression