Should I choose == or eq for comparing string in EL?

前端 未结 3 1051
不知归路
不知归路 2020-12-24 11:10

== and eq give the same result using EL to do my string comparison tests:

    

        
3条回答
  •  执念已碎
    2020-12-24 11:39

    Both are same. Both == and eq will result in the following code:

    jspContext.findAttribute("person.sokande_i").equals("endast_usa")
    

    for EL

    ${person.sokande_i == 'endast_usa'}
    

提交回复
热议问题