title: JSP Timingout when doing long job
body: <p>I have a JSP that takes a csv file and adds the tables in the csv file to a database (simplified description).</p>
  <p>The landing page is an html page with a form to submit the file.  When the file is submitted the page redirects to a JSP that does the work.  After the JSP is finished processing the file it returns a html page like this:</p>
  <pre><code>Line 1: Added Bob to users table - Sucess!
  Line 2: Added Sarah to users table - Sucess!
  </code></pre>
  <p>This has been working great however I have descovered a problem.  When I upload a larger csv file to my JSP (say 600 lines instead of 200, which should take about 10-30 minutes).  The JSP does not return anything.  It remains on the landing page indefinatly.  I think that this is because of some kind of timeout.  Is there a standard way to deal with this?  I think that there are two solutions although I don't know how to approach either one:</p>
  <h3>Solution 1</h3>
  <p>Increase the timeout time so that eventually the results will be displayed.  I am not sure if this is the browser or the server timing out.  I suspect is is the server because the browser still says: <code>Waiting for mySite.com/execute.jsp</code>.</p>
  <p><em>The server is Tomcat.</em></p>
  <h3>Solution 2</h3>
  <p>User javascript(?) to refresh the page every second(?) so that the page gets continuously updatted with the progress from the server.  I am not sure what changes would need to be made to the server to accomidate this or if this is a common practice.  A pointer to an example would be helpful.</p>
  <p>(I am not sure if this solution will solve the problem or just provide better information about where the problem failed).</p>