A servlet that extends HTTPServlet gets access to HTTP header values such as cookies
posted 10 years ago
A servlet that extends HTTPServlet gets access to HTTP header values such as cookies via what mechanism? 62 A. The getQueryString() method of the HTTPServlet base class A 63 B. The HTTPServletRequest Object B 64 C. HTTP Servlet Response Object C 65 D. There is no mechanism, this must be parsed from the InputStream provided by the base GenericServlet class
Servlet programming is easy. Anything you want to know about a client, you get through the request. Anything you want to do to a client, you do through the response. Okay, anything you are ALLOWED to do to the client. You can't slap them across the face with a response object, no matter how much you might want to.
The HttpServletRequest object has a method that allows you to get cookies that have surreptitiously been placed on the client machine.
Cookies are sent to the server in a weird way: not really part of the header, and not as part of a URL. They get sent as a cookie.
Want to place a cookie on the client machine? It's not through the request.
Good luck on the exam! Check out some of my mock quizzes on examscam.com
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads