i am using NetBeans, and i am working on a jsp page that allows the upload of a zip file. The zip file contains 6 CSV files, that is to be written to the SQL database.
My question is, how do i go about allowing the user to upload the file, unzip it in the jsp page, and allow me to read the file? Thanks in advance!
- Add an
<input type="file">and make your
- Use commons-fileupload to obtain the
byteof the file (in a servlet of yours)
java.util.zip.*to extract the files. See here
- Either parse the CVS (here) or if your database has an utility to import CSV, pass the files using