Syntax Error in Eclipse when ! char is in jstl tag inside javascript script
I have this .jsp file:
<script language="javascript">
<c:if test="1!=2">
</c:if>
</script>
and I got Syntax E开发者_如何学Gorror in Eclipse WTP (STS), and if I have this: <c:if test="1==2">
there is no Syntax Error.
<c:if test="1!=2">
in this file outside <script>..</script>
is ok.
Eclipse often signal syntax errors when there is none, because it fails parsing JSTL inside HTML inside JavaScript (or other combinations) correctly.
Test your code by deploying it on your server and running it. If it runs, then you've encountered an Eclipse bug.
精彩评论