You need to send the HTTP POST request using the multipart/form-data
encoding. In other words, the POST body should be in multipart MIME format.
If you're using an HTTP library to construct the request it probably
already has built in support for this. Otherwise you'll need to read up on
the details of submitting multipart/form-data formatted requests.
L.
Anuradha S.Athreya wrote:
I yeah I figured that out...
But if I were to have my java program do the Post job, How do I specify the
file details?
Rgds
Anu
-----Original Message-----
From: Hubert Rabago [mailto:[EMAIL PROTECTED]
Sent: Monday, August 29, 2005 6:21 PM
To: Struts Users Mailing List
Subject: Re: File Upload
You can't upload a document using a GET request. Stick with your HTTP post
form.
Hubert
On 8/29/05, Anuradha S.Athreya <[EMAIL PROTECTED]> wrote:
Hello,
I am using Struts Upload. I want to understand the intricacies of
using File upload using Struts.
In our JSP/ HTML, we use a form with enctype ="multipart/form-data"
and the HTML - file to upload a file using HTTP post.
Now, If I were to spcify the same request in the Browser;s address
bar, what should it be?
http://localhost:20000/myApp/uploadDocument.do?name=myFile&file=test.t
xt&enc
type=multipart/form-data
My Action form has the field : name and file.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie
Founder, Zotech Software: http://www.zotechsoftware.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]