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 @RequestAttribute in spring mvc not fetch the value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "@RequestAttribute in spring mvc not fetch the value" Watch "@RequestAttribute in spring mvc not fetch the value" New topic
Author

@RequestAttribute in spring mvc not fetch the value

Anand Sivathanu
Ranch Hand

Joined: Jun 25, 2010
Posts: 76
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
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1666
    
    7

@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.


[How To Ask Questions][Read before you PM me]
Anand Sivathanu
Ranch Hand

Joined: Jun 25, 2010
Posts: 76

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: @RequestAttribute in spring mvc not fetch the value