hi anil,

i hope i've got your intention, you want to pass an object graph from
servlet1 to servlet2.  tomcat provides session management through
request.getSession().setAttribute() these objects are accessible for the
duration of the session.  If you only want the object graph to live for the
lifespan of a single request then use request.setAttribute() and it will
automatically destroy() when the response is returned to the
tomcat-request-interceptor-responder-web-server-thingy ( i think that's its'
technical name ) ;

warren.

-----Original Message-----
From: anil [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 23 May 2001 5:26 AM
To: tomcat
Subject: ===>Session Question<===


Hello,

I do have servlet that process request and forward to another servlet.
like.
->request-----> Servlet1------->servlet2
                          session-obj-1    session-obj1(destroy
session-obj1 request is done-user gets html back)

At the end of sevlet2, user get html window back.
I want setup a session object in servlet valid only for that request. I
mean it should not valid beyond servlet2.
if I use request.getSession(x), this session-obj1 is valid until the
browser is closed.

is there anyway to do this without calling removeAttribute() ????

thanks

anil

Reply via email to