I found the answer to this question on the Internet today, so I posted it on my blog to avoid remembering it later.Use $ {list. size} will be compiled into list. the getsize () method cannot obtain the length of the list. Because the program returns to the getsize () method in the list object, it can only find other methods, one way is to declare a variable in the background program action to store the length of the list, and set get for this variable
Set method, but this method is a bit troublesome, and there is another variable. Another method can be implemented using the functions function in jstl. The specific steps are as follows:
1. Introduce jstl and jstl function packages
<% @ Taglib uri = "http://java.sun.com/jsp/jstl/core" prefix = "C" %> <% @ taglib uri = "http://java.sun.com/jsp/jstl/functions" prefix = "FN" %>
2. Call the jstl function as follows to obtain the list length.
$ {Fn: length (list )}
Address: http://zhanglulu33.blog.163.com/blog/static/112799542011625105431330/