• 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

Passing information from a Action class to a JSP

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello I am trying to pass a ResultSet from an ActionClass into a JSP. But I would prefer not to use the request.setAttribute(). Is there a way someone can point me to research. I tied using the ActionForm but for some reason whenever I call it from the JSP it is null. I figured this was because I am not submitting a form to it. Any suggestions would be appreciated.

Thanks
 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you have setResultSet() and getResultSet() with a private variable resultset in your ActionForm.

how did you set your resultset to the ActionForm?
Did you use setResultSet() method.

If all above steps are done, then I guess you should be able to get the result by calling getResultSet() from your JSP.

Other solution would be to hold the resultset in session scope.

Hope this helps.
 
Brian Egger
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yeah there is a Getter and Setter, I pass it to the form as a Collection of ValueObjects which all have getter and setter methods appended to them. When I send it in the request.getParameter() it sees it fine, and I can iterate through the Collection, but when I put the Collection inside the form it never comes through. I guess I will just keep it in the request.

Thanks for the Help
Brian
 
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic