nerdexam
GIAC

GSSP-JAVA · Question #116

You work as a programmer for PassGuide.Inc. You want to create a servlet filter that stores all request headers to a database for all requests to the Web application's home page "/work.jsp". Which…

The correct answer is B. java.util.Enumeration getHeaderNames(). See the full explanation below for the reasoning.

Question

You work as a programmer for PassGuide.Inc. You want to create a servlet filter that stores all request headers to a database for all requests to the Web application's home page "/work.jsp". Which of the following HttpServletRequest methods allows you to retrieve all of the request headers?

Options

  • Ajava.util.Enumeration getRequestHeaders()
  • Bjava.util.Enumeration getHeaderNames()
  • CString[] getRequestHeaders()
  • Djava.util.Iterator getRequestHeaders()
  • Ejava.util.Iterator getHeaderNames()
  • FString[] getHeaderNames()

How the community answered

(17 responses)
  • A
    6% (1)
  • B
    71% (12)
  • E
    6% (1)
  • F
    18% (3)

Community Discussion

No community discussion yet for this question.

Full GSSP-JAVA Practice