Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

call vector form bean to jsp

 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've created a bean in which i,am storing 3 elements inside a LinkedList......i want to call these elements inside jsp .....what should i do ?
[This message has been edited by raghav mathur (edited January 14, 2001).]
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where are you creating the bean? In a servlet (where it should be)?
If so, the Servlet needs to put the bean in the (Http) request or (Http) session object and then dispatch to the JSP which would take it from there.
This is the recommended way of doing it at least for medium to big apps.
 
rgopi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
write a method which stores values into a linked list (or whatever storage type) and returns a LL
Then call this method in the JSP.
for eg
Bean method -
public Vector getMemberDetails(String userid)
{
// some code
}

In JSP use as:
Vector memVector = mgr.getMemberDetails(userId);
thats it...
Bye
Gopi
Originally posted by raghav mathur:
I've created a bean in which i,am storing 3 elements inside a LinkedList......i want to call these elements inside jsp .....what should i do ?
[This message has been edited by raghav mathur (edited January 14, 2001).]

 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic