a really simple alternative is to call a servlet, that servlet returns an xls created from html table tags (this is suitable for really simple tables for complex ones you might want to use POI). from this resource http://www.coderanch.com/t/363613/Servlets/java/import-HTML-rows-Excel:
in your jsp you have this:
<form method="post" action="DownloadAsExcel"> <input type="submit" name="submit" value="Download as Excel" /> </form>
in your servlet DownloadAsExcel:
public void doPost(HttpServletRequest req,HttpServletResponse res) { res.setContentType("application/vnd.ms-excel"); PrintWriter out=res.getWriter(); out.println(""); out.println("Hello James"); out.close(); }