• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting and getting request attributes across action calls

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following snippet in one of my jsp:



On click of the url, I'm calling an action as is evident from the code above. in my action class, I want to decide on redirection based on the myName attribute. But it evaluates to null when I get this attribute in my action class called by the url. Am I doing anything wrong? I guess yes.
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My understanding is that the request object used when the jsp page is being rendered is gone and when I click the url, a new request object gets generated and this guy does not have the attribute set. The goal here is, I'm going to use this attribute's value to control redirection from my action class. All I want here is to ship a request parameter or a request attribute (which is visible in the rendering jsp) to the action and based on the value, redirect the action accordingly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic