File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Portals and Portlets and the fly likes  RendarReq.getAttribute() displaying always null which is set by ActionReq.setAttribute() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark " RendarReq.getAttribute() displaying always null which is set by ActionReq.setAttribute()" Watch " RendarReq.getAttribute() displaying always null which is set by ActionReq.setAttribute()" New topic
Author

RendarReq.getAttribute() displaying always null which is set by ActionReq.setAttribute()

Komari raj
Ranch Hand

Joined: Dec 12, 2008
Posts: 43
HI All,

I am setting value in Request Attribute using Actionreq.setAttribute("name","Raj") in ProcessAction() method when ever action performed on portlet.

I am getting value as null from Request Attribute using Renderreq.getAttribute("name") in doView() method.

Any Suggestions.


Regards
Raju


David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

1) is there a send redirect in the middle?
2) are they in the same request?
Komari raj
Ranch Hand

Joined: Dec 12, 2008
Posts: 43
1 a) No
2 a) yes for same request( After performing any action on portlet) from ProcessAction() to doView

Regards
Raju
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

value is null for me as well when I use actionRequest.setAttribute and renderRequest.getAttribute.

Following portlet examples I saw online, I have always used

in processAction
and


in doView

but I don't know exactly why your way wouldn't work and mine would?
Komari raj
Ranch Hand

Joined: Dec 12, 2008
Posts: 43
Hi TIM,
Thank you Verymuch..


Regards
Raju
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RendarReq.getAttribute() displaying always null which is set by ActionReq.setAttribute()