aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes <security-constraint> doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "<security-constraint> doubt" Watch "<security-constraint> doubt" New topic
Author

<security-constraint> doubt

Parth Twari
Ranch Hand

Joined: Jan 20, 2010
Posts: 163
Source : Marcus

Which statements are true of the following snippet of a deployment descriptor.



A. It is faulty becasue it has multiple security-constraint elements Incorrect
B. It is faulty because it does not supply the http-method tag Incorrect
C. Only members of the manager role will be able to access the resource Incorrect
D. Any user will be able to access the resource Correct
E. No users will be able to access the resource

Answer: D

I think it shall be E , I tested it and it was coming as E only. Can anyone explain?


Parth Tiwari
| Pursuing Bachelor of Engineering | OSUM Club Leader | SCJP 6 | SCWCD 5 |...
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1660
    
  25

Hi Parth,

You are correct: when more than one constraint is set for the same resource: the no-value authority is overriding.

Regards,
Frits
Parth Twari
Ranch Hand

Joined: Jan 20, 2010
Posts: 163
ok..

Don't you think there shall be an error as well because of wrong placement of
<role-name>manager</role-name>

<auth-constraint>
</auth-constraint>
<role-name>manager</role-name>
</security-constraint>


and because

<web-resource-name>Sensitive</web-resource-name>


is same in both the constraints?
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1660
    
  25

Don't you think there shall be an error as well because of wrong placement of
<role-name>manager</role-name>

Yes, that won't work.....
<web-resource-name> is same in both the constraints?

This might work.... but it should not have the same name, you are right

Regards,
Frits
 
 
subject: <security-constraint> doubt