about jsp session
hi all,
i designed a web page using jsp.I want to use a vector in one jsp page to other jsp page in that application,So that i kept that vector in a session and try to retrieve it in another jsp page ,but it could not retrieve that vector value in the next page,but it retrieves that session vector in same page ie session did not work in the next page
I have written like below.........
session.setAttribute("vector",vector);-1.jsp page
session.getAttribute("vector");-2.next jsp page
pls help me.
thank u
[549 byte] By [
ganga_13a] at [2007-10-3 9:41:11]

> session.getAttribute("vector");-2.next jsp page
Did you get a null value when you executed the above statement ?
Rather did you place the session value in a Vector object after casting as below ?
Vector vec1 = (Vector)session.getAttribute("vector");
System.out.println(vec1); // this will print the object address value
-Rohit
Seems unclear to point out the mistake from here.
Maybe you can post a bit bigger code extract [well formatted] from both the jsp's showing how you are populating the vector.
Also show in which JSP did you first create the session.
I normally keep this code extract in login.jsp
<%
session.invalidate();
session = request.getSession(true);
%>
-Rohit