js| Detailed Explanation | grammar
1 HTML comments:
You can use annotation content, or you can use an expression.
2) Hide the annotation:
Annotations are ignored when compiled by the JSP. The compiler will not compile the statement between, and it will not appear in the client's browser and source code.
3) DECLARE:
Declare the variables and methods you will use in your JSP program. You can declare multiple variables and methods at once, using the ";" At the end, the declaration is legitimate in Java.
4) Expression:
The expressions in Java are displayed in the JSP page, noting that there is no ";".
5) Java code:
Contains valid Java code.
6) include directive:
You can include html,jsp, text files, and Java code, and be aware that the inability to use them in this included file sometimes results in errors.
Property:
File refers to the relative path, such as: "Error.jsp" "templates/onlinestore.html" "/beans/calendar.jsp"
If this path starts with "/", then this path is primarily a reference to the upper and lower relation path of the JSP application, and if the path is to begin with a filename or directory name, then the path is the current path of the JSP file being used.
7 Page Instruction:
Property:
-language= "Java"
Declare the type of scripting language, temporarily only "Java"
-extends= "Package.class"
Inheriting a class
-import= "{package.class | package.*}, ..."
Import a package, and the following package is automatically imported by default.
java.lang.*,javax.servlet.*,javax.servlet.jsp.*,javax.servlet.http.*
-session= "true | False
Whether to allow session sessions, default true.
-buffer= ' None | 8kb | SIZEKB "
Setting the buffer size defaults to 8kb,none is to turn off the buffer, sizekb to set its own size.
-autoflush= "true | False
Whether to flush the buffer, true (the default) output is normal, false this buffer overflow, will cause an error, buffer set to none, we will set this to false.
-isthreadsafe= "true | False
Sets whether a JSP file can be used more than a thread. The default value is true.
-info= "Text"
Is the JSP some information, can use the Servlet.getservletinfo method to retrieve.
-errorpage= "Relativeurl"
Specifies the URL of the JSP page that receives the exception object.
-iserrorpage= "true | False
Sets whether to receive a exception object.
-contenttype= "Text/html;charset=iso-8859-1"
Sets the page type and character set. The default type is: text/html, the default character set is Iso-8859-1.