title: java.lang.NumberFormatException: For input string: "name"
body: <p>when i want to display the list in my jsp page.i'm getting this error</p>
  
  <p>my foreach loop to display the list:</p>
  
  <pre><code>&lt;c:forEach  var="list" items="${consultantsList}" varStatus="iter"&gt;
  &lt;c:out value="${list.name}"&gt;&lt;/c:out&gt;
   &lt;/c:forEach&gt;
  </code></pre>
  
  <p>my controller:</p>
  
  <pre><code>@Controller
  @RequestMapping("/patient")
  public class PatientController {
  
  @Autowired
  private PatientService patientService;
  
  @RequestMapping(value="/registerPatient.htm")
  public ModelAndView getRegisterPage()
  {
      ModelAndView modelAndView=new ModelAndView();
      modelAndView.setViewName("register");
      List&lt;Consultant&gt; list=patientService.getAllConsultant();
      modelAndView.addObject("consultantsList",list);
      modelAndView.addObject("patient", new Patient());
  
      return modelAndView;
  }
  </code></pre>
  
  <p>when i completely remove the foreach loop the jsp will display without any exception.</p>
  
  <p>Exception:
  <code>org.springframework.web.util.NestedServletException: Request processing failed; nested        exception is org.apache.tiles.impl.CannotRenderException: ServletException including path        '/WEB-INF/jsp/i1-smhBaseLayout.jsp'.
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.ja        va:656)
      org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)</code>
  root cause:</p>
  
  <pre><code>org.apache.tiles.impl.CannotRenderException: ServletException including path '/WEB-INF/jsp/i1-smhBaseLayout.jsp'.
  org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:692)
  org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:644)
  org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:627)
  org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:321)
  org.springframework.web.servlet.view.tiles2.TilesView.renderMergedOutputModel(TilesView.java:124)
  org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
  org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
  org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
  org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
  org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
  org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  </code></pre>