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