Have to set the content-disposition header...
// the following one makes it come up with a save as or open from dialog
// response.setHeader("Content-Disposition", "attachment; filename=" + file_name);
// the following does it inline as thought you were to click a link normally
response.setHeader("Content-Disposition", "inline; filename=" + file_name);
Travis Reeder
Chief Software Architect
ThinkVirtual
---- Original Message ----
From: Bert Dawson <[EMAIL PROTECTED]>
Sent: 2001-04-25 11:18:33.0
To: JRun-Talk <[EMAIL PROTECTED]>
Subject: serving up a csv...
I've got a jsp page that runs a report and has to serve the results in csv
format, in which case it should be opened with excel (or whatever).
I've got it to prompt me to "save file from current location/open it" by
using the page directive contentType="unknown", but the file still has a jsp
extension, so it opens in Jrun Studio - not ideal...
Any ideas how i get it to open/save myfile.csv rather than myreport.jsp?
Cheers
Bert
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists