You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "GU,JAMES (HP-Corvallis,ex1)" <ja...@hp.com> on 2001/02/01 17:46:40 UTC
how to compose and handle an http PUT request
I should have made it clear that I am using POCKET PC IE which doesn't support
MultipartRequest (i.e., the <input type="file" ... >). I try to URLConnection
class to simulate an HTTP PUT request to upload a file to the server. But I
couldn't find out how the PUT protocol should be handled in URLConnection class
and in HttpServlet's doPut() method.
Any ideas?
-james
> -----Original Message-----
> From: GU,JAMES (HP-Corvallis,ex1) [mailto:james_gu@hp.com]
> Sent: Wednesday, January 31, 2001 7:39 PM
> To: 'general@jakarta.apache.org'
> Subject: how to compose and handle an http put request
>
>
>
> I have a case where I want to use http "put" rather than ftp
> to upload a file to
> the server, so I don't have to expose the actual directory
> structure. I want to
> use HttpURLConnection to send the request, but I couldn't
> find any examples
> about how to compose a put request using the URLConnection
> object and how to
> handle the put request in my servlet.
>
> In my servlet doPut(), getReader() from httpservletrequest
> can only print out
> the querystring, not the content I have sent to the server
> using URLConnection
> class's getOutputStream().
>
> Any ideas or pointers to any web pages?
>
> Thank a lot!!!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org
>