GET /servlet/Search?keywords=servlets+jsp HTTP/1.1
Accept: image/gif, image/jpg, */*
Accept-Encoding: gzip
Connection: Keep-Alive
Cookie: userID=id123456
Host: www.somebookstore.com
Referer: http://www.somebookstore.com/findbooks.html
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Reading headers is straightforward; just call the getHeader method of HttpServletRequest with the name of the header. This call returns a String if the specified header was supplied in the current request, null otherwise.
methods:
getMethod: return GET , POST, HEAD,PUT, AND DELETE.
getRequestURI: "/servlet/search".
getQueryString: would return keywords=servlets+jsp
getProtocol: HTTP 1.1
Accept: image/gif, image/jpg, */*
Accept-Encoding: gzip
Connection: Keep-Alive
Cookie: userID=id123456
Host: www.somebookstore.com
Referer: http://www.somebookstore.com/findbooks.html
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Reading headers is straightforward; just call the getHeader method of HttpServletRequest with the name of the header. This call returns a String if the specified header was supplied in the current request, null otherwise.
methods:
getMethod: return GET , POST, HEAD,PUT, AND DELETE.
getRequestURI: "/servlet/search".
getQueryString: would return keywords=servlets+jsp
getProtocol: HTTP 1.1
Comments
Post a Comment