passing parameters - urgent please

Dear friends,

In my first.jsp file i am passsing a emailaddress to second.jsp

thru url. second.jsp is receiving the emailaddress using request.getparameter.

However i have somany parameters like email. and i have hide these parameters, in which the user cannot see in the url bar.

please help me how can i hide the parameters like (email..etc.,)

first.jsp

<a href="second.jsp?email=<%=emailaddress%>">Test</a>

second.jsp

String getemailid=request.getParameter("email");

out.println("My name is : "+getemailid);

thank you for your cooperation

Yours

rajesh

[653 byte] By [rajeshkumar77a] at [2007-9-19]
# 1
The better option wud be to create a session of all those parameters OR to store all those parameters in a Coolection (say Vector) & after storing this Vector in a session, get the vector on teh second.jsp & do what ever u wanna do with these values
preeti_ka at 2007-7-8 > top of java,Enterprise & Remote Computing,Web Tier APIs...
# 2

Dear Friend,

Thank you very much for ur cooperation.

I am assing the parameters using a session.

I need to pass a int value also, along with strings.

When i am trying to pass integer parameter..it is saying error like

Incompatible type for method. Can't convert int to java.lang.Object.

please help me how can i put integet value in a session.

Thanks in advance.

Looking to hearing from u again

Yours

Rajesh

rajeshkumar77a at 2007-7-8 > top of java,Enterprise & Remote Computing,Web Tier APIs...
# 3
You have to convert the primitive int type into an object and to do this you should use the Integer class. e,g, session.putValue("integernumber", new Integer(int) ) and if you need the number you should get the value of the integer by using the Integer.intValue() method.
MinaGavinmaura at 2007-7-8 > top of java,Enterprise & Remote Computing,Web Tier APIs...
# 4

I set the integer value in a session as like this (in my first.jsp)

session.putValue("integernumber", new Integer(10) ) ;

in my second.jsp i am using like this to get that integer value.

int counter = Integer.intValue(session.getAttribute("integernumber"));

but in second.jsp it is saying the error as "Wrong number of arguments in method.

"

please help me whats wrong here.

Thanks in advance.

really looking for ur idea.

rajeshkumar77a at 2007-7-8 > top of java,Enterprise & Remote Computing,Web Tier APIs...
# 5
intValue() doesn't have an input parameter so it should be written as:Integer intObj = (Integer) session.getAttribute("integernumber");int counter = intObj.intValue();
MinaGavinmaura at 2007-7-8 > top of java,Enterprise & Remote Computing,Web Tier APIs...
# 6
you can use hidden fieldsin your first.jsp<input type="hidden" name="email" value="<%=emailaddress%>">then in your second.jsp, everything remains...String getemailid=request.getParameter("email");out.println("My name is : "+getemailid);
ps33a at 2007-7-8 > top of java,Enterprise & Remote Computing,Web Tier APIs...
# 7

Dear MinaGavinmaur and Ps,

Thank you for your valuable suggestions. Now my problem is solved.

Once again thanks a lot for fast replies.

If you need any assistance please contact me at getfastreply@hotmail.com

Yours

Rajesh

> intValue() doesn't have an input parameter so it

> should be written as:

>

> Integer intObj = (Integer)

> session.getAttribute("integernumber");

> int counter = intObj.intValue();

>

>

rajeshkumar77a at 2007-7-8 > top of java,Enterprise & Remote Computing,Web Tier APIs...