I'm getting a null pointer exception pointing to the line containing
dispatcher.forward(request,response);
Any suggestions as to where i have gone wrong. it wud be of gr8 help...
thanks in advance:)
ArrayList empList =EmployeeDao.getEmpDetail();//this is defined already
request.setAttribute("empList",empList);
RequestDispatcher disp = request.getRequestDispatcher("/myPage.jsp")
disp.forward(request,response);
ArrayList employeeList=null;
ArrayList employeeList=(ArrayList)request.getAttribute("empList");
if(!employeeList.isEmpty())
{
for(int i=0;i<employeeList.size();i++)
{
%>
<tr>
<Td><%=employeeList.get(0)%></Td>
<Td><%=newslist.get(1)%></Td>
</tr>
<%
}
}
%>