JSP is by default thread safe or not? what is the meaning of
isThreadSafe="true" and isThreadSafe="false". Explain it?

Thanks,
Seenu

Answers were Sorted based on User's Feedback



JSP is by default thread safe or not? what is the meaning of isThreadSafe="true" and isTh..

Answer / saravanan sagadevan

isThreadSafe is true means, doesn't implement
SingleThreadModel.So its not a thread safe. if
ThreadSafe=false, SingleThreadModel is implemented ,ant
This page is Thread safe.

Is This Answer Correct ?    32 Yes 0 No

JSP is by default thread safe or not? what is the meaning of isThreadSafe="true" and isTh..

Answer / mahesh

isThreadSafe="true" meaning saays that our servlet doesnot
provide the implementation of Single ThreadModel
interface.so single instance can handle multiple Requests.

Is This Answer Correct ?    12 Yes 2 No

JSP is by default thread safe or not? what is the meaning of isThreadSafe="true" and isTh..

Answer / nehru

Accroding to java documention, default value for jsp page
attribute 'isThreadsafe', is set to true, which means jsp
can handle multiple client requests and does not implement
SingleThreadModel interface.

Well, thinking gramatically, meaning of 'isThreadsafe' is to
clarify or to assert whether jsp is threadsafe or not.
So it makes sense when you put it's value to true ie.
isThreadsafe = true, meaning jsp is now thread safe and so
should handle one request at a time ie. it should implement
SingleThreadModel interface.
And isThreadsafe = false implies, jsp is not thread safe and
so it can handle multiple client requests.

Is This Answer Correct ?    20 Yes 16 No

JSP is by default thread safe or not? what is the meaning of isThreadSafe="true" and isTh..

Answer / t.kumar

JSP can access by more than one user at the same time. We
can make JSP thread safe by using JSP attribute in directive
page tag. Thread safe JSP can take one request at one time
to processing. In thread safe JSP single instance of JSP
Servlet loaded. By default JSP is not thread safe, we have
to use isThreadSafe attribute of page. When isThreadSafe
attribute set as false, no multiple request send by JSP
engine to handle.

<%@ page isThreadSafe="false" %>

Is This Answer Correct ?    1 Yes 0 No

JSP is by default thread safe or not? what is the meaning of isThreadSafe="true" and isTh..

Answer / bijay

<%@ page isThreadSafe="true" %> means you are specifying that the JSP page is thread-safe and hence, Container should create one Servlet instance and use it to handle mulitple client requests.

On the other hand, <%@ page isThreadSafe="false" %> means you are specifying that the JSP page is not thread-safe, so th Container should take necessary precaution. Container does this by queueing up requests and handling them one at a time.

Is This Answer Correct ?    1 Yes 0 No

JSP is by default thread safe or not? what is the meaning of isThreadSafe="true" and isTh..

Answer / ayush dayal

Bydefault isThreadSafe is set to 'true' in jsp, if we want
to make it not a thread safe then we have to set the value
of isThreadSafe is 'false'.

Is This Answer Correct ?    1 Yes 2 No

JSP is by default thread safe or not? what is the meaning of isThreadSafe="true" and isTh..

Answer / anil kumar

JSP is by default threadsafe...

Bydefault isThreadSafe is set to 'true' in jsp, if we want
to make it not a thread safe then we have to set the value
of isThreadSafe is 'false'.

I hope you understand...

Thank u....

Is This Answer Correct ?    5 Yes 8 No

JSP is by default thread safe or not? what is the meaning of isThreadSafe="true" and isTh..

Answer / vikas

jsp is not thread safe.
if threadsafe="true" it means only one thread can access an
object at a time.
if threadsafe="false" it means multiple threads can access
one object at a time concurrently.

Is This Answer Correct ?    20 Yes 27 No

JSP is by default thread safe or not? what is the meaning of isThreadSafe="true" and isTh..

Answer / srinu

JSP is by default its not a thread safe suppose we prevent
the JSP page from thread safe then

if threadsafe="true" it means only one thread can access an
object at a time.it handle only client request at time.it
should implements singleThreaded model interface.


isThreadsafe = false implies, jsp is not thread safe and
so it can handle multiple client requests.i.e means number
of clients access the only object

Is This Answer Correct ?    6 Yes 16 No

Post New Answer

More Core Java Interview Questions

Can an unreachable object become reachable again?

3 Answers  


What lambda means?

0 Answers  


What is a condition in programming?

0 Answers  


Can final class have constructor?

0 Answers  


What is a get method?

0 Answers  






What is the intersection and union methods?

0 Answers  


What is java used for on a computer?

0 Answers  


What are concepts of OOPS and how are they implemented in Java?

2 Answers   KPIT,


What does sprintf mean?

0 Answers  


What if static is removed from main method?

0 Answers  


Do you need to import math in java?

0 Answers  


Which is better stringbuilder or stringbuffer?

0 Answers  


Categories