Ronald Klop wrote:
Hi,

Does Tomcat 5.5 or maybe 6.0 use java.nio/sendfile() to send static content? So is it more prefered to use RequestDispatcher.forward(myfile) than copy a FileInputStream to ServletOutputStream by hand? I already have the copying part, but would like to know if it is worth the trouble to rewrite it to the dispatcher. I would have to shuffle quite some files, so the rewrite isn't like a couple of minutes work. ;-)

Ronald.

6.0 uses sendfile, you can manually trigger send file too by just setting attributes

check out DefaultServlet.java
search for sendfile and setAttribute on the same line

http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?view=markup



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to