Skip to Content
0
Feb 09, 2006 at 09:05 PM

Open JSP

63 Views

Hi all.

I'm trying to open a jsp file and pass a collection of objects in the session as the following code:

Vector v = new Vector();

for(int i=0; i<[SOME SIZE]; i++){v.add(<OBJECT i>);}

HttpServletRequest req = ((IWebContextAdapter)WDWebContextAdapter.getWebContextAdapter()).getHttpServletRequest();

req.getSession().setAttribute("vector",v);

Then in the JSP i'm doing this:

<%

java.util.Vector v = (java.util.Vector)session.getAttribute("vector");

try{

[PROCESS THE VECTOR]

} catch(Exception e){[HANDLE EXCEPTION]} %>

Well the exception catched is that the vector is null, the session hasnt attributes.

What can i do?

Best Regards

Gregory.