Home Jsp JSP Thread Safe



JSP Thread Safe
Posted on: February 3, 2009 at 12:00 AM
JSP Thread Safe is used to send only one client request for processing. It is used to implement Single Thread Model interface.

JSP Thread Safe

        

JSP Thread Safe is used to send only one client request for processing. It is used to implement Single Thread Model interface.

Understand with Example

In this section, you will learn how to use the thread safe attribute. The page directive defines an attribute 'isThreadSafe' whose value is either true or false. If the value is set to true which is a default value, the JSP container can send multiple concurrent client requests to the JSP page by starting a new thread. If the value of this 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. 

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

 

Here is the code of threadSafe.jsp

<%@page isThreadSafe="false" %>

<html>
<head><title>Jsp Thread Safe</title></head>
<body>
<h2> Jsp Thread Safe </h2>
By using the tag <<b>isThreadSafe="false"</b>>, you can make a jsp page safe.
</body>
</html>

Output will be displayed as:

Download Source Code:

Related Tags for JSP Thread Safe:
cjspprocessinterfacemodelclientsedrequestreadthreadcliintprocessingjsforiesendtosinglemodeprocssiesafeitliuseimceinmodmntjadaceclesemendmehrprosspdelessquestismpleasasafssrocthstaffefacepleplprocesprndonlyodeononl


More Tutorials from this section

Ask Questions?    Discuss: JSP Thread Safe  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.