you can't upload folder directly.
but one thing you can do
first of all convert (compress) that folder into zip file using java code and then upload that.
You cannot directly upload a folder, either you have to manually zip the folder and upload it or you have to use java to zip your folder. for more information
The upload functionality (the file input element) in current browsers does not support this. Therefore it is not possible with a serverside techology.
You can not even try to automate it with DHTML autofilled file input fields either since the element is write protected for obvious security reasons.
You would need more than a little clientside (Java) coding to accomplish something like that.
I'd recommend teaching users to zip their folders (which is easy with a right click on Win) and then upload them. You could then automate the unzipping process of the folder(s) on the server.