> > > MG>when you enable sendfile support with request attr > org.apache.tomcat.sendfile.support = true > MG>You will need to set these 3 header attributes > > org.apache.tomcat.sendfile.filename: Canonical filename of the file which > will be sent as a String > org.apache.tomcat.sendfile.start: Start offset as a Long > org.apache.tomcat.sendfile.end: End offset as a Long > MG>htitps://tomcat.apache.org/tomcat-6.0-doc/aio.html > > MG>Compression: > MG>set compression="on" @ Connector > MG>https://tomcat.apache.org/tomcat-7.0-doc/config/http.html > > MG>I did not read that TC cannot use sendfile with any compressed Stream? > MG>can you show us the URL? > MG>Thanks > > > We also only really need compression on XML data, the site has minimal > > HTML, SWF's don't really benefit from gzip and some binary data we send > > back and forth is already compressed. I could manually implement > > compression on XML at the application level and within the SWF, if > turning > > off sendFile will have negative consequences. > > > > Tomcat 7.0.42 > > RHEL6 > > ~4T outbound traffic/day > > > > Best, > > John > >
Your first link refers to using sendFile for asynchronous writes from a servlet. "Any servlet can instruct Tomcat to perform a sendfile call by setting the appropriate request attributes." Your answer is not accurate. I don't need to do anything explicitly with the headers. You should look at the documentation regarding the HTTP NIO Connector - which you already have as the second link in your reply. It discusses sendFile and compression, and how you cannot use both the NIO connector and compression if sendFile is on (on is the default).