- Joined
- Dec 16, 2008
- Messages
- 5
- Reaction score
- 0
for the first iteration of inner loop gives me all values, but for the second iteratoion onwords of outer loop inner loop shows "no data found error" that i have written in itr.hasNext()==false.
</tr>
<%
Iterator itr = (Iterator)request.getAttribute("getByAll");
if( itr.hasNext()==false){%>
<font color="#CC3333">No data found
</font>web_category_id
<%}else
while(itr.hasNext()){
WebProfileDetailsBean bean1 = (WebProfileDetailsBean )itr.next();
%>
<tr>
<td width="255"> <%=bean1.getWeb_category_id() %> </td>
<td width="255"> <%=bean1.getProfile_id() %> </td>
<% int pid=bean1.getProfile_id() ;
System.out.println(pid);
%>
<%
Iterator itr1 = (Iterator)request.getAttribute("getByAll1");
if( itr1.hasNext()==false){%>
<font color="#CC3333">No data found
</font>web_category_id
<%}else
while(itr1.hasNext()){
int flag=0;
WebCategoryBean bean2 = (WebCategoryBean)itr1.next();
%>
<td width="255"> <%=bean2.getWeb_category_name() %> </td>
<% }
%>
</tr>
<%
} %>
</table>
</tr>
<%
Iterator itr = (Iterator)request.getAttribute("getByAll");
if( itr.hasNext()==false){%>
<font color="#CC3333">No data found
</font>web_category_id
<%}else
while(itr.hasNext()){
WebProfileDetailsBean bean1 = (WebProfileDetailsBean )itr.next();
%>
<tr>
<td width="255"> <%=bean1.getWeb_category_id() %> </td>
<td width="255"> <%=bean1.getProfile_id() %> </td>
<% int pid=bean1.getProfile_id() ;
System.out.println(pid);
%>
<%
Iterator itr1 = (Iterator)request.getAttribute("getByAll1");
if( itr1.hasNext()==false){%>
<font color="#CC3333">No data found
</font>web_category_id
<%}else
while(itr1.hasNext()){
int flag=0;
WebCategoryBean bean2 = (WebCategoryBean)itr1.next();
%>
<td width="255"> <%=bean2.getWeb_category_name() %> </td>
<% }
%>
</tr>
<%
} %>
</table>