public List findteachers(){
Session session=this.getHibernateTemplate().getSessionFactory() .openSession();
String queryString = "select username,count(id) from TXiaoc group by username order by count(id) desc";
Query a = session.createQuery(queryString);
List list = a.list();
session.close();
return list;
}
查询返回的是 用户名和该用户出现的次数
请问这返回的List怎么在JSP页面中显示出来?
<%
List res = (List) request.getAttribute("teach");
%>
<%
for(int i=0;i<res.size();i++) {
XXXXXXXXXXXXXX
}
%>
XXXXXXXx中的代码应该怎么写?