Skip to main content

Spring MVC Form validation. Unable to read Domain object in jsp.

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-05-17

I am Developing a simple Spring MVC form Validation, but Stucked. Domain object in JSP is showing null.
Validation is working fine, I checked Domain Object (user in my case) prints values using service methods.
But shows null in jsp. I even tried using Jsp:usebeans bu same happened.
OnSubmit method of

public ModelAndView onSubmit(Object command)
User user = (User) command;

return new ModelAndView("userSucess","user",user);

My Sucess.jsp
<%@ taglib uri="" prefix="c"%>
<%@page import="com.spring.domain.User;"%>
<jsp:useBean id="userDetails" class="com.spring.domain.User" scope="session"></jsp:useBean>

<title>Success Page</title>
<hr />
< %>
<%=userDetails.password %>
User Name : <c:out value="${}"></c:out> <br/>
Gender : <c:out value="${userDetails.gender}"></c:out><br/>
Country : <c:out value="${}"></c:out><br/>
About You : <c:out value="${}"></c:out><br/>


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2011-05-17

Any Help !!