ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/webapps/docs/aio.xml

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/webapps/docs/aio.xml
Status
scanned
Type
file
Name
aio.xml
Extension
.xml
Programming language

      
    
Mime type
text/xml
File type
XML 1.0 document, ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
3328 (3.2 KB)
MD5
3b8676c277827811df77f10d281a0612
SHA1
b3ab5e1f72ced2c7be0e54abc60218dcbbfc2c19
SHA256
a91c5ae181dbcf9e6cb4db1735261f841c28a16e1a491b120e5b6158e6747e16
SHA512

      
    
SHA1_git
7b7d6fd146e90d9313b4ac7c027d99e9d00c6d3b
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
aio.xml | 3.2 KB |

<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!DOCTYPE document [ <!ENTITY project SYSTEM "project.xml"> ]> <document url="aio.html"> &project; <properties> <title>Advanced IO and Tomcat</title> </properties> <body> <section name="Table of Contents"> <toc/> </section> <section name="Introduction"> <p> <b>IMPORTANT NOTE: Usage of these features requires using the HTTP connectors. The AJP connectors do not support them.</b> </p> </section> <section name="Asynchronous writes"> <p> When using HTTP connectors Tomcat supports using sendfile to send large static files. These writes, as soon as the system load increases, will be performed asynchronously in the most efficient way. Instead of sending a large response using blocking writes, it is possible to write content to a static file, and write it using a sendfile code. A caching valve could take advantage of this to cache the response data in a file rather than store it in memory. Sendfile support is available if the request attribute <code>org.apache.tomcat.sendfile.support</code> is set to <code>Boolean.TRUE</code>. </p> <p> Any servlet can instruct Tomcat to perform a sendfile call by setting the appropriate request attributes. It is also necessary to correctly set the content length for the response. When using sendfile, it is best to ensure that neither the request or response have been wrapped, since as the response body will be sent later by the connector itself, it cannot be filtered. Other than setting the 3 needed request attributes, the servlet should not send any response data, but it may use any method which will result in modifying the response header (like setting cookies). </p> <ul> <li><code>org.apache.tomcat.sendfile.filename</code>: Canonical filename of the file which will be sent as a String</li> <li><code>org.apache.tomcat.sendfile.start</code>: Start offset as a Long</li> <li><code>org.apache.tomcat.sendfile.end</code>: End offset as a Long</li> </ul> <p> In addition to setting these parameters it is necessary to set the content-length header. Tomcat will not do that for you, since you may have already written data to the output stream. </p> <p> Note that the use of sendfile will disable any compression that Tomcat may otherwise have performed on the response. </p> </section> </body> </document>
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
25.59
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 10 10