From a129b0bcd186f6cdbc5258e3ed82d475ad899a44 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Thu, 27 Nov 2014 14:35:49 +1100 Subject: [PATCH] 451634 DefaultServlet: useFileMappedBuffer javadoc is misleading --- .../eclipse/jetty/servlet/DefaultServlet.java | 4 +- .../src/main/config/etc/webdefault.xml | 37 +++++++++++-------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java index 52c5d009e2f..b47fc0da8a1 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java @@ -69,6 +69,7 @@ import org.eclipse.jetty.util.resource.ResourceFactory; /* ------------------------------------------------------------ */ /** The default servlet. + * * This servlet, normally mapped to /, provides the handling for static * content, OPTION and TRACE methods for the context. * The following initParameters are supported, these can be set either @@ -123,7 +124,8 @@ import org.eclipse.jetty.util.resource.ResourceFactory; * If set to true, it will use mapped file buffer to serve static content * when using NIO connector. Setting this value to false means that * a direct buffer will be used instead of a mapped file buffer. - * By default, this is set to true. + * This is set to false by default by this class, but may be overridden + * by eg webdefault.xml * * cacheControl If set, all static content will have this value set as the cache-control * header. diff --git a/jetty-webapp/src/main/config/etc/webdefault.xml b/jetty-webapp/src/main/config/etc/webdefault.xml index 83d06445f61..d54d76f3072 100644 --- a/jetty-webapp/src/main/config/etc/webdefault.xml +++ b/jetty-webapp/src/main/config/etc/webdefault.xml @@ -11,17 +11,17 @@ - + - - - + + - - - - + + + + + @@ -119,18 +119,16 @@ * maxCachedFiles The maximum number of files to cache * * useFileMappedBuffer - * If set to true, it will use mapped file buffer to serve static content - * when using NIO connector. Setting this value to false means that + * If set to true, it will use mapped file buffers to serve static content + * when using an NIO connector. Setting this value to false means that * a direct buffer will be used instead of a mapped file buffer. - * By default, this is set to true. + * This file sets the value to true. * * cacheControl If set, all static content will have this value set as the cache-control * header. * --> - - - + default org.eclipse.jetty.servlet.DefaultServlet @@ -323,6 +321,8 @@ + + 30 @@ -330,7 +330,7 @@ - + + + index.html index.htm @@ -348,6 +350,8 @@ + + ar @@ -507,6 +511,9 @@ + + + Disable TRACE