Amit Prakash Singh<br /> <br />SCJP 1.4 93% <br />SCWCD1.5 85%
Amit Prakash Singh<br /> <br />SCJP 1.4 93% <br />SCWCD1.5 85%
Amit Prakash Singh wrote:Your web application has a valid dd with a single <security-constraint> tag.
Within this tag exists:
- a single http method that declares GET
All of the resources in your application exist within directory1 and directory2 and the only defined roles are BEGINNER and EXPERT.
If you want to restrict BEGINNERs from using resources in directory2, which are true about the url and role tag(s) you should declare? (Choose all that apply.)
A. A single url tag should declare directory1 and a single role tag should declare EXPERT.
B. A single url tag should declare directory2 and a single role tag should declare EXPERT.
C. A single url tag should declare directory1 and a single role tag should declare BEGINNER.
D. A single url tag should declare directory2 and a single role tag should declare BEGINNER.
E. One url tag should declare ANY and its role tag should declare EXPERT, and another url tag should declare directory2 and its role tag should declare BEGINNER.
F. One url tag should declare both directories, and its role tag should declare EXPERT, and another url tag should declare directory1 and its role
Answer Given : D, Answer Shoild be: B
since if we mention any role in the <auth-constratint>, the role is allowd to make the request and others are not. Same way here, if ansder D is true, then Beginner would be able to make request.
Please correct me If I got the answer wrong?
sridhar row wrote:
Sorry to open an old thread...but I feel even B is not the right answer as BEGINNER will still be able to access resources in directory2 using HTTP methods other than GET..Please correct me if I'm wrong.
Regards,<br />Sourin.
Amit Prakash Singh wrote:
But option E is debatble : because as per HFSJ page - 260: "make sure your attribute class types are Serializable and you never have to worry about it.But if they�re not Serializable (which could be because one of the attribute object�s instance variables is not Serializable), have your attribute object class implement HttpSessionActivationListener and use the activation/passivation callbacks to work around it"
So object must be serializable doesn't holds true according to the comment?
Regards,<br />Sourin.
Don't get me started about those stupid light bulbs. |