JSP objects and JavaBean

Source: Internet
Author: User

1. JSP client Request

When a browser requests a Web page, it sends a series of information to the Web server that cannot be read directly, because the information is transmitted as part of the HTTP header, as shown in:

The HTTP request header corresponds to the following:

The corresponding method is as follows:

2.JSP Server Response:

The response response object mainly passes the result of the JSP container processing back to the client. You can set the state of HTTP through the response variable and send data to the client, such as cookies, HTTP file header information, and so on, as shown in:

The HTTP response header corresponds to the following:

The corresponding method is as follows:

3.JSP Cookie Processing methods:

Cookies are text files that are stored in the client computer, and they hold a large amount of trace information. On the basis of servlet technology, JSP can provide support for HTTP cookies.

There are usually three steps to identify repeat customers:

    • The server script sends a series of cookies to the browser. such as name, age, ID number and so on.
    • The browser stores this information in a local machine for a rainy-out.
    • The next time the browser sends any request to the server, it will send the cookie information to the server at the same time, and the server uses that information to identify the user or do something else.

Common methods are as follows:

4.JSP Session object:

In addition to the above methods, JSP uses the HttpSession interface provided by the servlet to identify a user and store all of the user's access information. By default, the JSP allows session tracing, and a new HttpSession object is automatically instantiated for the new client, as follows:

5. JSP JavaBean method:

JSP objects and JavaBean

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.