How to get array list size in java jsp?

后端 未结 4 766
一向
一向 2020-12-17 08:31

I have a form that ask for user to enter ID. This form is send to a servlet which checks database to see if user exist. If the user exists then it sends me back their ordere

4条回答
  •  有刺的猬
    2020-12-17 09:09

    Use fn:length function.

    Declare fn namespace on the begining of the JSP file

    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
    

    Later in the code

    ${fn:length(collection)}
    

提交回复
热议问题