title: Spring JSP file upload with or without submitting to server
body: <p>The question is regarding design of my application (spring mvc) and I am not sure I am doing it right. I need to give user upload file option and then parse the uploaded file, validate and show data in JSP. After displaying data if user choose to submit it only then I put data in DB.</p>
  
  <p>What I have done is when user upload file then process it and store information in DB, and then show with pagination in JSP. If users doesn't submit data then I clean up such data next day. Problem I see is so many DB calls and unnecessary data in my DB.</p>
  
  <p>I have read that associate upload request with session and store in memory but apprehensive how will it handle if hundred of user tries to upload nearly the same time.</p>
  
  <p>Please advise is this approach right design and performance wise / or what is the right way to handle such requirement.</p>