怎样修改tomcat的文件上传限制

1、首先找到这个目录 D:\Program Files\tomcat8\webapps1\manager\WEB-INF\web.xml,然后在web.xml文件中找到

<multipart-config>
      <!-- 50MB max -->
      <max-file-size>52428800</max-file-size>
      <max-request-size>52428800</max-request-size>
      <file-size-threshold>0</file-size-threshold>
    </multipart-config>

修改为

<multipart-config>
      <!-- 50MB max -->
      <max-file-size>524288000</max-file-size>
      <max-request-size>524288000</max-request-size>
      <file-size-threshold>0</file-size-threshold>
    </multipart-config> 

这样就可以上传500M的文件了

你可能感兴趣的:(tomcat)