Unable to recieve file contents on server during upload
Posted
by
Khushal
on Stack Overflow
See other posts from Stack Overflow
or by Khushal
Published on 2011-01-12T04:44:38Z
Indexed on
2011/01/12
14:54 UTC
Read the original article
Hit count: 116
Hello,
I have a JSP page in which I have a file input field from which I browse a csv file and then upload it on server. I am using method = "POST" and ENCTYPE='multipart/form-data' in the form in which this file input field is present.
On the servlet side(in the application's servlet) I am making use of apache's commom file upload API-ServletFileUpload API. After getting the FileItem list from the method parseRequest(request) of this API I am unable to get the file name and its content by using the methods getName(), getString() of FileItem API.
Needed to know what am I doing wrong or any modifications in my approach that will make my application to work. Any pointers regarding this will be helpful.
Thanks in advance!!
© Stack Overflow or respective owner