• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring MVC 3: java.lang.IllegalStateException

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In your jsp don't you need

#{} around all the variable names?

Mark
 
Rohit Bhal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 will open the floodgates of his own worst nightmare! All in a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic