Hi All,
I am writing a quick-and-dirty static file server using Jetty. I need to set the Content-Type for each response:
HttpServletResponse.setContentType("content/type");
For a given file request, how do I reliably determine what content type to set? Is it a question of examining the file extension, or is there a more sophisticated method? (E.g what if there is no file extension, or the extension does not reflect the content type?)
Thanks Richard