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)- A6% (1)
- B71% (12)
- E6% (1)
- F18% (3)
Community Discussion
No community discussion yet for this question.