Getting started with JSP built-in objects (3) Request object detailed "01"

Source: Internet
Author: User

In the JSP built-in object "02" We have simply studied page, request, session, application four kinds of objects of the attribute range. So from the beginning of this article we have come together to learn more about the use of request, response, session and application. Let's start with the request.

Request built-in Objects Introduction:

Request a built-in object with the most use of an object, its primary role is to receive the client sent requests information, such as: The requested parameters, send header information, etc., are sent to the client information, Request is an instantiated object of the Javax.servlet.HttpServletRequest interface, which means that the object is primarily applied to the HTTP protocol

From the Java Servlet API, we can discover the definition of the HttpServletRequest interface

As you can see from the document, HttpServletRequest is a servletrequest sub-interface, and ServletRequest has only one sub-interface----httpservletrequest

Since ServletRequest has only one sub-interface httpservletrequest, why not merge two interfaces into one interface?

Only in the long run, in the long run, the main protocol now used is the HTTP protocol, but later there may be more heart of the agreement, such as: XXX, in the future if you want to support this new protocol, you must directly inherit the ServletRequest interface.

Request built-in objects common operations

Next we'll take a look at the request several common methods of

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.