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.IOException: Corrupt form data: premature ending
code i use and it doesnt work
Expand|Select|Wrap|Line Numbers
- 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 );
- }