JSTL c:if does not recognize String inside ${} and causes EL syntax error

前端 未结 2 613
伪装坚强ぢ
伪装坚强ぢ 2020-12-12 04:11

Why are the "POST" and "submit" parts of this code highlighted in a different color in my IDE?

Also the syntax highlighter here doesn\'t h

2条回答
  •  粉色の甜心
    2020-12-12 04:59

    Inside the , your test attribute is a also a string, which is set with double quotes, and you also have "POST" as string literal which you are using inside string as string with double quotes. So compiler understands that as end of condition. In effects, you end up having a instead of the intended one.

    Replace the double quotes inside the test attribute with single quotes like this:

    
    
    
    

提交回复
热议问题