I'm getting a NullPointerException
that I couldnt handle. I'm a newbie in java so I'd appreciate any help.
<%
Employee employees[] = (Employee []) request.getAttribute("arr");
Integer arr_size= (Integer) request.getAttribute("arr_size");
for(int i=0;i<employees.length;i++){ %>
<tr><td><b>.</b></td><td><%=employees[i].getName()%></td><td>
<%=employees[i].getLname()%></td><td><%=employees[i].getType()%></td><td>
<%=employees[i].getEmail()%></td><td><a href="">Edit Employee Details</a></td>
</tr>
<%}%>
arr
array and arr_size
is passed from a servlet and I jsp gives an NullPointerException
.
I tried checking if employees
and arr_size
is null
or not but it doesn't change anything.
thanks.