Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1071955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:47:02+00:00 2026-05-16T20:47:02+00:00

In short: how to put a zipful of csv data into mysql? Long: I

  • 0

In short: how to put a zipful of csv data into mysql?

Long: I have to create a functionality for an admin to upload bootstrap data for a java web application. The administrator should be able to upload a single zip file of csvs on the admin page. The code needs to unzip csvs and the data must be transferred saved in a mysql DB.

I know I can prepare sql scripts with ‘load infile csv’ to transfer the data from csv(saved in a specific directory in my web app) to mysql. For egs using:
LOAD DATA INFILE “/home/mysql/data/my_table.csv” INTO TABLE my_table FIELDS TERMINATED BY ‘,’ LINES TERMINATED BY ‘\n’;

I also think I can accept and execute .sql files I create containing above sql. I plan to use http://pastebin.com/f10584951 :
modified version of the com.ibatis.common.jdbc.ScriptRunner class .

But I don’t know the first step of how to unzip an uploaded zip and store the files(.CSVs) in a specific directory that my sql statements can access.

It would be great if you can tell me how to do the above with stripes, as it is the framework i have adopted, but normal servlet/jsp 2 etc will be helpful too.

Thanks a lot 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T20:47:03+00:00Added an answer on May 16, 2026 at 8:47 pm

    You can use java.util.zip for unzipping the CSV file. See an example here.

    For uploading the file I recommend Apache Commons FileUpload

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a short question. I want do put this \tssr>&\8=f23' into a String
So long story short, I have some odd bugs in some code I'm messing
Long story short, what fields should I put after the GROUP BY clause ?
I'm using the WML function providelocalinfo to put location information into Short Messages send
I have about a hundred short-text data items (this number can vary substantially) that
my posts have body text , in this texts i put short code like
I have some short questions about the Webgrid. How can I put in a
Short: Do you put the data-role portions (header|content|footer) in your layout/master page or in
I wrote a short test code in Java to upload a PDF file generated
Long story short: I want to put an image in a column of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.