This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Plz Explain isThreadSafe attribute of the page directive. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Plz Explain isThreadSafe attribute of the page directive." Watch "Plz Explain isThreadSafe attribute of the page directive." New topic
Author

Plz Explain isThreadSafe attribute of the page directive.

Saurabh Chaubey
Ranch Hand

Joined: Oct 16, 2005
Posts: 101
can anybody Explain the isThreadSafe attribute of the page directive.

Thanks & Regards,
Saurabh
Chandrakanth
Ranch Hand

Joined: Aug 16, 2005
Posts: 60
isThreadSafe="true|false".

A value of true (the default) indicates normal servlet processing, where multiple requests can be processed simultaneously with a single servlet instance, under the assumption that the author synchronized access to instance variables.

A value of false indicates that the servlet should implement SingleThreadModel.
Kj Reddy
Ranch Hand

Joined: Sep 20, 2003
Posts: 1697
When you say isThreadSafe is true, you are going to take care of multi threads. When isThreadSafe is true there will be on JSP instance serving multiple requests, one thread will be created for each request to acess jsp service method. If isThreadSafe is false, for each request there will be one jsp instance(internally corresponding servlet class for jsp)
Saurabh Chaubey
Ranch Hand

Joined: Oct 16, 2005
Posts: 101
Thanks for your replies.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Plz Explain isThreadSafe attribute of the page directive.
 
Similar Threads
jsp
isThreadSafe problem in JSP
Thread Safe Servlet
about isThreadSafe
how to avoid synchronization problem in webpage