setting session attributes
843840Nov 9 2007 — edited Nov 9 2007hi,
i want to set List employees into session,but i was performing this using below code i am not able to do at all .i am getting hell NULL pointer exception
can anybody help me in resolving this please .itz again urgent
Thanx in advance
below is my code
public ActionForward getEmployees(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
populateEmployees(request);
List array=(List)request.getAttribute("employees");
session.setAttribute(Constants.EMPLOYEES,array);
return mapping.findForward(Constants.SUCCESS);
}
private void populateEmployees(HttpServletRequest request) {
List employees = empService.getAllEmployees();
request.setAttribute(Constants.EMPLOYEES, employees);
}