-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 André,
(Sorry for the blank post. Who knew CTRL-ENTER would ever be something I would hit accidentally?) André Warnier wrote: > There exist standard modules/add-ons/libraries/subroutines in most > programming languages, that can make guesses at the mime type of a file. > Unfortunately in Java I personally don't know what it would be. You've hit the nail on the head: the browser doesn't "know" the content-type of the file, so it just uses the generic "application/octet-stream". On the server side, you need to figure out what that should be converted to if you don't like the content-type provided by the client (browser). You can do this in any servlet like this: String guessedContentType = getServletContext().getMimeType(filename); This method should use the mime-type mapping you have set up in conf/web.xml. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkjvaRoACgkQ9CaO5/Lv0PBoZgCeIDqXjKl6rQHdvQZG3nTliCrU sKYAn3ku1W3aWbvjiv/E1PO+pDy1tV22 =Gshk -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]