> From: cristi [mailto:[EMAIL PROTECTED] 
> I have a web application where I need to use in a second request the
> HttpServletRequest object sent to the same servelet in the first
> request.
[...]
>       session.setAttribute( "FIRST_REQUEST_OBJECT", request );

Unsafe.  Servlet containers may re-use request objects between
invocations.  Can't remember for sure, but I think Tomcat does so.  So
your second request object may be identical to your first request
object.

> It seems that it is not safe to do so. What can I do to 
> handle this situation ?

As Guillaume said: copy the state you need from the first request into
the session, rather than storing the entire request.

                - Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to