How to implement a thread-safe jsp page?
Answers were Sorted based on User's Feedback
Answer / harish
just add the directive <%@ page isThreadSafe="false" %>
with the jsp page..
| Is This Answer Correct ? | 16 Yes | 5 No |
Answer / vipin gupta trainer
isThreadSafe sattes that wheather jsp engine can pass
multiple req simultaneously to the page . a value set to
true(default) indicates that a new thread is started and
therfore request are handled simultaneously . ise the jsp
engine can send multiple concurent lient request to the jsp
page . value set to false indicates that jsp engine sends
lient request one at a time to the jsp page .
It is recommended to always use the value tue for the is
threadsafe page directive and handled multithread issue
by avoiding jsp declaration and ensures that all object
used by the page are thread safe.
Syntex
<% page isthreadSafe="true"%>
| Is This Answer Correct ? | 10 Yes | 5 No |
Answer / shiva
to make jsp as threadsafe we hav to make isThreadSafe=false
,so it sends only one request for processing.it implicitly
implement SingleThreadModel interface
| Is This Answer Correct ? | 4 Yes | 7 No |
What are the life-cycle methods for a jsp?
What is the resourcebundle class in jsp?
What are the steps involved in reading data from a form using jsp?
How to deactivate el usage on jsp?
How can multiple submits due to refresh button clicks be prevented?
Why is _jspservice() method starting with an '_' while other life cycle methods do not?
Why taglib is used in jsp?
How to pass information from jsp to included jsp?
Which package does a jsp api consist of?
What are the types of directives in jsp?
How many tags are provided by jstl?
Why do we use expression language in jsp?