title: javax.servlet.jsp.JspTagException: Don't know how to iterate over supplied "items" in &lt;forEach&gt
body: <p>What I am want to do is to add a record to a table and then to display that newly added record in a jsp page.</p>
  <p>Here is what I tried:</p>
  <p>Controller:</p>
  <pre><code>@Controller
  public class UserController {
      
      @Autowired
      UserRepository userRepo;
      
      @RequestMapping(&quot;/adduser&quot;)    
      public String userform(Model m){    
          m.addAttribute(&quot;command&quot;, new Users());  
          return &quot;adduser&quot;;
      }
      
      @RequestMapping(&quot;/saveuser&quot;)
      public String save(@ModelAttribute(&quot;user&quot;) Users user,Model model){    
          userRepo.save(user);
          model.addAttribute(&quot;user&quot;, user);
          return &quot;forward:/user&quot;;   
      }
      
      @RequestMapping(&quot;/user&quot;)
      public String user(Model model) {
         
           return &quot;user&quot;;
      }
  
  </code></pre>
  <p>And the jsp page:</p>
  <pre><code>&lt;%@ page language=&quot;java&quot; contentType=&quot;text/html; charset=ISO-8859-1&quot;
      pageEncoding=&quot;ISO-8859-1&quot;%&gt;
  &lt;!DOCTYPE html&gt;
  &lt;%@ taglib prefix=&quot;spring&quot; uri=&quot;http://www.springframework.org/tags&quot;%&gt;
  &lt;%@ taglib prefix=&quot;c&quot; uri=&quot;http://java.sun.com/jsp/jstl/core&quot;%&gt;
  &lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
  
  &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot;
   href=&quot;webjars/bootstrap/3.3.7/css/bootstrap.min.css&quot; /&gt;
  &lt;c:url value=&quot;/css/main.css&quot; var=&quot;jstlCss&quot; /&gt;
  &lt;link href=&quot;${jstlCss}&quot; rel=&quot;stylesheet&quot; /&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
   &lt;div class=&quot;container&quot;&gt;
    &lt;div class=&quot;starter-template&quot;&gt;
     &lt;h1&gt;Product List&lt;/h1&gt;
     &lt;table
      class=&quot;table table-striped table-hover table-condensed table-bordered&quot;&gt;
      &lt;tr&gt;
       &lt;th&gt;Id&lt;/th&gt;
       &lt;th&gt;Color&lt;/th&gt;
       &lt;th&gt;Gender&lt;/th&gt;
       &lt;th&gt;Category&lt;/th&gt;
      &lt;/tr&gt;
      &lt;c:forEach var=&quot;u&quot; items=&quot;${user}&quot;&gt;
       &lt;tr&gt;
        &lt;td&gt;${u.userid}&lt;/td&gt;
        &lt;td&gt;${u.username}&lt;/td&gt;
        &lt;td&gt;${u.userphone}&lt;/td&gt;
        &lt;td&gt;${u.useremail}&lt;/td&gt;
       &lt;/tr&gt;
      &lt;/c:forEach&gt;
     &lt;/table&gt;
    &lt;/div&gt;
  
   &lt;/div&gt;
  
   &lt;script type=&quot;text/javascript&quot;
    src=&quot;webjars/bootstrap/3.3.7/js/bootstrap.min.js&quot;&gt;&lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  <p>Upon running the code the record is getting added successfully but It is not getting displayed instead I am getting the error mentioned in the title.</p>
  <p>What to do to make it work?</p>