Page 1 of 1

About Question enthuware.jwpv6.2.666 :

Posted: Sat Nov 03, 2012 1:55 pm
by tori3852
Second choice

Code: Select all

@ServletSecurity(@HttpConstraint(EmptyRoleSemantic.DENY), rolesAllowed = "R1") 
is syntactycally incorrect, and not because of EmptyRoleSemantic.DENY cannot be used when rolesAllowed is not empty as stated now in explanation. I can only assume it meant to be

Code: Select all

@ServletSecurity(@HttpConstraint(value = EmptyRoleSemantic.DENY, rolesAllowed = "R1")) 
(note, that rolesAllowed attribute belongs to HttpConstraint, not to ServletSecurity), then the explanation fits.

Re: About Question enthuware.jwpv6.2.666 :

Posted: Sun Nov 04, 2012 9:33 am
by admin
You are right. This has now been updated.

thank you for your feedback!

Re: About Question enthuware.jwpv6.2.666 :

Posted: Mon Nov 05, 2012 1:43 am
by tori3852
It is still incorrect, because:
It is permissible to omit the element name and equals sign (=) in a single-element annotation whose element name is value, as shown below:
(from http://docs.oracle.com/javase/1.5.0/doc ... tions.html).

So in this case you must use

Code: Select all

value = 
element:

Code: Select all

@ServletSecurity(@HttpConstraint(value = EmptyRoleSemantic.DENY, rolesAllowed = "R1")) 
.

Re: About Question enthuware.jwpv6.2.666 :

Posted: Mon Nov 05, 2012 6:55 am
by admin
Fixed.

thank you for your feedback!