Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about isThreadSafe attribute of page directive ...

 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When i say :



This means that the generated Servlet of this JSP implements SingleThreadModel right ?

Thanks in advance ...
 
Kah Tang
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It does mean that your JSP is implementing the SingleThreadModel.

But don't consider using it. The isThreadSafe is a deprecated attribute and should not be used.

Don't worry about it being on the exam, it's not going to be.
[ September 11, 2007: Message edited by: Kah Tang ]
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Posted by Kah Tang
The isThreadSafe is a deprecated attribute and should not be used


Does the spec says this? To the best of my knowledge setting isThreadSafe to false will generate code which is deprecated, so its use is discouraged.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP Specification :
Note: The Servlet 2.4 specification deprecates SingleThreadModel, which is the most common mechanism for JSP containers to implement isThreadSafe. Page authors are advised against using isThreadSafe, as the generated Servlet may contain deprecated code.
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP Specification :
Note: The Servlet 2.4 specification deprecates SingleThreadModel, which is the most common mechanism for JSP containers to implement isThreadSafe. Page authors are advised against using isThreadSafe, as the generated Servlet may contain deprecated code


So the vendors are free to implement using SingleThreadModel or any other vendor specific way. So it contain deprecated code only if the vendor chooses to implement using SingleThreadModel.
So though class SingleThreadModel is deprecated the attribute isThreadSafe is not deprecated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic