nerdexam
Oracle

1Z0-899 · Question #187

Given: 3. class MyServlet extends HttpServlet { 4. public void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 5. // servlet code here ... 26. } 27. }…

The correct answer is A. A user whose role is Admin can perform a PUT. B. A user whose role is Admin can perform a GET. C. A user whose role is Admin can perform a POST. E. A user whose role is Member can perform a POST. See the full explanation below for the reasoning.

Question

Given: 3. class MyServlet extends HttpServlet { 4. public void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 5. // servlet code here ... 26. } 27. } If the DD contains a single security constraint associated with MyServlet and its only <http- method> tags and <auth-constraint> tags are: <http-method>GET</http-method> <http-method>PUT</http-method> <auth-constrain>Admin</auth-constrain> Which four requests would be allowed by the container? (Choose four)

Options

  • AA user whose role is Admin can perform a PUT.
  • BA user whose role is Admin can perform a GET.
  • CA user whose role is Admin can perform a POST.
  • DA user whose role is Member can perform a PUT.
  • EA user whose role is Member can perform a POST.
  • FA user whose role is Member can perform a GET.

How the community answered

(33 responses)
  • A
    82% (27)
  • D
    6% (2)
  • F
    12% (4)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice