Stuart Butler <[EMAIL PROTECTED]> wrote:
>> response.setContentType("application/vnd.ms-excel"
>);
>...
>> response.setHeader( "Content-Disposition",
>> "attachment; filename=" + filename );
>
>Again a breathtaking knowledge is displayed of literal
>string values just like so many people seem to know
>for the system properties. Obviously the setHeader()
>stuff is standard HTTP - anyone give a site that lists
>the valid header values etc?
I searched the serlvet-interest archives to figure out the right header to
set. However, the "Content-Disposition" header is described in RFC 2183:
http://www.imc.org/rfc2183
>But the setContentType() - are these mime types
>officially, centrally registered anywhere or do you
>just pick them up like the vocabulary of a new
>language?
I just looked at Netscape for Windows' mime type preferences and found that
Excel was mapped to "application/vnd.ms-excel".
But, there are official procedures for registering a MIME type, and they are
described in RFC 2048:
http://www.oac.uci.edu/indiv/ehood/MIME/2048/rfc2048.html
The official archive of types is:
ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/
It is interesting to note (to me, anyway) that the BeOS <http://www.be.com/>
uses MIME types natively to determine a file's type instead of relying on
filename extensions (like DOS & Windows) or embedded, hidden 4-character
codes (MacOS) or random guessing (Unix).
Erik
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html