Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Thread Safe Servlets  RSS feed

 
Kishan Kumar
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Folks,
Please let me know what are the precautions to be taken while coding a servlet intended to be thread safe.

------------------
Regards,
V. Kishan Kumar
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main thing is not to use instance variables in the servlet class for anything specific to a particular user.
The HttpSession class provides a convenint mechanism for holding on to values for a specific user, but there are other methods.
Bill

------------------
author of:
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!