JSP page syntax

Source: Internet
Author: User

 

(1) import = "package. class" or import = "package. class1,..., package. classN ".

Mso-hansi-font-family: "">

You can specify the packages you want to import. For example:

<% @ Page import = "java. util. *" %>

The import attribute is the only one of these attributes that can appear multiple times in a JSP.

(2) contenType = "MIME = Type" or contentType = "MIME-Type; charset = Character-Set"

Mso-hansi-font-family: "">

It specifies the MIME type of the output. The default value is "text/html ". For example:

<% @ Page contentType = "text/plain" %>"

Medium price in scriptlet:

<% Response. setContentType ("text/plain"); %>

 

(3) isThreadSafe = "true | false ". if the value is "true" (default), it means that a common servlet will be processed, and multiple requests will be processed in parallel by one servlet instance. In this case, programmers synchronously Access Multiple instance variables. When the value is "false", the servlet will implement the SingleThreadModel. no matter whether the request is submitted sequentially or concurrently, different isolated servlet instances will be provided.

(4) session = "true | false ". If the value is "true" (default), it indicates that the predefined variable session (inheriting HttpSession) should be bound to an existing session; otherwise, it should be created and bound. If the value is "false", the session variable will not be used. If you try to use it, an error will occur when JSP is converted to servlet.

(5) buffer = "sizekb | none ". Determine the buffer size for the JspWriter output. The default value is determined by the server, but at least 8 KB is required.

(6) autoflush = "true | false ". If the value is "true mso-hansi-font-family:" ">" (default), the system automatically clears the buffer when it is full, if the value is "false mso-hansi-font-family:" ">", an exception is thrown when the buffer is full, which is rarely used. When buffer = "none" is false, the mso-hansi-font-family: ""> value is invalid.

(7) extends = "package. class ". This will generate a superclass for the servlet. Please use this feature with caution, because the server may have defined one.

(8) info = "message ". Defines a string that can be obtained by calling the getServletInfo method.

(9) errorPage = "URL ". Specify a JSP mso-hansi-font-family: ""> page to handle any unexpected error that can be thrown but not processed on the current page.

(10) isErrorPage = "true | false ". Specifies whether the current page can handle errors from another page. The default value is "false ".

(11) language = "java" mso-hansi-font-family: "">. Specify the following language. However, you don't have to worry about this property because "java mso-hansi-font-family:" ">" is both a default and a legal choice.

 

 

Excerpted from the column

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.