There are a few tricks.
1. Use a servlet instead:
http://myserver/servlet/csvserver/myfile.csv
where the servlet is named csvserver. This one seems to work with most web
browsers.
2. If you want to use a JSP, save the JSP page with an extension of .csv and
then add this entry to web.xml:
<servlet-mapping>
<servlet-name>
jsp
</servlet-name>
<url-pattern> *.csv
</url-pattern>
</servlet-mapping>
-----Original Message-----
From: Bert Dawson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 1:19 PM
To: JRun-Talk
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