2

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.

4

1 回答 1

3

Eclipse 经常在没有语法错误时发出信号,因为它无法正确解析 JavaScript(或其他组合)内的 HTML 内的 JSTL。

通过在您的服务器上部署并运行它来测试您的代码。如果它运行,那么您遇到了 Eclipse 错误。

于 2011-02-16T12:41:33.030 回答