Just map your own servlet to /incoming/*, have this servlet react to
'PUT' by storing the content of request into a file. This is not more
difficult than writing any other servlet.

You can then upload files using

PUT http://server:port/myWebapp/incoming/path/where/to/store/document.pdf

and commons fileupload has nothing to do with PUT, it has to do with
handling multi-part in POST


En l'instant précis du 01/26/07 15:57, Zhan, Jimmy s'exprimait en ces
termes:
> Hi,
>       Thanks for your response.
>
>       I'm not sure about "Jakarta Commons FileUpload".
>       But, by the HTTP/1.1, In HTTP/HTTPS PUT method,
>       The URI is named by the client, means, clients want
>       Upload a file and put it on server and name it as URI.
>       So, can't by URI to determine where to go. The key point
>       is, should using the method to do something. And when reach
>       the server port(8080, 8443), the listener should be tomcat,
>       not my program, except I really want "hijack" the tomcat's
> ports,
>       examining all requests first, then redirect to tomcat or my 
>       PUT handler. It maybe a way, but I'm thing, this job should be
> done by
>       Tomcat. If I'm right, I want to know how.
> Thanks
>
> Jimmy
>       
>
>
> -----Original Message-----
> From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 25, 2007 6:01 PM
> To: Tomcat Users List
> Subject: RE: HTTP PUT - HOW TO CONFIG?
>
>   
>> From: Zhan, Jimmy [mailto:[EMAIL PROTECTED] 
>> Subject: RE: HTTP PUT - HOW TO CONFIG?
>>
>> Our goal is simple, just use the request URI as the file
>> name and put them under /webapps/incoming/.
>>     
>
> How about a valve to examine the headers and forward all PUT requests to
> a specific webapp, modifying the URI as needed?  You can then use either
> your own servlet or something like Jakarta Commons FileUpload to handle
> the request.
>
>   
>> How to post my question on Tomcat Mailing list?
>>     
>
> This IS the Tomcat mailing list.
>
>  - Chuck
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to