About Question enthuware.jwpv6.2.645 :

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
ETS User

About Question enthuware.jwpv6.2.645 :

Post by ETS User »

In explanation: the link to ibm.com website is not working

goetz
Posts: 11
Joined: Wed Jan 18, 2012 8:32 am
Contact:

Re: About Question enthuware.jwpv6.2.645 :

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

Guest

Re: About Question enthuware.jwpv6.2.645 :

Post 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 :)

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

Re: About Question enthuware.jwpv6.2.645 :

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

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests