All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: About Question enthuware.jwpv6.2.657 :
PostPosted: Tue Aug 16, 2016 12:13 pm 
Offline

Joined: Mon Jun 20, 2016 5:06 pm
Posts: 185
Hi

Quote:
The second Httpconstraint is not correctly specified (valid values for value are PERMIT and DENY).


Could you please show valid syntax with value="DENY" or value="PERMIT" ?


Top
 Profile Send private message  
 
 Post subject: Re: About Question enthuware.jwpv6.2.657 :
PostPosted: Tue Aug 16, 2016 9:21 pm 
Offline
Site Admin

Joined: Fri Sep 10, 2010 9:26 pm
Posts: 6980
johnlong wrote:
Hi

Quote:
The second Httpconstraint is not correctly specified (valid values for value are PERMIT and DENY).


Could you please show valid syntax with value="DENY" or value="PERMIT" ?

@HttpConstraint(value="PERMIT")

The "value" attribute applies (only) when rolesAllowed returns an-empty array. (Servlet 3.0 Specifcation Section 13.4.1.

HTH,
Paul.


Top
 Profile Send private message  
 
 Post subject: Re: About Question enthuware.jwpv6.2.657 :
PostPosted: Wed Aug 17, 2016 1:51 pm 
Offline

Joined: Mon Jun 20, 2016 5:06 pm
Posts: 185
Is it correct full syntax?
@ServletSecurity(@HttpConstraint(value="PERMIT"));


Top
 Profile Send private message  
 
 Post subject: Re: About Question enthuware.jwpv6.2.657 :
PostPosted: Wed Aug 17, 2016 8:50 pm 
Offline
Site Admin

Joined: Fri Sep 10, 2010 9:26 pm
Posts: 6980
Actually, it should be @ServletSecurity(@HttpConstraint(EmptyRoleSemantic.PERMIT));
See section 13.4.1.1 of Servlet 3.0 specification for more examples.


Top
 Profile Send private message  
 
 Post subject: Re: About Question enthuware.jwpv6.2.657 :
PostPosted: Thu Aug 18, 2016 12:24 am 
Offline

Joined: Mon Jun 20, 2016 5:06 pm
Posts: 185
Thank you


Top
 Profile Send private message  
 
 Post subject: Re: About Question enthuware.jwpv6.2.657 :
PostPosted: Wed Feb 07, 2018 4:07 pm 
Offline

Joined: Sat Aug 12, 2017 1:43 pm
Posts: 8
The fifth example have one spelling mistake (2 parentheses after @ServletSecurity), when need only 1 parentheses

Correct variant:
Code:
@ServletSecurity(
        httpMethodConstraints = {
                @HttpMethodConstraint(
                        value = "GET",
                        rolesAllowed = "R1"
                ),
                @HttpMethodConstraint(
                        value = "POST",
                        rolesAllowed = "R1",
                        transportGuarantee = ServletSecurity.TransportGuarantee.CONFIDENTIAL
                )
        })


Top
 Profile Send private message  
 
 Post subject: Re: About Question enthuware.jwpv6.2.657 :
PostPosted: Wed Feb 07, 2018 4:10 pm 
Offline

Joined: Sat Aug 12, 2017 1:43 pm
Posts: 8
The seventh example another spelling mistake, lost literal "f" in word "for" (the first word):

" ...or all HTTP methods except TRACE, auth-constraint requiring membership in Role R1; for TRACE, all access denied"


Top
 Profile Send private message  
 
 Post subject: Re: About Question enthuware.jwpv6.2.657 :
PostPosted: Thu Feb 08, 2018 1:12 pm 
Offline
Site Admin

Joined: Fri Sep 10, 2010 9:26 pm
Posts: 6980
Fixed.
thank you for your feedback!


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Template made by DEVPPL/ThatBigForum