jollyplay
Programmer
- Dec 16, 2003
- 90
Hi
In my JSP I have to download the data from the database as a csv file. I am using the query
"SELECT * INTO OUTFILE 'c:/data.csv' FIELDS TERMINATED BY ',' FROM emp"
The path specified in the query is specified by the user.I tried
<%response.setContentType("text/csv");
response.setHeader(Content-Disposition", "attachment; filename=" + "asd.csv" )%>
By including the above line the jsp page is downloaded. I am confused. How can I pass the path to the query. Please provide me link or code for this.
Thanks in advance.
In my JSP I have to download the data from the database as a csv file. I am using the query
"SELECT * INTO OUTFILE 'c:/data.csv' FIELDS TERMINATED BY ',' FROM emp"
The path specified in the query is specified by the user.I tried
<%response.setContentType("text/csv");
response.setHeader(Content-Disposition", "attachment; filename=" + "asd.csv" )%>
By including the above line the jsp page is downloaded. I am confused. How can I pass the path to the query. Please provide me link or code for this.
Thanks in advance.