Saying "It doesn't work" doesn't help.
What about it doesn't work?
Do you get an error message? What is it? Stacktrace? What is in the logs?
What does your code look like?
Help us to help you.
I presume you are using an <input type="file"/> control on the page, and then using a library similar to the
Apache FileUpload?
If you use the java.io.File class to "upload" the file from the filesystem you are completely wrong.