Given how common this functionality is I am certain a simple google search will provide you hundreds or even thousands of relevant examples to accomplish what it is you want to do.
upload files to server in java - Google Search[
^]
One of the first results:
The fileupload Example Application - The Java EE 6 Tutorial[
^]
Now if you were to actually attempt to implement the functionality you are desiring and run into problems, feel free to come back with a clear explanation of your issue, the errors or problems you are encountering and any relevant code samples so that someone can help you troubleshoot your issue and provide you more meaningful assistance.