How to send a file from a servlet the “right” way?
问题 I'm trying to send a file to a user from an http servlet. The servlet runs some identification tests (on the request) and then sends the client a file. This generally works but now I turned on my TOMCAT server redirects to https and when I try to access the servlet and download the file from either IE6 or IE8 it fails and I get this exception: java.lang.IllegalStateException: Cannot forward after response has been committed (on the localhost.log) and ClientAbortException: java.net