Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing information from a Action class to a JSP

 
Brian Egger
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • 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
 
s penumudi
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic