1) HTML comment:
You can use comments or expressions.
2) Hide comments:
Annotations will be ignored during jsp compilation (the preferred choice for SUN enterprise-level applications). The compiler will not compile the statements between them and it will not be displayed in the client's browser and source code.
3) Statement:
Declare the variables and methods you will use in the jsp (preferred for SUN Enterprise Applications) program. multiple variables and methods can be declared at one time. To end with ";", the declaration must be legal in Java.
4) expression:
Expressions in JAVA are displayed on the jsp (preferred for SUN Enterprise Applications) page. Be sure not to include ";".
5) JAVA code:
Contains valid JAVA code.
6) Include command:
It can contain HTML, jsp (the preferred choice for SUN Enterprise applications), text files, and JAVA code. It is important to note that this inclusion file cannot be used and sometimes leads to errors.
Attribute:
File refers to the relative path, such as: "error. jsp (preferred for SUN Enterprise Applications)" "templates/onlinestore.html" "/beans/calendar. jsp (preferred for SUN Enterprise Applications )"
If the path starts with "/", the path mainly refers to the upper and lower link path of the jsp (preferred for SUN Enterprise Applications) application. If the path starts with a file name or directory name, this path is the current path of the jsp (preferred for SUN Enterprise Applications) file in use.
7) Page command:
Attribute:
-Language = "java"
Declare the type of the script language. Currently, only "java" can be used"
-Extends = "package. class"
Inherit a class
-Import = "{package. class | package .*},..."
Import a package. The following packages are automatically imported by default.
Java. lang. *, javax. servlet. *, javax. servlet. jsp (preferred for SUN Enterprise Applications). *, javax. servlet. http .*
-Session = "true | false"
Whether to allow session. The default value is true.
-Buffer = "none | 8kb | sizekb"
Set the default value of the buffer size to 8 KB, none to disable the buffer, and sizekb to set the size by yourself.
-AutoFlush = "true | false"
Whether to refresh the buffer. true (default value) indicates that the output is normal. If the buffer overflow is false, an error occurs. If the buffer is set to none, set this parameter to false.
-IsThreadSafe = "true | false"
Set whether jsp files (preferred for SUN Enterprise Applications) can be used in multiple threads. The default value is true.
-Info = "text"
Is some information of jsp (the preferred choice for SUN Enterprise applications), which can be retrieved using Servlet. getServletInfo.
-ErrorPage = "relativeURL"
Specifies the URL of the jsp (preferred for SUN Enterprise Applications) page that receives the Exception object.
-IsErrorPage = "true | false"
Sets whether to receive an Exception object.
-ContentType = "text/html; charset = ISO-8859-1"
Set page type and character set. Default type: text/html, default character set is ISO-8859-1.