Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing objects from beans to jsp

 
Tim Sarver
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How can one grab an object from a bean within a jsp? For example, if one has a bean that places data into an array or vector that is then passed to a jsp to loop through. Any thoughts?
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Tim Sarver:
Hi,
How can one grab an object from a bean within a jsp? For example, if one has a bean that places data into an array or vector that is then passed to a jsp to loop through. Any thoughts?


Is this the best way to go about it? Arguably not. You can get rid of the last bits of code in your JSP by either instantiating the iterator and holding the current foo object in a JavaBean, or even better, by using tag libraries.
- Peter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic