The Artima Developer Community
Sponsored Link

Legacy Design Forum
Thread Safety



This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Servlet instance vaiables

Posted by Kumaran Thumati on February 14, 2002 at 2:22 PM

Yes. In servlet engine, only one instance of the servlet will be created to process all the request. So all the member variables will be shared across all the requests. In that case, all request specific information like session variables and so on should not be stored in the member variables. Instead, they should use local variables in doPost or doGet methods.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us