Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic


ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please confirm the answer to the following question.
Which of the following statements is correct?
Select 1 correct option.
a. Generic Servlet defines but does not implement doHead method.
b. The default implementation of HttpServlet class doHead method calls the doGet method.
Don't know.
c. The HttpServlet class does not implement a dummy doHead method.
d. There is no special method for HEAD request, doGet handles HEAD requests.
e. If the servlet does not implement doHead , doGet will be called upon HTTP HEAD request.
Don't Know.
The answer says B is correct.
I want to know why B is correct and so if B is correct then why is E wrong?
I checked the API but nowhere it mentions that the default implementation of doHead calls doGet.
-- Ravi
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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!