• 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

doubt in Passing java object from jsp to Action

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can we pass a java object from jsp to action by using request.setAttribute method. I have one issue regarding this in my project.Otherwise If any other way available means pls suggest me


Pls help me



Thanks
Sankar Kandasamy
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, you can't. When a JSP is rendered and the response sent back to the browser, the request object becomes out of scope. Therefore, any attrubutes you set in the request object in the JSP will be gone by the time the execute method of the Action class is called.

The best way to pass information from the JSP to the action is with input fields, either hidden or displayed.
reply
    Bookmark Topic Watch Topic
  • New Topic