title: Issue while exporting from jsp to excel xlsx format
body: <p>I have 2 JSPs named:</p>
  
  <ol>
  <li><p>userDetails.jsp</p></li>
  <li><p>exportUser.jsp</p></li>
  </ol>
  
  <p>First JSP will display database records in a table. Below the table a link named "Export to Excel" is available:</p>
  
  <pre><code>  &lt;a href="exportUser.jsp"&gt; Export to Excel&lt;/a&gt;
  </code></pre>
  
  <p>Once the link is clicked, I need to export data to excel .xlsx format via exportUser.jsp</p>
  
  <p>Both JSPs will have similar code except the second JSP has </p>
  
  <pre><code> &lt;%@page contentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" pageEncoding="UTF-8"%&gt; 
  </code></pre>
  
  <p>However, I get this error from Excel:</p>
  
  <blockquote>
    <p>Excel cannot open the file 'exportUser.jsp' because the file format or
    file extension is not valid. Verify that the file has not been
    corrupted and that the file extension matches the format of the file.</p>
  </blockquote>