Pranith,
What you are after is the apache fileupload jar located at
FileUpload - Using FileUpload
When you set the encoding to multipart it all gets mime encoded and weird. I use the fileupload jar to decrypt it all and pull out the params as well as the files.