Sunday 15 September 2013

java ee - Uploading and handling a file to a servlet from another application/service -


These are really two questions because they are both faces of the same coin ... ... < P> 1) How can I upload a file from an appellation / service to servlet, in other words, without any HTML form which user should fill?

2) At the end of receiving, I have used the Apache file before uploading, but this form handles the input, is there no uploading from a form?

1 ) How can I upload a file from an appellation / service to servlet, in other words, without any HTML form which user should fill?

You have an HTTP request that the correct header (Multipart / FormData) contains the file in which you want to upload. Take a look at this post: I have not tried to do this, but it seems that it can work.

2) At the end of receiving, I have used Apache file before uploading, but this form handles input, there is another way to handle incoming uploads from one upload to do?

You should still be able to get access to Apache file upload because it only parses HTTP requests, which should still be formatted in the same way.

No comments:

Post a Comment