Is JSP Thread Safe ???? How To make JSP thrad safe ?????

Answers were Sorted based on User's Feedback



Is JSP Thread Safe ???? How To make JSP thrad safe ?????..

Answer / samba

By default JSP pages are not Thread safe.if we want to make
jsp page as thread sefe then the value of isThreadSafe
attribute is set to false, then the JSP container sends
client requests only one at a time to the JSP page which
makes the jsp page safe.
If isThreadSafe="true" then jsp is not a thread safe.this is
the default value.
If isThreadSafe="false" then jsp is a thread safe

Syntax:
<%@ page isThreadSafe="true|false" %>

Is This Answer Correct ?    30 Yes 7 No

Is JSP Thread Safe ???? How To make JSP thrad safe ?????..

Answer / samba

Jsp is not a thread safe.in order to make jsp as a thread
safe there is a attribute that is isThreadSafe="true"

Is This Answer Correct ?    10 Yes 6 No

Is JSP Thread Safe ???? How To make JSP thrad safe ?????..

Answer / nagendra

<% page isThreadSafe="false"%>

Then only jsp become ThreadSafe

Is This Answer Correct ?    5 Yes 2 No

Is JSP Thread Safe ???? How To make JSP thrad safe ?????..

Answer / ankur

BY DEFAULT THE JSP PAGE IS NOT SAFE FROM THREAD . IF YOU WANT TO MAKE SAFE THE JSP PAGE FROM THREAD YOU CAN USE THE STATEMENT

<% page isThreadSafe="false"%> USE BEFORE THE <HEAD>

:- THE JSP BY DEFULT VALUE IS

<%@ page isThreadSafe="true"%> THAT MEAN YOUR JSP PAGE IS NOT THREAD SAFE ...

Is This Answer Correct ?    3 Yes 2 No

Is JSP Thread Safe ???? How To make JSP thrad safe ?????..

Answer / venkat

by default jsp is not thread safe.
if we want to make thread safe jsp use this statement

<%@ page isThreadSafe="true"%>

Is This Answer Correct ?    2 Yes 2 No

Is JSP Thread Safe ???? How To make JSP thrad safe ?????..

Answer / venkat

by default jsp is not thread safe.
if we want to make thread safe jsp use this statement

<%@ page isThreadSafe="true"%>

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More Servlets Interview Questions

What is the difference between RequestDispatcher and sendRedirect?-

5 Answers   CTS,


What is use of parseQueryString?

1 Answers  


What are the life cycle methods of a servlet?

0 Answers  


How to handle exceptions thrown by application with another servlet?

0 Answers  


How do you load an image in a Servlet?

0 Answers  






Difference between GET and POST?

0 Answers  


What is the use of java servlet api?

0 Answers  


how can we execute servelt? what the use ".war" or ".jar" file creation

3 Answers   CTS,


What is servlet and its use?

0 Answers  


what is the difference between?when we write the code in following manner? class One extends httpservlet { } and class One extends genericservlet { }

4 Answers  


Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?

0 Answers  


Why jsp is better than servlet?

0 Answers  


Categories