You going fundamentally wrong Hiren.
 
In the JSP you have written request.setAttribute(). When you will call this JSP from 
browser the request.setAttribute() statement will execute and will store the parameter 
in the request. After the execution is complete your request is destroyed so whatever 
you have stored in request is also gone. Now you are calling a servlet from this JSP 
by clicking some link or by submitting a form. Naturally you won't get what you have 
stored in the previous request as this is a new request.
 
When you use session to store data it is available across the requests.
-----Original Message-----
From: Hiren Dossani [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 4:35 AM
To: [EMAIL PROTECTED]
Subject: request parameters


hello,

i use request.setAttribute in a jsp page and then call a servlet.
the servlet returns null when i use request.getAttribute method.

it only works if i set the attribute in session.
is there a way around if i don't want to set the session attribute ?

thanks for your help.

--
hiren

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to