Arie,
I have tried this code but it doesn't seem to work. I have a servlet which sets data by way of a session but when I try and access this data in the JSP page, it's not there. The servlet code is definitely setting the data because I can see it in the servletrunner console by way of a system out statement. Basically it seems that the line
                        HttpSession session = req.getSession(true);
is not actually getting the data. Is there something I have to import on the JSP page to get this to work?
 
James
-----Original Message-----
From: Arie Fishler <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: 16 June 1999 13:03
Subject: Re: Passing Data from JSP to JSP

Umesh,
 
Here is what you need to do.
 
In the originating JSP:
 
<%
String[] arrayOfString = new String[10];
HttpSession session = req.getSession(true);
session.putValue("stringArray", arrayOfString);
%>
 
In the receiving JSP:
<%
HttpSession session = req.getSession(true);
String[] arrayOfString = (String[])session.getValue("stringArray");
%>
 
 
 
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Umesh Mehendale
Sent: Wednesday, June 16, 1999 11:53 AM
To: [EMAIL PROTECTED]
Subject: Passing Data from JSP to JSP

How do I pass Data from JSP to JSP
 
for e.g , I have to pass an array of strings to another JSP from current JSP ....
 
I would appreciate if someone could help with dummy code !!!
 
Umesh.

Reply via email to