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

Implementation of tomcat image created with dockerfile based on alpine

1. Download the alpine image [root@docker43 ~]# d...

Object-Oriented Programming with XHTML and CSS

<br />If only XHTML and CSS were object-orie...

Steps to transfer files and folders between two Linux servers

Today I was dealing with the issue of migrating a...

An example of how Tomcat manages Session

Learned ConcurrentHashMap but don’t know how to a...

Implementation of MySQL's MVCC multi-version concurrency control

1 What is MVCC The full name of MVCC is: Multiver...

About browser compatibility issues encountered and solutions (recommended)

Preface: Last Sunday, a senior asked me to help m...

MySQL data operation-use of DML statements

illustrate DML (Data Manipulation Language) refer...

Vue implementation example using Google Recaptcha verification

In our recent project, we need to use Google robo...

How to insert Emoji expressions into MySQL

Preface Today, when I was designing a feedback fo...

How to configure ssh/sftp and set permissions under Linux operating system

Compared with FTP, SSH-based sftp service has bet...

How to deploy DoNetCore to Alibaba Cloud with Nginx

Basic environment configuration Please purchase t...

Solution to mysql prompt "got timeout reading communication packets"

Error message: user: 'root' host: `localh...

Native JS to implement hover drop-down menu

JS implements a hover drop-down menu. This is a s...

Example tutorial on using the sum function in MySQL

Introduction Today I will share the use of the su...