title: How to pass a complex ModelAttribute using redirect: in Spring MVC 3.0
body: <p>Hi all question I'm having problems finding an answer for...</p>
  
  <p>Use Case:</p>
  
  <p>Reading in an Excel spreadsheet in a controller. A 4 row sheet was processed and row 2 and 3 had some errors in it, so I skip them and move on with the rest of the processing. But I want to retain these rows to display to the user after the processing is complete. I'd like to retain all the values in the row to display back to the user just to provide enough information.</p>
  
  <p>So what I tried to do was this:
      </p>
  
  <pre><code>@RequestMapping(value = "/bulk-create", method = RequestMethod.POST)
  public String bulkCreate(Model model, SpreadSheetFile spreadSheetFile){
    ...some code...
  
    List&lt;Row&gt; errorRows = new LinkedList&lt;Row&gt;();
  
    ...some code to process rows...
  
    //Error Found
    errorRows.add(row);
  
    ...more code to wrap up processing (possibly more errors)...
  
    model.addAttribute("erroRows", errorRows);
    return "redirect:/bulk-review"
  }
  
  @RequestMapping(value = "/bulk-review", method = RequestMethod.GET)
  public String bulkReview(Model model, 
                           @ModelAttribute("errorRows")
                           LinkedList&lt;Row&gt; errorRows){
    model.addAttribute("errorRows", errorRows);
    return "bulk-review";
  }
  </code></pre>
  
  <p>So basically I'm trying to pass a LinkedList from one MVC method to another without actually hitting a page first (unless I'm misunderstanding how "redirect:" works... it calls the controller method first correct?)</p>
  
  <p>When I but a break point into the bulkReview method, errorRows is empty... So how do I retain this value between the two methods?</p>
  
  <p>Thanks for the help! Let me know if I need to clarify anything! :)</p>
  
  <p>Kris</p>