Introduction :
9. extends
1. The isThreadSafe attribute of page directive informs the JSP container how the JSP page should behave if multiple requests are received at the same time.
2. It takes boolean values true or false.
Syntax :
<%@page isThreadSafe="true"%>
Case 1 : isThreadSafe = “true”
If the value of this attribute is set to true. It implies that the JSP container can handle or send multiple concurrent client requests to the JSP page by starting a new thread.
Case 2: isThreadSafe = “false”
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.
6. isErrorPage
1. The isErrorPage attribute of page directive is used to specify that the page may be used as an error page.
2. It takes boolean value true or false.
Syntax: <%@ page isErrorPage="false" %>
Case 1: isErrorPage = “false”
1. The exception implicit object is not available to a JSP page.
2. The default value of isErrorPage is false.
Case 2: isErrorPage = “true”
1. The exception implicit object is available to a JSP page,
2. And this page act as a error page .
7.errorPage
1. If the programmer wants to place errors in a different page then the URL to the error page can be mentioned in this attribute as errorPage.
Syntax :
<@ page errorPage = "relativeURL" %>
Example:
<%@ page errorPage = "/myjavahub/error.jsp" %>
8. language
1. JSP containers may support languages other than Java. However most popular JSP container support only Java.
2. The language attribute of page directive is used to specify the scripting language.
Syntax :
<%@ page language="java" %> |
Description:
1. The language attribute is set to java by default. So most JSP programs do not specify the language attribute of page directive.
9. extends
The extends attribute specifies a super class that the generated servlet must extend.
Syntax:
<%@ page extends="class name" %>
Example:
For example, the following page directive indicate the JSP translator to generate the servlet with extends myjavahub/test
<%@ page extends="myjavahub/test" %>
No comments:
Post a Comment