Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring MVC: How to handle to different command object for two different forms

 
VenkataPrasad Regula
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two jsp pages. On page 1, I enter the data and submit the form. I have set the command class and command name in bean definition and the same command name in jsp page. Same set up for jsp page 2. It has its own command class, command class name in bean definition and the same name in jsp. As i click SUBMIT on JSP 1, I am getting the following error

Error at the line <td><form:input path="userName"/> </td> of page 2
Neither BindingResult nor plain target object for bean name 'customerForm2' available as request attribute

Both the controllers extend SimpleFormController

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic