Which four requests would be allowed by the container?

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 <httpmethod> 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)

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 <httpmethod> 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)

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.

D.
A user whose role is Member can perform a PUT.

E.
A user whose role is Member can perform a POST.

F.
A user whose role is Member can perform a GET.



Leave a Reply 1

Your email address will not be published. Required fields are marked *


giuseppe

giuseppe

A,B,C,E:
A,B because Put and Get methods of the servlet are reserved to Admin role
C,E: becase Post method is not restricted