Hi,

I try to upload file  with the following code in the ActionForm:

      ......
FilesForm theForm = (FilesForm) form;
       FormFile formFile = theForm.getFile();

       InputStream inFormFile = null;
       try {
           inFormFile = formFile.getInputStream();
String stringURL = "http://WSD-FL:8080";;
           PostMethod post = new PostMethod(stringURL);

//attach file post.setRequestHeader("Content-type", "text/xml; charset=ISO-8859-1"); post.setRequestEntity(new InputStreamRequestEntity(inFormFile)); HttpClient httpclient = new HttpClient(); int statusCode1 = httpclient.executeMethod(post); System.out.println(post.getResponseBodyAsString());
            .....



This code does not work, the post.getResponseBodyAsString() don't print my file. I don't know what I must put in the URL. Please advice,

      Best regards.

      Fatiha.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to