On Jul 16, 2008, at 6:53 AM, Stephan Koops wrote:
>
> the read of an entity is only allowed for (sub) resource methods,
> because the entity should only be processed there. I think it is
> useful to think about to do the same with @FormParam, so that you
> can not inject it into resource class fields and bean setters, if
> the path is not fully parsed.
> Perhaps there are good arguments against this. What do you think?
>
A slightly different suggestion: if an @FormParam is encountered
before the resource method is called then any entity parameter MUST be
of type MultivaluedMap<String, String>.
That way an implementation can consume the request entity as soon as
the first @FormParam is encountered and we don't restrict the use of
@FormParam.
Marc.
---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.