Session variable for Objects ??

M

mhk

Hi ,

i want to store a java Object or Vector in a session variable using JSP.
Is there any way to do that. My objective is to place an object or
Vector in a session variable on one JSP page and get it on another page.

please tell me how to store and retrive objects or vector from session
variables or any other way to do that. i tried with simple
"session.setAttribute" and "session.getAttribute" but it doesnt work.


Please Guide me .

Thanks


Jeff
 
G

Gerbrand van Dieijen

Hi ,

i want to store a java Object or Vector in a session variable using JSP.
Is there any way to do that. My objective is to place an object or
Vector in a session variable on one JSP page and get it on another page.

please tell me how to store and retrive objects or vector from session
variables or any other way to do that. i tried with simple
"session.setAttribute" and "session.getAttribute" but it doesnt work.

Why doesn't session.setAttribute() not work?
I could be your objects aren't serializable (implements Serializable) but
I'm not sure that is even necessary.
 
C

Chris Smith

mhk said:
please tell me how to store and retrive objects or vector from session
variables or any other way to do that. i tried with simple
"session.setAttribute" and "session.getAttribute" but it doesnt work.

You've got the right way to do it, so now you need to explain why this
"doesn't work"... that is, what error messages do you get, or what
doesn't act the way you expect. Some very basic sample code
demonstrating your problem would also be good.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top