i try to upload a file using MultipartReques t
i want to get the name of the file uploaded with html form
and display it on jsp page (just for now to see if it works)
in server.log i see Error creating file: java.io.IOExcep tion: Corrupt form data: premature ending
code i use and it doesnt work
thank You
i want to get the name of the file uploaded with html form
and display it on jsp page (just for now to see if it works)
in server.log i see Error creating file: java.io.IOExcep tion: Corrupt form data: premature ending
code i use and it doesnt work
Code:
try
{
MultipartRequest mrequest = new MultipartRequest(request, filesSavePath);
Enumeration files = mrequest.getFileNames();
for (int i = 1; files.hasMoreElements( );i++)
p= mrequest.getFilesystemName((String) files.nextElement( ));
}
catch(Exception ex)
{
System.out.println("Error creating file: " + ex );
}
Comment