If you want to upload a file to a server, there must be some code running on the server which is prepared to accept file uploads. This is true not just for applets but for anything which wants to upload a file.
This "code" on the server might be an FTP server or it might be a web application which accepts uploads via HTTP or there might be some other specialized server. So before you write your applet you will have to find out what the server is actually providing to allow for uploads.
See http://faq.javaranch.com/java/FileUpload for links to information on how to use the HttpClient and FileUpload libraries (you'd use the latter to handle the server part of an HTTP file upload).
The FileUpload user guide has full examples of how to use it. If you have problems with the code you posted, tell us in detail what is and is not working.
the code is working and the file is transfered
but if several users used the applet at the same time
the transfered streams of bytes interferes with each others and the images appear as upper half from one user and the lower half from another user
what i want is to keep the bytes from each user away from the others
I am sure that there is no 2 files with the same name but the problem I think as you said is that the servlet is not thread safe
but I think this will affect the performance
what do you think