How to implement a thread-safe jsp page?

Answers were Sorted based on User's Feedback



How to implement a thread-safe jsp page?..

Answer / harish

just add the directive <%@ page isThreadSafe="false" %>
with the jsp page..

Is This Answer Correct ?    16 Yes 5 No

How to implement a thread-safe jsp page?..

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

How to implement a thread-safe jsp page?..

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

Post New Answer

More JSP Interview Questions

How to print java variable in jsp?

0 Answers  


What are the possible values for language directive?

0 Answers  


What are stored procedures? How is it useful?

0 Answers  


what is difference between the contart and implementation?

0 Answers   iFlex,


What jsp lifecycle methods can I override?

0 Answers  






How did you implement caching in jsp?

0 Answers  


Define JSP Scriptlet.

0 Answers  


i have one jsp page. inside this, String s=req.getParameter("raja");...... now we want to remove duplicate characters and o/p will be like "rj".... what is the logic?

1 Answers  


Can I run jsp on xampp?

0 Answers  


A jsp page, include.jsp, has a instance variable "int a", now this page is statically included in another jsp page, index.jsp, which has a instance variable "int a" declared. What happens when the index.jsp page is requested by the client?

0 Answers  


What is request getcontextpath ()?

0 Answers  


What are the advantages of jstl?

0 Answers  


Categories