• Post Reply Bookmark Topic Watch Topic
  • New Topic

which attribute scopes are thread-safe

 
Jang byungho
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Identify which attribute scopes are thread-safe:
<%@page isThreadSafe='false' %>
Local variables
Instance variables
Class variables
Request attributes
Session attributes
Context attributes
I supposed the answer is:
Local variables
Instance variables
Request attributes
Please correct me if I'm wrong ...
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
yes. as u have defined isThreadSafe false it will create new instace of the servlet for each request and so instance variables are also now thread safe along with the other two u listed.
regards
maulin.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!