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