jsp - export to excel via link
Hi Everyone
This is my first post but ive done a lot of reading of the forums.
I'm working on a project where a user will enter data into a web form and a sql database will be searched and results displayed in tables in the browser. I have recently been asked to provide a function to export the tables to excel.
I have created a link from the results search.jsp to an export.jsp where i have :
<%@ page contentType="application/vnd.ms-excel"%>
<%response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-disposition","attachment;filename=CIMMs.xls");%>
but this simply produces a blank xls file. even if i include
<jsp:include page="search.jsp"/>
the results of the search are not included it just puts blank tables in the xls file (which would be the output of search.jsp if no information was provided by the user)
Can anyone show me how to produce the xls file with the info being displayed in search.jsp?
Any help will be much appreciated?

