title: How do I send a list to the jsp that requested it?
body: <p>Let us suppose there is a <code>jsp</code> that needs to display the list of files shared shared by a particular <em>IP</em>. Client opens that <code>jsp</code> on his local server and the request is sent to a remote server to fetch the list.</p>
  
  <p><code>Servlet</code> on the server processes the request and fetches the list of files shared by that IP. Now how do the servlet send that list to the jsp page that requested it ?</p>
  
  <pre><code>JSP :
  
  connection.openConnection(); // Connection sends IP as the query parameter to the 
                               // remote servlet
  </code></pre>
  
  <hr>
  
  <pre><code>Servlet :
  
  doGet(..parameters..) {
   list = getList(forThatIP);
   // NOW HOW DO I SEND THIS LIST ?
  }
  </code></pre>
  
  <p>One method that I thought was to send the whole data as a query string to a servlet on the client side(running a server such as tomcat) and then stash that list onto some file.Later jsp can parse the file and display the data. But that doesn't seem to be a good option.</p>
  
  <p><em>Note: JSP is invoked when a servlet forwards after successfully sending the IP to remote servlet</em></p>