Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #107.41K
The code I have written in Servlet is as follows: [code=Java]ArrayList news=admindelegate.getNewsdelegate();//this is defined already request.setAttribute("news",news); rd = request.getRequestDispatcher("ViewNews2.jsp"); rd.forward(request,response);[/code] and my JSP code is: [code=JSP]ArrayList newslist=null; ArrayList newslist=(ArrayList)request.getAttribute("news"); int newscount= newslist.size(); System.out.println("newscount:"+newscount); if(!newslist.isEmpty()) { for(int i=0;i<newscount;i++) { %> <tr> <Td><%=newslist.get(0)%></Td> <Td><%=newslist.get(1)%></Td> </tr> <% } } %>[/code] But this table … |