isThreadSafe attribute in JSP page directive

This attribute is used to specify whether this page supports multithreading or not. It can have true or false value.

Syntax:

<

Example:

welcome.jsp

<%@ page isThreadSafe="true" %>  
 
<html>
	<head>
		<title>isThreadSafe page directive example</title>
	</head>
	<body>
	  <h3>Hello this is an isThreadSafe page directive example.</h3>
	</body>
</html>

web.xml

<web-app>
 
  <welcome-file-list>
          <welcome-file>welcome.jsp</welcome-file>
  </welcome-file-list>	
 
</web-app>

Output:

jsp example 12
 
Download this example.
 
Next Topic: language attribute in JSP page directive with example.
Previous Topic: isErrorPage and errorPage attribute in JSP page directive with example.