• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Setting and getting request attributes across action calls

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic