JSP Application Grammar Detailed encyclopedia (i)

Source: Internet
Author: User
Tags character set expression include variables
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.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.