Servlet and JSP core programming 2 (Chapter 5)

xiaoxiao2021-04-01  232

This chapter focuses on some of the reporting methods

javax.servlet.http.HttpRequest.getCookies: Returns the contents of Cookie masthead will getAuthType and getRemoteUser stored in an array of cookie objects: Authorization for the analysis getContentLength: return content0length header getContentType: Returns the content-type header getDataHeader and getIntHeader: reading Develop a header and convert to int and dategetHeadernamesgetHeaders: getMethod: getRequestURLGETQUERYSTRING: Return to Form Data GetProtocol

HTTP1.1 Request Headers 1.Accept: Check the MIME Type 2 supported by your browser. Accept-charset: The browser can use (ISO-8859-1) 3. Accept-encoding: Coding 4 can be processed by the client. Accept-lanuage: The preferred language of the client 5. Authorization: Ask the authentication 6 when the Web page is confidential 6. CONNECTION: 7. Content_length: 8.cookie9.host10.if-modified-since11.if-unmodified-since12.referer13.user-agent Send compressed web page distinguishes different browser types: User-Agent

转载请注明原文地址:https://www.9cbs.com/read-131237.html

New Post(0)