JSTL Sets and Lists - checking if item exists in a Set

前端 未结 2 981
暗喜
暗喜 2020-12-23 11:49

I have a Java Set in my session and a variable also in the session. I need to be able to tell if that variable exists in the set.

I want to use the contains ( Obj

2条回答
  •  失恋的感觉
    2020-12-23 12:28

    If you are using Spring Framework, you can use Spring TagLib and SpEL:

    <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
    ---
    
    
    Contains (true or false): ${containsValue}
    

提交回复
热议问题