Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

change upload file name with com.oreilly.servlet.MultipartRequest to handle the file upload

HjavaOct 18 2014 — edited Oct 20 2014

1. when use com.oreilly.servlet.MultipartRequest to handle the file upload, can I change the upload file name .

2. how com.oreilly.servlet.MultipartReques handle file upload? do it change to byte ?

what  different?  if I use the following method?

   File uploadedFile = (File) mp.getFile("filename");

               FileOutputStream fos = new FileOutputStream(filename);

                byte[] uploadedFileBuf = new byte[(int) uploadedFile.length()];

               fos.write(data);

             fos.close();

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2014
Added on Oct 18 2014
1 comment
1,819 views