File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Configure success view to be the same form view Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Configure success view to be the same form view" Watch "Configure success view to be the same form view" New topic
Author

Configure success view to be the same form view

Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hi,

I have a question about success view in Spring MVC 2.5.

Supposed my workflow is like this: I have a JSP which has a search functionality. On click of the find button,
I wanted to show the same jsp again with the table populated.
Here's my sample jsp.


I configured my controller like this. Both form view and success view are the same.



Here's my controller.



Problem is, when I click the find button. I encounter below error.

Neither BindingResult nor plain target object for bean name 'equipmentdetail' available as request attribute

On click of the find button, I wanted to retain the same criteria during the find and not clear it. I basically dont want to redirect but just a mere forward. Any thoughts?


Sean Clark ---> I love this place!!!
Me ------> I definitely love this place!!!
Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hi,

I found my solution. Just in case anybody will be interested.

I look at the javadocs of simpleformcontroller and saw the showform method.

Better read the javadocs next time..
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Configure success view to be the same form view
 
Similar Threads
Unable to call Controller method after form submission using Spring MVC 3
Problem with getSuccessView
Unable to Redirect to the On submitting a form
Neither BindingResult nor plain target object for bean name 'user' available as request attribute
IllegalStateException:Neither BindingResult nor plain target object for bean name available