Oracle
1Z0-899 · Question #69
Given an HttpSession session, a ServletRequest request, and a ServletContext context, which retrieves a URL to /WEB-INF/myconfig.xml within a web application?
The correct answer is C. context.getResource("/WEB-INF/myconfig.xml"). See the full explanation below for the reasoning.
Question
Given an HttpSession session, a ServletRequest request, and a ServletContext context, which retrieves a URL to /WEB-INF/myconfig.xml within a web application?
Options
- Asession.getResource("/WEB-INF/myconfig.xml")
- Brequest.getResource("/WEB-INF/myconfig.xml")
- Ccontext.getResource("/WEB-INF/myconfig.xml")
- DgetClass().getResource("/WEB-INF/myconfig.xml")
How the community answered
(28 responses)- A4% (1)
- B14% (4)
- C71% (20)
- D11% (3)
Community Discussion
No community discussion yet for this question.