browser « HTTP « JSP-Servlet Q&A





1. How should response content type for documents be specified in order to work consistently across browsers?    stackoverflow.com

I'm developing a simple servlet that should serve documents via http. I use URLs in the form of /getDocument?fileId=1234. The servlet simply 1) sets response.contentType and 2) writes to response.outputStream. The problem ...