JSP中的eq和==之间的区别 [英] difference between eq and == in JSP
本文介绍了JSP中的eq和==之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
JSP表达式语言中的关键字"eq"和运算符"=="之间有什么区别?
What is the difference, if any, between the keyword 'eq' and the operator '==' in JSP Expression Language?
在代码中,两者之间有什么区别
In code, what is the difference between:
<c:if test="${var1 eq var2}">some code</c:if>
和
<c:if test="${var1 == var2}">some code</c:if>
推荐答案
eq
存在(以及ne
,lt
等),因此您可以避免使用XML实体引用(<是XML字符并且需要以<
的形式转义),但它们的作用相同.
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 <
, for example), but they do the same thing.
有关更多信息,请参见 JSP中的比较运算符.
See Comparison operators in JSP for more info.
这篇关于JSP中的eq和==之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文