How to select the first element of a set with JSTL?

前端 未结 9 1450
逝去的感伤
逝去的感伤 2020-12-02 17:53

I managed to do it with the next code but there must be an easier way.

<%@ taglib prefix=\"c\" uri=\"http://java.sun.com/jsp/jstl/core\" %>
<%@ tag         


        
9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-02 18:43

    Sets have no order, but if you still want to get the first element you can use the following:

    
         
                                                            
提交回复
热议问题