title: Using BufferedReader in JSP/JavaScript
body: <p>so I'm using JSP for the first time and I came across a problem using a BufferReader from a Java class on a JavaScript function.</p>
  
  <pre><code> function getLine(){
        var line;
        var l2;
        var c=0;
        while (c&lt;10){ 
               line = "&lt;%=client.is.readLine()%&gt;"
               console.log(line);
               c++;
        }
  </code></pre>
  
  <p>I was expecting that for each different cycle that I'd get a different line value but the thing is that I'm always getting the first line on my console from the different lines available to read. Have in mind that the "client" object represents an instance of a Java class that is imported on this JSP file and that the "is" object represents an instance of a BufferReader. How can I solve this problem?</p>