Hi All,
I am getting java.util.NoSuchElementException, i did work on this it is seems like that iterator doesn't contains any elements ,Please find the following code
Please find the LINK for more informatIn JSP i am Getting java.util.NoSuchElementException (Spring forum at JavaRanch)
In Spring Congtroller class:
try {
list=adminService.getAdminDetails();
} catch (CMSServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
mav.addObject("list", list);
return mav;
}
Here is list size coming around 7(records in Database ) But that DB valus not showing in jsp page ..
<table border="1" width="303">
<tr>
<td width="168"><b>USERNAME</b></td>
<td width="168"><b>Emp ID</b></td>
</tr>
<%int i = 1;%>
<%Iterator itr;%>
<% List data= (List)request.getAttribute("list");
for (itr=data.iterator(); itr.hasNext(); )
{
%>
<tr>
<td width="168"><%=itr.next()%></td>
<td width="168"><%=itr.next()%></td>
</tr>
<%} %>
</table>
Kindly suggest us,as earlist
Thanks
Anji
In JSP i am Getting java.util.NoSuchElementException (Spring forum at JavaRanch)In JSP i am Getting java.util.NoSuchElementException (Spring forum at JavaRanch)