wood burning stoves*
The moose likes Servlets and the fly likes call vector form bean to jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "call vector form bean to jsp" Watch "call vector form bean to jsp" New topic
Author

call vector form bean to jsp

Raghav Mathur
Ranch Hand

Joined: Jan 12, 2001
Posts: 641
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).]


Raghav.
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
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.


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
rgopi
Greenhorn

Joined: Jan 10, 2001
Posts: 9
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).]


Bye<BR>Gopinath
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: call vector form bean to jsp