The function size must be used with a prefix when a default namespace is not specified
The function get must be used with a prefix when a default namespace is not specified
解决方法:
在EL表达式中${}调用了不能调用的方法,即,不可以这样 ${currentUser.sectionList.size()==0&¤tUser.type!=2 },${sectionTopicCount.get(section)} 而是要这样 ${currentUser.sectionList.size==0&¤tUser.type!=2 },${sectionTopicCount.section}要省略括号和get,也就是直接用模型里面的属性就可以了,才能正确运行!
获取List长度
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
${fn:length(currentUser.sectionList)}