setting file name for creating a data file via servlet
steve lopez
Greenhorn
Joined: Nov 02, 2001
Posts: 2
posted
0
I have created a Servlet/JSP solution that allows the user to save data from MySQL as tab-delimited file. What I do not know is how to programmatically set the default name for the file when the user does a 'Save As'. I recall seeing a solution to this awhile back but cannot find the reference. Thanks! Steve
steve lopez
Greenhorn
Joined: Nov 02, 2001
Posts: 2
posted
0
Please disregard! I just found my answer in a previous post (guess I didn't search thoroughly enough the first time). The answer is: response.setHeader("Content-Disposition","attachment;filename="ALLRESULT.CSV"); Thanks, Steve