session set/get

Hi,

I have this issue with jsp files using the

session.setAttribute and

session.getAttribute

I have and two jsps.

so what I am trying to do is use the session methods to get values.

Here is the situation:

the first jsp asks the user for some data like this:

<input name="name1" type="text">

so, in the second jsp I would receive that data using the session.getAttribute,

but I just can't do it, its like the value never gets passed.

and I don't want to use the

<form>

or the request.getParameter,

how can I solve this?

thanks for any response...

Message was edited by:

derok

[748 byte] By [deroka] at [2007-11-27 4:57:12]
# 1
All the parameters are passed as a request object..So therz no option besides usin request.getParameter(). U can then use this values in some session variable.
Harish_MCAa at 2007-7-12 10:12:35 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

so any how u have to set session var value atleast once

so at start of the second page use

if(session.getAttribute("name1")==null)

{

session.setAttribute("name",${param.name1});

}

And when u want to use its value just use

<%= (String) session.getAttribute("name1") %>

now u can use this sesion value on any page

is it ok!!!!!!!!!!!!!

amol_0008@rediffmail.coma at 2007-7-12 10:12:35 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...