*
The moose likes Spring and the fly likes Spring MVC 3: java.lang.IllegalStateException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring MVC 3: java.lang.IllegalStateException" Watch "Spring MVC 3: java.lang.IllegalStateException" New topic
Author

Spring MVC 3: java.lang.IllegalStateException

Rohit Bhal
Ranch Hand

Joined: Aug 28, 2007
Posts: 44
Hi
Could someone help me understand what am I doing wrong in the following code due to which I am getting this error:


UserManagementController.java



signUp.jsp


Could someone help me understand it?

Thanks.


Skip Skipping
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

In your jsp don't you need

#{} around all the variable names?

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Rohit Bhal
Ranch Hand

Joined: Aug 28, 2007
Posts: 44
Hi Mark
I am using the User backing object for form representation. Do you think we need ${} around all the variables for that?
I have never handled form using ${} around variables in spring mvc 3.
I am just not able to understand why am I getting this error and what am I doing wrong here?

Thanks for reply though

Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Deshraj Kiran wrote:Hi Mark
I am using the User backing object for form representation. Do you think we need ${} around all the variables for that?
I have never handled form using ${} around variables in spring mvc 3.
I am just not able to understand why am I getting this error and what am I doing wrong here?

Thanks for reply though



Yes "$" not "#" sorry got my symbols mixed up.

Which uses ${myvar}, if you don't have it, the jsp has no idea what myvar by itself means.

Mark
Rohit Bhal
Ranch Hand

Joined: Aug 28, 2007
Posts: 44
Hi Mark
I was mistakenly using the wrong import for ModelAndView.
I was supposed to use org.springframework.web.servlet.ModelAndView but the one I was mistakenly using was org.springframework.web.portlet.ModelAndView.

I've got the code working now.

Thanks
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Deshraj Kiran wrote:Hi Mark
I was mistakenly using the wrong import for ModelAndView.
I was supposed to use org.springframework.web.servlet.ModelAndView but the one I was mistakenly using was org.springframework.web.portlet.ModelAndView.

I've got the code working now.

Thanks


Cool.

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring MVC 3: java.lang.IllegalStateException
 
Similar Threads
java. lang. IllegalStateException: Neither Binding Result nor plain target object
problem while loading the welcome page
Unable to call Controller method after form submission using Spring MVC 3
Problem with validation example
Neither BindingResult nor plain target object for bean name 'user' available as request attribute