From: Matthew B. <mat...@ou...> - 2006-03-07 13:28:52
|
Peter Crowther wrote: >>From: Matthew Buckett >>resp.setContentType("text/comma-separated-values"); > > > RFC4180 registers 'text/csv' as the MIME type for CSV. This works in > IE6 and Firefox 1.06 on Windows, I've not tested it further. I'd not > found another type that worked in both. text/comma-separated-values came from the /etc/mime.types on my Linux box. Thinking about this a little more you should probably do. resp.setContentType(BuildingServer.getInstance().getMimeType("marks.csv")) This way the mapping setup for the container will be used for CSV file you generate, otherwise if we have to switch to fix a browser bug it will mean changing the code in lots of places. In fact all resp.setContentType should probably do this that are used for generated file. -- -- Matthew Buckett, VLE Developer -- Learning Technologies Group, Oxford University Computing Services -- Tel: +44 (0)1865 283660 http://www.oucs.ox.ac.uk/ltg/ |