Tomcat maxPostSize setting implementation process analysis

Tomcat maxPostSize setting implementation process analysis

1. Why set maxPostSize?

The tomcat container has a limit on the size of the transmitted data. If a file exceeding this value is uploaded, an error will be reported, making the program unable to be used normally.

2. Setting method

Find /conf/server.xml in the tomcat directory and add the maxPostSize parameter to it

The parameter value "-1" means no size limit. Not setting the maxPostSize parameter means using the default size, which is 2097152 bytes, or 2 megabytes.

3. Notes on setting values

One thing to note is that when there is no limit on the size of transmitted data under different versions of Tomcat, the value of maxPostSize is not the same!

Specific differences:

Before tomcat7.0.63, setting maxPostSize to a value less than or equal to 0 means no limit

In tomcat7.0.63 and later, setting maxPostSize to a value less than 0 indicates no limit

If you set maxPostSize="0" after tomcat7.0.63, the transmitted data will not be obtained.

4. Official Documentation

Attach tomcat changeLog

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Solve the post parameter restriction problem by setting tomcat through spring boot
  • Solve the problems that need to be paid attention to when configuring Tomcat's maxPostSize attribute
  • Issues and precautions about setting maxPostSize for Tomcat
  • How to configure the maxPostSize value of built-in Tomcat in Spring Boot

<<:  JavaScript setinterval delay one second solution

>>:  MySQL detailed single table add, delete, modify and query CRUD statements

Recommend

Detailed explanation of JavaScript object conversion to primitive value

Table of contents Object.prototype.valueOf() Obje...

How to modify the default encoding of mysql in Linux

During the development process, if garbled charac...

Introduction to SSL certificate installation and deployment steps under Nginx

Table of contents Problem description: Installati...

Graphic tutorial for installing MySQL 5.6.35 on Windows 10 64-bit

1. Download MySQL Community Server 5.6.35 Downloa...

WeChat applet realizes linkage menu

Recently, in order to realize the course design, ...

MySQL changes the default engine and character set details

Table of contents 1. Database Engine 1.1 View dat...

Vue implements user login switching

This article example shares the specific code of ...

How to use Javascript to generate smooth curves

Table of contents Preface Introduction to Bezier ...

Implementation of VUE infinite level tree data structure display

Table of contents Component recursive call Using ...

Teach you how to use webpack to package and compile TypeScript code

TypeScript Bundling webpack integration Usually, ...

JavaScript implementation of verification code case

This article shares the specific code for JavaScr...

MySQL primary key naming strategy related

Recently, when I was sorting out the details of d...

Discussion on default margin and padding values ​​of common elements

Today we discussed the issue of what the margin v...

Detailed description of shallow copy and deep copy in js

Table of contents 1. js memory 2. Assignment 3. S...