Page 1 of 1

About Question enthuware.jwpv6.2.645 :

Posted: Mon Oct 10, 2011 11:24 am
by ETS User
In explanation: the link to ibm.com website is not working

Re: About Question enthuware.jwpv6.2.645 :

Posted: Fri Jan 20, 2012 7:56 am
by goetz

Code: Select all

List<HttpMethodConstraintElement> methodConstraints = new ArrayList<HttpMethodConstraintElement>();
methodConstraints.add(new HttpMethodConstraintElement("*", constraint ));
Regarding the use of "*" to represent all HTTP protocol methods, does it say anywhere in the spec or API that this is permitted? The API for the constructor of HttpMethodConstraintElement says the following about the first argument (methodName):
methodName - the name of an HTTP protocol method. The name must not be null, or the empty string, and must be a legitimate HTTP Method name as defined by RFC 2616
In light of this information it seems the container would simply ignore the "*" definition and default to use the HttpConstraintElement definition, which is supposed to cover any HTTP method not already covered by HttpMethodConstraintElement (in this case apparently none). This doesn't change the answer but makes the example harder to understand...

Re: About Question enthuware.jwpv6.2.645 :

Posted: Sat Aug 25, 2012 12:02 pm
by Guest
Hi,

I was also wondering about the "*" like goetz user above in "methodConstraints.add(new HttpMethodConstraintElement("*", constraint ));"

If someone could clarify this I would be grateful :)

Re: About Question enthuware.jwpv6.2.645 :

Posted: Sat Aug 25, 2012 6:08 pm
by admin
* doesn't make sense here. Even though it does not affect the answer, it should be changed.

This has now been fixed. Thank you for your feedback!