| Author |
IllegalStateException:Neither BindingResult nor plain target object for bean name available
|
VenkataPrasad Regula
Ranch Hand
Joined: Jun 30, 2011
Posts: 63
|
|
I am facing this issue since yesterday
java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'customerAction' available as request attribute
I have set the value for command i.e commandName in jsp, Controller class and xxx-servlet class. All are thge same I am still facing the exception
POJO file
Controller File
bean mapping file
JSP File
|
 |
VenkataPrasad Regula
Ranch Hand
Joined: Jun 30, 2011
Posts: 63
|
|
This is what happens in my case.
1. The login page is filled and submitted. The login page has its command class which is a pojo
2. After submission it is forwarded to a new page which has drop down menu. Hence the new page has an other command class by itself, to load the data related to that page. As I
mention the name of the command class in the jsp while loading the jsp it is displaying the error java.lang.IllegalStateException: Neither Binding Result nor plain target object for
bean name available as request attribute
|
 |
VenkataPrasad Regula
Ranch Hand
Joined: Jun 30, 2011
Posts: 63
|
|
|
Which ever site I visit on Google, I am finding a form being submitted and the data is being displayed on the second form. Here I have a page(page1) which has a command object to itself and on submission, It moves to second page(page2). page 2 has its own form objects as textbox, dropdown etc. Hence it has its own command object.AS I mention the command object in the second page it is throwing the error, java.lang.IllegalStateException: Neither Binding Result nor plain target object for bean name available as request attribute
|
 |
VenkataPrasad Regula
Ranch Hand
Joined: Jun 30, 2011
Posts: 63
|
|
I have not done any thing as DI. I have page 1(Login page). Once the page is submitted it is supposed to go to home page as given below in the success view in bold. The seconddpage Home page has a dropdown menu, for which I created a pojo, to store the data related to that page. I mentioned that class, in the command class and command and mentioned the classname commandclassname of the secong jsp page and the controller class related to that class. It is giving the error(Neither BindingResult nor plain target object for bean name available).
|
 |
Tommy Delson
Ranch Hand
Joined: Apr 13, 2011
Posts: 206
|
|
Your problems is similar to other post I have provided the solution see below.
http://www.coderanch.com/t/547929/Spring/IllegalStateException-Neither-BindingResult-nor-plain
Refer to Spring document and other resources for how to do correctly.
|
OCPJP6-05-11
"Your life is in your hands, to make of it what you choose."
|
 |
VenkataPrasad Regula
Ranch Hand
Joined: Jun 30, 2011
Posts: 63
|
|
Tommy,
You appear to have given the wrong url. The URL that has been provided is the URL of my question
|
 |
Tommy Delson
Ranch Hand
Joined: Apr 13, 2011
Posts: 206
|
|
|
My bad, here you go: http://www.coderanch.com/t/547675/Spring/Neither-BindingResult-nor-plain-target
|
 |
 |
|
|
subject: IllegalStateException:Neither BindingResult nor plain target object for bean name available
|
|
|