Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes passing objects from beans to jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "passing objects from beans to jsp" Watch "passing objects from beans to jsp" New topic
Author

passing objects from beans to jsp

Tim Sarver
Greenhorn

Joined: Apr 14, 2001
Posts: 2
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

Joined: Apr 20, 2000
Posts: 3252
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
 
 
subject: passing objects from beans to jsp