<c:forEach items="${xunchayuan}" var="list" varStatus="i">
<tr align="center" class="bai">
<td width="57">${i.index+1}</td>//自增序号
<td width="92">${list.name}</td>
<td width="63">${list.sex}</td>
<td width="64">${list.age}</td>
<td width="133">${list.posiyion}</td>
<td width="205">${list.group}</td>
<td width="244">${list.phone}</td>
<td width="82">修改</td>
</tr>
<tr align="center" class="bai">
<td width="57">${i.index+1}</td>//自增序号
<td width="92">${list.name}</td>
<td width="63">${list.sex}</td>
<td width="64">${list.age}</td>
<td width="133">${list.posiyion}</td>
<td width="205">${list.group}</td>
<td width="244">${list.phone}</td>
<td width="82">修改</td>
</tr>
</c:forEach>
//巡查员信息
public List<Inspector> xunchayuan() {
Session session=super.getSession();
String hql="from Inspector i where i.id in (select l.inspectorId from Login l where l.rt=5)";
Query query=session.createQuery(hql);
return query.list();
}
(select l.inspectorId from Login l where l.rt=5) 结果不是一个,不能用等号,用 in