Win a copy of Spark in Action this week in the Open Source Projects forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Request response object

Ranch Hand
Posts: 588
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Struts 1.2,Action's execute method has request ,response object and form object.Input data can be read thru form object and result data can be set in form object and displayed to user, then what is the use of request and response object in execute method.
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Passing the request object to your execute method gives you the option of adding additional attributes to it and passing them along to the JSP. It also alows you to retrieve the HTTPSession object if you want to set or retrieve session attributes.

The response object is less useful, but it comes in handy if you want to write a stream of data directly to the response such as an image or PDF file, rather than forwarding to a JSP. In this case, you'd just return a null ActionForward.
Tongue wrestling. It's not what you think. And here, take this tiny ad. You'll need it.
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic