dcsimg
Can we pass a vector from One jsp page to another jsp page???
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Raj_Jindal
Posted On:   Wednesday, December 26, 2001 12:34 AM

How can we pass a Vector from one jsp page to another jsp page.

Re: Can we pass a vector from One jsp page to another jsp page???

Posted By:   Christopher_Schultz  
Posted On:   Wednesday, December 26, 2001 05:55 AM

How are you getting from one page to the next? Are you forwarding? Are you redirecting?



If you are redirecting, or need to get this Vector for multiple requests, then use the session as the previous response suggests.



If you are only processing a forward, consider using the request itself as storage space:



1.jsp:



request.setAttribute("myVector", vector);



2.jsp:



(Vector)request.getAttribute("myVector");



Good luck,

-chris

Re: Can we pass a vector from One jsp page to another jsp page???

Posted By:   Bozidar_Dangubic  
Posted On:   Wednesday, December 26, 2001 05:24 AM

put it in HttpSession.


1.jsp

session.setAttribute("myVector", vector);

2.jsp

Vector vector = (Vector) session.getAttribute("myVector") ;
About | Sitemap | Contact