Vidhya Krishnamoorthy wrote:
>
> Can I have a servlet's request as a class attribue in
> my servlet class . (Like the code segment below)
>

 Use the spec, Luke.[1] It's a much easier read
than most people think, and it's available for
absolutely no cost whatsoever:

 <URL:http://java.sun.com/products/servlet/index.html>

   2.3.3.3 Thread Safety

   A Developer should note that implementations
   of the request and response objects are not
   guaranteed to be thread safe. This means that
   they should only be used in the scope of the
   request handling thread. References to the
   request and response objects should not be
   given to objects executing in other threads
   as the behavior may be nondeterministic.

 In other words: no, don't do that.


-cks


[1] For our non-Western readers, the reference is
to the movie "Star Wars". It more or less means
that you have everything you need already, if
you only knew to use it...

___________________________________________________________________________
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