• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Komari raj
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) is there a send redirect in the middle?
2) are they in the same request?
 
Komari raj
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi TIM,
Thank you Verymuch..


Regards
Raju
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic