Compression of output content is supported for later versions of Tomcat5.0, using gZIP compression format
Modify %TOMCAT_HOME%/conf/server.xml, the first Connector node of the file. The specific node to be modified is as follows:
< The Connector port = “80” protocol = “HTTP/1.1”
ConnectionTimeout = “20000”
The redirectPort = “8443”/& gt;
The modified code is as follows:
< The Connector port = “80” protocol = “HTTP/1.1”
ConnectionTimeout = “20000”
The redirectPort = “8443” URIEncoding = “utf-8”
Compression will = “on” compressionMinSize = “2048”
NoCompressionUserAgents = “gozilla, traviata”
CompressableMimeType = “text/HTML, text/XML, text/javascript,
Text/CSS, text/plain “/ & gt;
The following attributes have been added
1. Compression = “on”
2. CompressionMinSize = “2048” with compressed output content size enabled, which is 2KB by default
3. NoCompressionUserAgents = “gozilla, traviata” browsers to be excluded;
4, compressableMimeType = “text/HTML, text/XML, text/javascript, text/CSS, text/plain” compression type
After the modification, restart Tomcat, and finally check the website.
Modify %TOMCAT_HOME%/conf/server.xml, the first Connector node of the file. The specific node to be modified is as follows:
< The Connector port = “80” protocol = “HTTP/1.1”
ConnectionTimeout = “20000”
The redirectPort = “8443”/& gt;
The modified code is as follows:
< The Connector port = “80” protocol = “HTTP/1.1”
ConnectionTimeout = “20000”
The redirectPort = “8443” URIEncoding = “utf-8”
Compression will = “on” compressionMinSize = “2048”
NoCompressionUserAgents = “gozilla, traviata”
CompressableMimeType = “text/HTML, text/XML, text/javascript,
Text/CSS, text/plain “/ & gt;
The following attributes have been added
1. Compression = “on”
2. CompressionMinSize = “2048” with compressed output content size enabled, which is 2KB by default
3. NoCompressionUserAgents = “gozilla, traviata” browsers to be excluded;
4, compressableMimeType = “text/HTML, text/XML, text/javascript, text/CSS, text/plain” compression type
After the modification, restart Tomcat, and finally check the website.
Read More:
- After modifying the Tomcat configuration file in development, the modified configuration file will be automatically restored after ecplise starts Tomcat
- The web project removal server reports an error, and the web project in eclipse cannot be automatically deployed to Tomcat
- Idea can’t find the solution of XML configuration by running project prompt through external Tomcat
- Modify the tomcat configuration in docker, causing javaagent to report agent library failed to init instrument
- Could not publish server configuration for Tomcat v8.5 server at localhost
- web.xml Web app error in file
- There is more than one Web fragment with the same name: “spring_web”.
- IOS WebView failed to load the web page. Error domain = kcferrodomaincfnetwork code = 310 “there was a problem communicating with the secure web proxy server (HTTPS). “
- Validation error: compression plug invalid options
- Failed to execute goal org.apache.tomcat . maven:tomcat7-maven-plugin : 2.2: run solution
- Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (default-cli) on project
- Error in Maven packaging web project: webxml attribute is required (or pre existing WEB-INF)/ web.xml if executing in update)
- Web Crawler: How to get the data in the web page and disguise the header, disguise as a browser to visit many times, avoid a single visit leading to IP blocked
- [Solved] Tomcat Failed to Start Error: Server Tomcat v8.5 Server at localhost failed to start
- Configuration error in mybatis configuration file
- Methods of exporting configuration and importing configuration in IntelliJ idea
- Vs configuration of OpenGL development environment: configuration of glfw library and glad Library
- stay web.xml Configure error page in
- Some problems and solutions of Java Web