title: How can I make a jsp table scrollable?
body: <p>I have the table bellow on a JSP page. The number of rows on the table is variable, populated by a list passed from the controller. How can I add scrolling to it so the table header is fixed? I know it's easy enough on JSF, but how to do it on JSP? </p>
  
  <pre><code>&lt;body&gt;
  
      &lt;table&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;PO&lt;/th&gt;
                  &lt;th&gt;Product&lt;/th&gt;
                  &lt;th&gt;Batch Size&lt;/th&gt;
                  &lt;th&gt;SPI&lt;/th&gt;
                  &lt;th&gt;AOI&lt;/th&gt;
                  &lt;th&gt;PTH&lt;/th&gt;
                  &lt;th&gt;Inspection&lt;/th&gt;
                  &lt;th&gt;Tests&lt;/th&gt;
                  &lt;th&gt;Expedition&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody id="prodReportTable"&gt;
              &lt;c:forEach var="pojo" items="${list}"&gt;
                  &lt;tr&gt;
                      &lt;td&gt;${pojo.po}&lt;/td&gt;
                      &lt;td&gt;${pojo.productName}&lt;/td&gt;
                      &lt;td&gt;${pojo.poSize}&lt;/td&gt;
                      &lt;td&gt;${pojo.spi}&lt;/td&gt;
                      &lt;td&gt;${pojo.aoi}&lt;/td&gt;
                      &lt;td&gt;${pojo.pth}&lt;/td&gt;
                      &lt;td&gt;${pojo.inspection}&lt;/td&gt;
                      &lt;td&gt;${pojo.tests}&lt;/td&gt;
                      &lt;td&gt;${pojo.expedition}&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/c:forEach&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
  
  &lt;/body&gt;
  </code></pre>