• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

@RequestAttribute in spring mvc not fetch the value

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,

@RequestAttribute in spring mvc not fetch the value.

I have a modelAttribute.here "foo" attribute is set a value of "bar"




I try to invoke the request attribute value for "foo" using @RequestAttribute("foo").But value is null.

Then i try using request.getAttribute("foo").value is printed. I not know what is wrong in @RequestAttribute("foo").





Please help me in this issue.

Regards,
Anand
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@RequestAttribute is not a Spring annotation, so I am not sure what you have going there. Of course it would not be hard to extend to Spring to add such an annotation using a custom WebArgumentResolver.
 
Anand Sivathanu
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

In HTTP Servlet request object, "foo" is set to value "bar".

Using @RequestAttribute("foo"), I try to fetch the value.

In spring showcase tutorial,they have mentioned that we can fetch the value of foo using @RequestAttribute("foo").

But not fetch. why it is not fetching? this is my question
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic