title: how to display an object on jsp page?
body: <p>i m pretty new to Spring MVC, i m trying to setup a page to display user information</p>
  
  <p>I have trouble with the controler and the view.</p>
  
  <p>Controler (getDetail returns a User object, it has an email field) :</p>
  
  <pre><code> @RequestMapping("/{code}")
   public String get(@PathVariable long code,ModelMap model) throws Exception {
    model.addAttribute("user",simpleUserManager.getDetail(code));
    return "userdetail";
   }
  </code></pre>
  
  <p>in userdetail.jsp :</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  pageEncoding="ISO-8859-1"%&gt;
  &lt;%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%&gt;
  &lt;%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%&gt;
  &lt;%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%&gt;
  
  &lt;html&gt;
    &lt;head&gt;&lt;title&gt;&lt;fmt:message key="title"/&gt;&lt;/title&gt;&lt;/head&gt;
    &lt;body&gt;
  User Detail :
  ${user.email}
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But i get this error when i go on the page :</p>
  
  <pre><code>Request processing failed; nested exception is java.lang.IllegalArgumentException: Attribute value must not be null
  </code></pre>
  
  <p>I am using Spring 3, on Tomcat6</p>
  
  <p>So i hope you can tell me what i am doing wrong ...</p>
  
  <p>Thank you</p>