||Two Servlet Filters Every Web Application Should Have|
|Subject:||MIME types and Servlets that generate binary data|
Response to: MIME types and Servlets that generate binary data
|Also, even if <mime-mapping> worked, it could be a problem if the content type returned by the servlet can differ. EG, imagine an image servlet which takes a GET parameter 'imageType'. Let's say, for discussion's sake, that imageType can be JPEG, GIF, SVG, PNG, etc. In this case, the URL will be distinct for different contentTypes, but <mime-mapping> cannot be used. The above-posted solution works though. I still wonder why Sun didn't include a getContentType method in their default response object.|
Showing messages 1 through 2 of 2.