Hi Hendy, 

Regarding the dependency, it is important because the
org.apache.commons.fileupload.FileUploadBase class has (deprecated) methods
like isMultipartContent(req) which use a parameter from the Servlet API.

I think making the dependency optional is a good move.

Also, I have reverted the initial commit and then made the change myself
using Eclipse plugin wizard. So you don't need anymore to send us the JCA
for such a small change :)

Best regards,
Jerome

-----Message d'origine-----
De : Thierry Boileau [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 12 mai 2008 10:13
À : [email protected]
Cc : Hendy Irawan; Edward Yakop
Objet : Re: javax.servlet should be optional for ext.fileupload -- was Re:
Latest Restlet snapshot is amazing! (re: OSGi)

Hi Hendy,

thanks for your contribution, that I think I've integrated too 
quickly... Normally, as a contributor you must sign the Joint Copyright 
Assignment.
Do you mind to sign and send it? => 
http://www.restlet.org/community/contribute


best regards,
Thierry Boileau
> Confirmed. Hacking the ext.fileupload.jar to use the MANIFEST.MF below 
> make it work. The changed line is the Import-Package one, where I 
> specify dependency to javax.servlet.* as optional. I can still make 
> FileUpload work using the built-in Restlet component HTTP Server.
>
> Should I make a JIRA request for this? This is very trivial... ;)
>
> Manifest-Version: 1.0
> Ant-Version: Apache Ant 1.6.5
> Created-By: 1.5.0_14-b03 (Sun Microsystems Inc.)
> Bundle-ManifestVersion: 2
> Bundle-Name: Restlet Extension - FileUpload
> Bundle-SymbolicName: org.restlet.ext.fileupload
> Bundle-Version: 1.1
> Bundle-Vendor: Noelios Consulting
> Export-Package: org.restlet.ext.fileupload;uses:="org.restlet.resource
> ,org.restlet.data,org.apache.commons.fileupload"
> Import-Package: 
>
javax.servlet;resolution:="optional",javax.servlet.http;resolution:="optiona
l",org.apache.commons.fi 
>
> leupload,org.restlet,org.restlet.data,org.restlet.resource,org.restle
> t.service,org.restlet.util
>
> Name: org.restlet.ext.fileupload
> Implementation-Title: org.restlet.ext.fileupload_1.2
> Implementation-Version: 1.1 Snapshot  (build 215)
> Implementation-Vendor: Noelios Consulting
>
>
>
>
> Hendy Irawan wrote:
>> After battling various strange things with latest Restlet milestone 
>> (without OSGi support incorporated), I tried Restlet snapshot and 
>> wow... I need no more Engine.setInstance() hack... and Component 
>> actually calls Application.createRoot(). (For some strange reason, it 
>> didn't, and left my Restlet server in a "blank" state. I have to 
>> update my restlet app bundle on every launch to make it work)
>>
>> Latest snapshot is working fine.
>>
>> (plus, thanks for mentioning me in the Changelog) ^)^
>>
>> No workarounds needed now, except...
>>
>> Why ext.fileupload requires 'javax.servlet' and 'javax.servlet.http' 
>> (in OSGi manifest)? There has to be a good reason for this, because 
>> in my experience it works fine without (i.e. just using the built-in 
>> Restlet HTTP server component)
>>
>> If it's not always required then should be marked as 
>> resolution:=optional in MANIFEST.MF (or maybe other way). Thanks.
>>
>
>

Reply via email to