I have written a code to upload the files to a server on the client side using multipart.. I would like to know how to receive these files on the server side. Can anybody provide me with the sample code ?
As you are uploading the files from client to the server, your files are already recieved on the server.
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
Joined: Jul 06, 2009
i am actually running a servlet on my machine to get the multipart request. I need to write the code to get the multipart request in the servlet.
Joined: Mar 28, 2007
I did'nt get you. You are saying that you want a servlet on server side that handles multipart requests but you are currently doing this locally on your machine then, why dont you write your servlet code running locally into the servlet thats running on the server ?
in your servlet
To use the "FileItems" in items, you would iterate through the list and check each item to see if it is a form field or not.
contents form fields would get processed as strings. non-form fields can be treated as files. uploaded files should be saved using streams instead of trying to store the contents in memory.
again, the link explains everything, including tracking progress of uploads, dealing with antivirus scanners, and cleaning up temp files. enjoy.