1.在你使用的Jetty版本的jetty.jar中找到webdefault.xml,它在jar文件中的路径是org/mortbay/jetty/webapp/webdefault.xml。把它拷贝到项目中,比如src/main/resources/webdefault.xml。
2.找到useFileMappedBuffer参数,把值设成false
3.pom.xml文件中
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.13.v20130916</version>
<configuration>
<scanIntervalSeconds>2</scanIntervalSeconds>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
<webAppConfig>
<contextPath>/</contextPath>
<defaultsDescriptor>src/main/resources/webdefault.xml</defaultsDescriptor>
</webAppConfig>
</configuration>
</plugin>
添加<defaultsDescriptor>src/main/resources/webdefault.xml</defaultsDescriptor>
欢迎加我的qq技术群425783133