nerdexam
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)
  • A
    4% (1)
  • B
    14% (4)
  • C
    71% (20)
  • D
    11% (3)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice