查看完整版本: [已解決]sun_310-083_Q36
頁: [1]

vicking951 發表於 2009-6-7 07:49 AM

[已解決]sun_310-083_Q36

本帖最後由 vicking951 於 2009-6-27 03:53 PM 編輯

Given:3.class MyServlet extends HttpServlet{
4.  public void doPut(HttpServletRequest req,HttpSerletResponse resp) throw 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-constraint>Admin</auth-constraint>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.

Answer:A,B,C,E

為什麼答案結果為上述,有誰可以幫幫忙,解決我的疑問。...<div class='locked'><em>瀏覽完整內容,請先 <a href='member.php?mod=register'>註冊</a> 或 <a href='javascript:;' onclick="lsSubmit()">登入會員</a></em></div><div></div>

getfile 發表於 2009-6-10 10:20 PM

Admin 需要經過驗證與授權可以 GET,PUT---->Ans: A,B
Admin 不需經過驗證與授權可以 POST------->Ans: C
Member 不可作 PUT (未驗證與授權) ----> 不選 D
Member 不需經過驗證與授權可以 POST------->Ans: E
Member 不可作 GET (未驗證與授權) ----> 不選 F

故: A,B,C,E
頁: [1]