Syntax Error in Eclipse when ! char is in jstl tag inside javascript script

1.2k Views Asked by At

I have this .jsp file:

<script language="javascript">
    <c:if test="1!=2">
    </c:if>
</script>

and I got Syntax Error 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.

1

There are 1 best solutions below

0
On BEST ANSWER

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.