users@jersey.java.net

Re: Get rid of requirement for no-arg constructor

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 28 Nov 2007 10:01:24 +0100

Richard Wallace wrote:
>> Such a parameter can be String, or a class that supports a constructor
>> with a String parameter or a static method of the signature "T
>> valueOf(String)". Plus such information can only be obtained in a
>> per-request scope from the HTTP request.
>>
>
> Maybe this is out of left field, but have you had a look at how
> WebWork/Struts2 handles conversion? It's really slick, allowing you to
> specify different Converters, etc. so you don't have to rely on static
> methods or naming conventions or anything like that. I think doing
> something like this within Jersey or even spec'ing this as a requirement
> in jsr311 would be awesome.
>

Could you send a pointer and/or provide an example?

See also this issue [1].

Paul.

[1] https://jersey.dev.java.net/issues/show_bug.cgi?id=15

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109