You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ashish Kulkarni <ku...@yahoo.com> on 2003/02/20 22:57:51 UTC

is it possible to use setAttribute for request in jsp??

Hi,
I have to do some thing like this,
>From my jsp i want to pass some object to servlet, but
do not want to use session for it
so what i am trying is , in my jsp i have
<form  action="/testapp/servlet/TestServlet"
method="post">
<%
request.setAttribute("myObject", myObject);
%>
<input type="submit" value='Enter'>
</form>
and in my servlet i m trying to read it as
request.getAttribute ("myObject");

But i get null, as when i submit i get, it is a new
request and so myObject set in request is not any more
valid, 
so what are the things i can do to make it work,??
I dont want to put it in session and pass it

Ashish



__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org