users@jersey.java.net

Re: [Jersey] regarding Multipart missing dependencies and bug ID 575

From: Mark Petrovic <mspetrovic_at_gmail.com>
Date: Fri, 3 Sep 2010 06:41:28 -0700

Thanks. Using 1.4-ea06 works for now.

I looked at the schedule http://wikis.sun.com/display/Jersey/Schedule and found no release date for 1.4. Do you have an approximate release date in mind?


On Sep 3, 2010, at 1:08 AM, Paul Sandoz wrote:

>
> On Sep 2, 2010, at 11:36 PM, Mark Petrovic wrote:
>
>> I'm having this same problem with Jersey 1.3 multipart form operations:
>>
>> http://jersey.576304.n2.nabble.com/Jersey-Multipart-Missing-Dependencies-td5453046.html
>>
>> Until Jersey 1.4 is released,
>
> We have released a promoted build 1.40-ea06 that should work, if you would like to use that.
>
>
>> this thread says there is a workaround "to explicitly register the class: com.sun.jersey.multipart.impl.FormDataMultiPartDispatchProvider withthe resource config."
>>
>> Can someone please explain how to perform this registration?
>>
>
> Otherwise you can create your own instance of Application. For example if you are using package scanning in your web.xml you can use:
>
> public class MyApp extends PackagesResourceConfig {
> public MyMap(Map<String, String> props) {
> super(props);
> getClasses().add(com.sun.jersey.multipart.impl.FormDataMultiPartDispatchProvider.class);
> }
> }
>
> then add the following init param (retain the init param declaring the packages):
>
> <init-param>
> <param-name>javax.ws.rs.Application</param-name>
> <param-value>foo.MyApp</param-value>
> </init-param>
> Paul.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>


--
Mark Petrovic