users@jersey.java.net

Re: [Jersey] FormParam problem in InjectableProvider and Spring

From: Cemo Koc <cem.koc.fwd_at_gmail.com>
Date: Thu, 12 Nov 2009 10:11:05 -0800 (PST)

Because the request entity may not be of the type application/x-www-
form-urlencoded. Other parameters can be obtained regardless of the
request entity. Request entity processsing should be closely coupled
with the resource method that declares what it consumes.

What if one uses @FormParam but the request entity is not of the type
application/x-www-form-urlencoded? Should values be null? If so this
does not differentiate between a different request entity type and an
absent parameter.

Note that form parameters and query parameters are not
interchangeable. The Servlet API makes this fundamental mistake.


Thank you so much. It is clear now.



Will a @FormParamBean solution i previously outlined work for you?

It should be possible to combine @FormParam and other @*Param for such
beans. But the @FormParamBean will only be supported on a resource
method parameter that consumes application/x-www-form-urlencoded. Is
that sufficient for your needs?

Forgive my ignorance but I could not understand @FormParamBean section. As
far as I know there is not such a annotation in jersey. Because of this I
think that it should be implement by me now? If it so, I made something
similar to it. But it does not work for me. You can check what I made in my
first post.

 

Stay tuned i might if lucky be able to fully implement this in the
trunk tomorrow!


Of course :) Thank you so much.



-- 
View this message in context: http://n2.nabble.com/FormParam-problem-in-InjectableProvider-and-Spring-tp3992897p3994642.html
Sent from the Jersey mailing list archive at Nabble.com.