I'm not entirely clear on what problem you're facing, but the standard approach for file upload for the server-side is http://commons.apache.org/proper/commons-fileupload/. For the client side you can use various jQuery plugins to make the experience nicer for the user.
Thanks for the reply Ulf Dittmer. Problem is I cannot use jQuey. At the same time I cannot use commons-fileupload as my request is getting read in the base class. So once the control comes to the required class I am not able to get the data from request. So when I use
items = upload.parseRequest(request);
I am getting null list.
Any way I changed the design solved that by generating dynamically one file input element for each file to upload.
jQuery was just a suggestion for making it more user-friendly; if that is not a consideration then you can just use a standard HTML form.
At the same time I cannot use commons-fileupload as my request is getting read in the base class.
What is the "base class"? You may wish to refactor it so it doesn't impede on the proper working of other parts of the application. If that's not an option, then don't route the request through that class.
A wop bop a lu bob a womp bam boom. Tutti frutti ad: