title: Send data from servlet to jsp, display in html table.
body: <p>Since I don't have very much experience in web applications at all I've been struggling with this all day now. </p>
  
  <p>I have a <code>index.jsp</code> page that sends a request to a <code>Servlet</code> that creates a very large <code>csv</code> table (5 columns, 500.000+ rows). Since the table is sorted I want to take the first 100 rows and display them in a <code>html</code> table. So the <code>Servlet</code> will redirect the request object to a <code>table.jsp</code> where the data is supposed to be displayed.</p>
  
  <p>I guess I need a piece of advice on the general approach on this. There a several approaches and questions that came to my mind:</p>
  
  <ol>
  <li><p>While creating the <code>csv</code> file, store the first 100 rows in an array of arrays and send them via request object to the <code>jsp</code> page, where they can be displayed in an <code>html table</code>.</p></li>
  <li><p>Only send the path to the <code>csv</code> file and read the first 100 rows directly in the <code>jsp</code> page.</p></li>
  <li><p>Is it useful to choose <code>json</code> as transfer format?</p></li>
  <li><p>Is an object containing 500 Strings too much to transfer in a request object?</p></li>
  <li><p>Is the request object a good practice at all to transfer data to the <code>jsp</code> page?</p></li>
  </ol>
  
  <p>Thanks for your help</p>