Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread Safe Servlets

 
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: 13074
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:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic