开发者

difference between eq and == in JSP

What is the difference, if any, between the keyword 'eq' and the operator '==' in 开发者_如何学PythonJSP Expression Language?

In code, what is the difference between:

<c:if test="${var1 eq var2}">some code</c:if>

and

<c:if test="${var1 == var2}">some code</c:if>


eq exists (as well as ne, lt, etc) so you can avoid using XML entity references (< is an XML character and would need to be escaped as &lt;, for example), but they do the same thing.

See Comparison operators in JSP for more info.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜