1.page instruction
The page directive is used primarily to set the global properties of a JSP page, which will act on the entire JSP page, even the statically contained pages. The syntax format is as follows:
<%@ Page Property 1 = "Property value 1" Property 2 = "Property value 2"%>
(1) Import attribute
The Import property is used to formulate the imported package. The syntax format is as follows:
<%@ page import= "Imported package name"%>
(2) Session properties
The session property is used to specify whether the page can use the Session object. If set to True, the session can be used. If False, the session cannot be used. The default value of the Session property is true. The syntax format is as follows:
<%@ page seession= "true | False "%>
(3) Buffer property
The buffer property is used to specify whether the output stream has a buffer and to set the buffer size. If set to none, the output stream does not have buffering capabilities, and if set to specific data, such as "40KB", the set buffer size is 40KB. Its default value is 8KB. The syntax format is as follows:
<%@ page buffer= "none | 40KB "%>
(4) AutoFlush property
The AutoFlush property is used to specify whether the buffer automatically forces output. If set to True, the output is normal when the buffer is full, and if set to False, an exception is generated when the buffer is full. If the buffer property is set to None, then the AutoFlush property value cannot be set to false. The default value of AutoFlush is true. The syntax format is as follows:
<%@ page autoflush= "true | False "%>
(5) IsThreadSafe Property
The IsThreadSafe property is used to specify whether the JSP file supports multithreaded use. Its default value is true. The syntax format is as follows:
<%@ page isthreadsafe= "true | False "%>
(6) Info property
The Info property is used to set information about the JSP file, which can be any information string, and is obtained through the Servlet.getservletinfo method. The syntax format is as follows:
<%@ page info= "JSP file related information"%>
(7) ErrorPage Property
The ErrorPage property is used to set the Web page to jump back to the JSP file that can handle the exception if the current JSP file has an exception error. The syntax format is as follows:
<%@ page errorpage= "error handling pages"%>
(8) Iserrorpage Property
The Iserrorpage property is used to specify whether the JSP file is the default value of the JSP file that can handle the exception, false. The syntax format is as follows:
<%@ page iserrorpage= "true | False "%>
(9) ContentType property
The ContentType property is used to specify the MIME format of the JSP file, as well as the Web page encoding format. The syntax format is as follows:
<%@ page contenttype= "Text/html;charset=iso-8859-1"%>
(pageencoding) Property
The Pageencoding property is used to specify the encoding format of the Web page. The syntax format is as follows:
<%@ page pageencoding= "Iso-8859-1"%>
(one) iselignored properties
The Iselignored property is used to specify whether the JSP file supports an El expression. Setting true indicates that the EL expression is ignored. The syntax format is as follows:
<%@ page iselignored= "true | False "%>
2.include instruction
The include directive is used to insert a file containing text or code into a JSP file. The JSP file resumes execution only if the contained file is executed. The syntax format is as follows:
<%@ include file= "included file Address"%>
3.taglib instruction
The TAGLIB directive declares that this JSP file uses a custom label, referencing the specified tag library and setting the tag library prefix. The syntax format is as follows:
<%@ taglib uri= "uritotaglibrary" prefix= "TagPrefix"%>
URI: The location where the tag library is stored; prefix: The prefix used by the tag library.
(i) JSP Directive element