File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes web-resource-collection ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "web-resource-collection ?" Watch "web-resource-collection ?" New topic
Author

web-resource-collection ?

Aaron Raja
Ranch Hand

Joined: Jun 07, 2007
Posts: 206
Consider the web.xml snippet.

<web-app>
...
<security-constraint>
<web-resource-collection>
<web-resource-name>test</web-resource-name>
<url-pattern>/servlet/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>manager</role-name>
</auth-constraint>
</security-constraint>
...
</web-app>


In which of the following cases will the user be prompted for username/password?

[A] When the user clicks on a hyperlink displayed by Test


[B] the user clicks on the submit button of a form defined as: <form action="/servlet/TestServlet" method="POST">

[C] For both option 1 and option 2.

Which is true and why ?


Thanks
AR

Thanks, AR
SCWCD 5, SCJP 1.4, OCA (PL/SQL)
Santhi Bharath
Ranch Hand

Joined: Jun 03, 2008
Posts: 75
[A] When the user clicks on a hyperlink displayed by Test


[B] the user clicks on the submit button of a form defined as: <form action="/servlet/TestServlet" method="POST">

[C] For both option 1 and option 2.

Which is true and why ?


Oprion 'B' is correct. Because it only causes to access the resource that is restricted


thanks and regards<br />Santhi Bharath<br />SCJP 5.0, SCWCD 5.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: web-resource-collection ?
 
Similar Threads
Enthuware mck exam : http-method in security-constraint
Enthuware question doubt
Declarative Secruity
Enthuware test question
How authorization constraint effects authentication?