Java web Development Series jsp knowledge outline, javajsp

Source: Internet
Author: User
Tags html comment

Java web Development Series jsp knowledge outline, javajsp

1. Working Principles of jsp
When the client form submits the request to the jsp page, the Server jsp Engine finds the jsp file from the server disk. Parse it into a java file, compile the java file into a class file, and then execute the class file to process the request. After processing, an html file is generated, and the jsp engine sends the html file to the client for display.
2. jsp file
A typical jsp file includes the following five elements:
A. Notes
B. template Elements
C. script elements
D. command element
E. Action elements
3. jsp file elements
1) Comment in JSP file
A. HTML comment
Return to the source HTML of the client to see this annotation.
B. JSP comments
When the jsp file is parsed as a java file, this annotation will be deleted, and will not appear in the source HTML.
C. java annotations
This annotation is retained when the jsp file is parsed as a java file.
2) template Elements
In jsp, the static html part is the template element part, which is the main body of jsp files. Background programmers do not need to care too much about this part. Generally, this part is completed by the artist.
3) script elements
These elements are divided into three categories:
A. Statement
Use <%! %> Identifier, mainly used to define methods or variables.
B. Expression
Use the <% = %> identifier to output the result of the method or the value of the variable as a string.
C. Script
Marked with <%>.
4) command element
There are three types of command elements. They are page commands, include commands, and taglib commands, which are identified by the symbol <% @ %>.
5) Action elements
The action element is identified by the tag <jsp: XXX>.
4. jsp built-in objects
1) Output object out
2) Get the request Object request
3) return the client request object response
4) session object session
5) Context object pagecontext
6) application Object
7) exception information object exception
8) config
9) page

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.