This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
jQuery in Action, 2nd edition
 
subject: passing objects from beans to jsp
 
Similar Threads
Call spring bean inside JSP/struts2 bean from a JSP
As i am drawing sequence diagram for prepare itinerary...
Passing array from bean to JSP
Question on Statefull Session Bean
Help me using bean in JSP