aspose file tools*
The moose likes Spring and the fly likes Spring MVC: How to handle to different command object for two different forms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring MVC: How to handle to different command object for two different forms" Watch "Spring MVC: How to handle to different command object for two different forms" New topic
Author

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

VenkataPrasad Regula
Ranch Hand

Joined: Jun 30, 2011
Posts: 63
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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring MVC: How to handle to different command object for two different forms