About Question enthuware.jwpv6.2.666 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
tori3852
Posts: 38
Joined: Wed Oct 31, 2012 2:53 am
Contact:

About Question enthuware.jwpv6.2.666 :

Post 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.

admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.666 :

Post by admin »

You are right. This has now been updated.

thank you for your feedback!
If you like our products and services, please help us by posting your review here.

tori3852
Posts: 38
Joined: Wed Oct 31, 2012 2:53 am
Contact:

Re: About Question enthuware.jwpv6.2.666 :

Post 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")) 
.

admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.666 :

Post by admin »

Fixed.

thank you for your feedback!
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests