• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

about isThreadSafe attribute of page directive ...

 
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 ...
 
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
 
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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • 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.
    Bookmark Topic Watch Topic
  • New Topic