title: list of objects from controller to jsp and <c:forEach>
body: <p>I try to send list of Employee from Spring MVC controller and then use it in jsp with forEach loop but receive blank page. </p>
  
  <p>What is wrong? </p>
  
  <p>Here is my code:</p>
  
  <pre><code>@RequestMapping(value = "getuserbylastname", method = RequestMethod.GET)
  Employee employee, ModelMap model) {
  public ModelAndView searchUserByLastname(@ModelAttribute("employee")Employee employee, ModelMap model) {
      List emplList = new ArrayList();
      EmployeeDAO employeeDAO = new EmployeeDAOImpl();
      emplList = employeeDAO.getByLastname(employee.getLastName());// here list size is 2
      model.addAttribute("listOfEmployees", emplList);
      return new ModelAndView("redirect:/searchbysurnameresult", "Model", emplList);
  }
  </code></pre>
  
  <p><strong>jsp:</strong></p>
  
  <pre><code>&lt;html&gt;
   &lt;body&gt;
   &lt;c:forEach var="employee" items="${Model}"&gt;
     &lt;c:out value="${employee.firstName}"/&gt;
   &lt;/c:forEach&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>P.S.I have a taglib url in JSP but there is a problem to display it like code at this site</p>