This article provides a comprehensive overview of Tomcat, covering its role as an open‑source Java web server, the internal components such as Server, Service, Connector, and Container, lifecycle management, servlet and JSP processing, connector types, pipeline/valve mechanisms, Comet push, and asynchronous servlet support.
The article explains why resource isolation is essential for distributed architectures, describes common isolation methods such as thread, process, cluster, data, static and crawler isolation, and provides concrete examples and code snippets for Netty, Dubbo, Tomcat, and Hystrix to illustrate practical implementations.
The article explains why session sharing is critical in micro‑service and distributed deployments and presents four backend solutions—Nginx ip_hash load balancing, Tomcat session replication, Redis‑based centralized session storage, and cookie‑based sessions—detailing their implementations, advantages, and drawbacks.
This article explains why session sharing is required in micro‑service and distributed environments and presents four practical solutions—Nginx ip_hash load balancing, Tomcat session replication, Redis centralized session cache, and cookie‑based sharing—detailing their implementations, code snippets, and pros and cons.
This article provides a comprehensive technical deep‑dive into Apache Tomcat, covering its role as a Java EE web server, core components such as Server, Service, Connector, Container, the detailed lifecycle management, servlet and JSP processing, various connector implementations, NIO handling, Comet push technology, and asynchronous servlet support.
This article provides a comprehensive technical guide to Apache Tomcat, covering its servlet container architecture, core components such as Server, Service, Engine, Host, and Context, lifecycle management, request processing pipeline, connector types, JSP handling, asynchronous servlet support, and related code examples.
This guide explains Dockerfile fundamentals, walks through each instruction such as FROM, RUN, COPY, and ENTRYPOINT, and provides step‑by‑step examples for building Nginx and Tomcat images, helping readers create reliable container images from scratch.
This guide introduces Apache Tomcat, explains the mechanics of several high‑severity CVEs—including arbitrary file write, AJP file inclusion, and CGI RCE—provides detailed reproduction steps with Docker, command‑line payloads, and code snippets, and demonstrates how to gain remote shells via weak credentials and war deployment.
This article explains how Tomcat customizes Java’s ThreadPoolExecutor for I/O‑intensive web workloads, detailing the key parameters, the custom task queue and thread factory, the overridden execute logic, and the role of the submittedCount variable in preventing thread starvation under high concurrency.
This guide explains the relationship between Pods and controllers, introduces Kubernetes Deployments for managing stateless applications, and provides a complete YAML example to create a Tomcat Deployment with three replicas and a NodePort Service, followed by the kubectl command to apply the configuration.
This article walks through the evolution of character encoding—from the early ASCII standard, through Chinese extensions like GB2312 and GBK, to the universal Unicode system and its UTF‑32, UTF‑16, and UTF‑8 encodings—explaining their structures, usage, and common pitfalls.
This article explains why session sharing is critical in micro‑service architectures, compares common Nginx load‑balancing methods, and provides four practical solutions—ip_hash load balancing, Tomcat session replication, Redis‑based session caching, and cookie‑based sharing—complete with configuration examples and pros/cons.
This comprehensive guide explores Tomcat’s mature architecture, explains its core components such as connectors, containers, endpoints, processors, adapters, and valves, demonstrates the request flow, reveals the custom class‑loading mechanism, and shows how to apply these design patterns to real‑world backend development.
The article documents a systematic investigation of why an Apache HttpClient‑based utility class fails to reuse connections, reproduces the problem with a test server and client, analyzes Tomcat's default maxKeepAliveRequests limit of 100, and provides recommendations for configuration.
This article explains why session sharing is needed in micro‑service architectures, outlines common Nginx reverse‑proxy strategies, and presents four practical solutions—Nginx ip_hash load balancing, Tomcat session replication, Redis centralized cache, and cookie‑based sharing—detailing their implementations and trade‑offs.
In distributed micro‑service environments, session sharing is essential to prevent repeated logins, and this article explains four practical solutions—Nginx ip_hash load balancing, Tomcat session replication, Redis‑based centralized sessions, and cookie‑based sharing—detailing their implementations, advantages, and drawbacks.
This article explains how to optimize Spring Boot's embedded Tomcat settings, tune JVM parameters, configure remote debugging in IDEA, and connect to JVM tools like JConsole and JVisualVM remotely, while also providing practical code snippets and deployment tips for backend services.
JVisualVM, bundled with JDK, provides a visual interface to monitor JVM threads, memory, and CPU usage, allowing installation of plugins for GC, thread, and memory analysis, demonstrating how to simulate memory leaks, capture heap dumps, compare snapshots, trace object references, and set up remote Tomcat monitoring via JMX.
This guide explains how JRebel eliminates the need to restart Tomcat by enabling hot‑deployment of class and Spring configuration changes, covering two installation methods—adding JVM parameters to Tomcat and using the IntelliJ IDEA plugin—plus detailed configuration for Windows, Linux, Mac, Maven, and Gradle.
This article explains the core characteristics of Apache HTTP Server, Nginx, and Tomcat, compares their static and dynamic content handling, and shows how they are typically combined in a Java‑based backend architecture for optimal performance and scalability.
Understanding Java web backend requires grasping how Tomcat parses HTTP requests, dispatches them through servlets, JSPs, listeners and filters, and then leverages Spring’s IoC, AOP, MVC, Boot’s auto‑configuration, and Cloud’s micro‑service tools to build robust, industrial‑grade applications.
This guide explains how to set up JRebel—either by adding JVM arguments to Tomcat or by installing the IntelliJ IDEA plugin—to achieve instant class and resource updates during Java web development, including platform‑specific VM options and Maven/Gradle integration.
This step‑by‑step tutorial shows how to enable security groups, configure firewall ports, install the BT panel or use the command line to set up a Linux server, then install JDK, Tomcat, and Docker CE with all required commands and configurations.
This article explains the fundamentals of Servlet 3.0 asynchronous processing, demonstrates how Spring MVC builds on the Servlet API, and provides multiple practical examples—including starting async support, using AsyncContext, custom threads, listeners, timeouts, and real‑world scenarios—to help developers master non‑blocking request handling in Java web applications.
This tutorial explains how to set up two virtual machines, install JDK, Nginx and Tomcat on each, configure Nginx as a reverse‑proxy load balancer for the Tomcat instances, and verify the high‑availability setup with sample HTML pages.
Tomcat 10.0.x targets Jakarta EE 9, requiring developers to replace the javax package with jakarta, and version 10.0.5 introduces proper JNDIRealm escaping, updated HandlesTypes handling, and a refactored, IoC‑friendly WebSocket creation process to ease migration from earlier Tomcat releases.
This article investigates how Spring Boot’s connectionTimeout parameter behaves by conducting three experiments—controller‑side delay, HttpURLConnection requests, and raw socket connections—revealing that the timeout only applies after a client establishes a connection and remains idle, not to the overall request processing time.
This guide explains what Jenkins is, outlines its main features, and provides step‑by‑step instructions for installing Jenkins on Linux via three methods—yum package, Tomcat container, and Docker—including all required commands, configuration files, and how to retrieve the initial admin password.
This article analyzes Tomcat’s architecture and core components, explains its design principles such as component modularization, connector and container interaction, lifecycle management, and demonstrates how these patterns can be applied to improve system design and development practices.
Tomcat 10.0.x targets Jakarta EE 9, requiring code changes from javax.* to jakarta.* when migrating from Java EE, and introduces key fixes such as async read regression resolution, safe concurrent ServletInputStream.isReady() calls, and an updated Tomcat Native package built with OpenSSL 1.1.1k.
This guide explains the most important Tomcat configuration parameters—including concurrency, thread pool, JVM settings, and key Connector options—so you can optimize the web container for higher throughput and lower latency without getting lost in hundreds of obscure options.
This guide introduces systemd, explains its advantages over init, details unit concepts, command syntax, configuration files, and demonstrates practical setups for managing Nginx, Tomcat, and custom Java JAR services on CentOS 7, including installation, service files, and control commands.
This guide explains four practical methods—adjusting Tomcat VM options, setting global and project encodings, customizing IDEA VM options, and editing configuration files—to resolve Chinese character garbling in the IntelliJ IDEA console, with step‑by‑step instructions and screenshots.
Chinese encodingConsole garbled textIDE configuration
This article walks through the complete troubleshooting and performance‑tuning process for a high‑concurrency SSM‑based e‑commerce system, covering problem identification, root‑cause analysis, JVM, Tomcat, Redis and MySQL optimizations, traffic shaping, and the resulting stability improvements.
Learn how to dramatically speed up Java web development by installing JRebel, covering both Tomcat startup parameter configuration and the IntelliJ IDEA plugin method, with detailed screenshots, VM options for Windows, Linux, and macOS, and tips for proper deployment settings.
This article walks through the step‑by‑step investigation of an unexpected ~100 ms latency in a Spring Boot channel service, using network checks, curl timing, Arthas trace and watch commands to pinpoint a Tomcat‑embed bug caused by Swagger‑UI JAR loading, and then shows how upgrading Tomcat resolves the issue.
This guide explains what JRebel is, why it speeds up Java web development, and provides step‑by‑step instructions for installing it via Tomcat startup parameters or the IntelliJ IDEA plugin, including configuration of deployment settings and VM options for Windows, Linux, and macOS.
This article walks through systematic analysis of backend performance bottlenecks across a typical Nginx‑Tomcat‑Redis‑MySQL stack, covering bandwidth limits, OS ulimit settings, kernel TCP parameters, Nginx connection limits, Tomcat connector modes, Redis key handling, and MySQL query and hardware issues.
A Spring Boot service experienced an unexplained 100 ms extra latency per request, which was traced using the Arthas Java diagnostic tool to reveal a Tomcat embed bug caused by repeated loading of Swagger UI resources, and the issue is resolved by upgrading the embedded Tomcat version.
This article details the step‑by‑step investigation of an unexpected ~100 ms response delay in a Spring Boot‑based channel system, showing how network checks, curl measurements, and deep tracing with the Arthas Java diagnostic tool pinpointed a Tomcat‑embed bug caused by Swagger‑UI resources and how upgrading Tomcat resolved the problem.
This article details a complete end‑to‑end high‑concurrency tuning process for a Java SSM monolithic e‑commerce system, covering problem identification, root‑cause analysis, a series of JVM, Tomcat, Redis and JDBC optimizations, horizontal scaling, code refactoring, and the resulting stability improvements.
This article explains Tomcat's Connector architecture, compares BIO, NIO and APR protocols, details key parameters such as acceptCount, maxConnections, maxThreads, and shows how to configure and monitor thread pools and connection limits for optimal server performance.
This tutorial walks through installing Java 1.8, setting up Apache Tomcat 8.5.43 on a Linux server, configuring its directories, starting and stopping the service, managing logs, securing the webapps folder, and creating multiple Tomcat instances with custom ports and reverse‑proxy settings.
When starting a Spring Boot application, WARN messages about missing JAR files appear because Tomcat incorrectly scans Manifest Class-Path entries, and the article explains the root cause, debugging steps, and multiple ways to resolve the issue.
This guide explains how to add Tomcat support to IntelliJ IDEA Community Edition by installing a compatible plugin, configuring the server and web project, handling download issues, and deploying your web application without needing the paid Ultimate edition.
This article provides an in‑depth analysis of Tomcat’s architecture, covering its core components such as connectors, containers, lifecycle management, class‑loader hierarchy, and design patterns like composite, observer, and template method, while offering practical guidance for reading source code and applying these concepts in real projects.
This article explains how to optimize Tomcat by adjusting connector settings, switching between BIO, NIO, and AIO modes, and fine‑tuning JVM options such as heap size, garbage‑collector flags, and thread parameters to improve server performance and stability.
This guide introduces JVisualVM, explains its installation and plugin system, demonstrates how to create a memory‑leak example, use VisualGC and sampling tools to identify leaking objects, and shows step‑by‑step remote monitoring of a Tomcat server via JMX, providing practical screenshots and code snippets.
This article introduces a tutorial video that demonstrates how to install and run Jenkins, the open‑source CI/CD platform, inside an Apache Tomcat servlet container on a Windows operating system, and provides links to related cloud‑native community resources and further Jenkins learning materials.
This article presents a practical, step‑by‑step walkthrough of identifying, diagnosing, and resolving high‑concurrency performance problems in a Java‑based SSM e‑commerce application, covering monitoring, root‑cause analysis, JVM/Tomcat/Redis/JDBC tuning, code improvements, and the resulting system stability.
This article details a step‑by‑step performance tuning process for an SSM‑based e‑commerce system experiencing severe CPU, memory, Redis, and JDBC issues during flash‑sale spikes, covering root‑cause analysis, JVM and Tomcat optimizations, connection‑pool adjustments, code refactoring, and the resulting stability improvements.
This step‑by‑step guide shows how to enable security groups, install the BT control panel, configure firewall rules, deploy JDK and Tomcat, and install Docker on a Linux server, including all required commands and troubleshooting tips.
This step‑by‑step tutorial shows how to enable security groups, configure a BT panel or command‑line environment, install JDK, Tomcat, and Docker on an Alibaba Cloud Linux server, and verify firewall and service status for a production‑ready setup.
This guide explains how to set up a highly available Tomcat service on CentOS 7 by installing and configuring Nginx as a reverse proxy and load balancer together with Keepalived for VRRP‑based failover, covering environment preparation, installation steps, master‑backup configuration, and Nginx upstream settings.
JVisualVM, bundled with JDK, offers a visual interface to monitor JVM threads, memory, CPU usage, and perform heap dumps, enabling developers to detect memory leaks, analyze object references, and remotely monitor applications such as Tomcat, with step-by-step installation, plugin usage, and code examples.
This article explains how Spring Boot automatically starts an embedded Tomcat server, detailing the main entry point, context creation, refresh process, and the internal Tomcat components that are instantiated and started during application startup.
This article explains how to replace the default embedded Tomcat container in Spring Boot with Undertow, outlines the necessary dependency configuration, compares their performance and memory usage through benchmark results, and recommends Undertow for high‑concurrency Java web applications.
This article explains how Spring Boot uses Tomcat by default, shows how to replace it with Undertow, and presents benchmark results that demonstrate Undertow's superior throughput and lower memory consumption for high‑concurrency Java web applications.
This article explains how to replace Spring Boot's default embedded Tomcat with Undertow, compares their architectures, presents benchmark results showing Undertow's superior throughput and lower memory usage, and concludes that Undertow is the better choice for high‑concurrency Java web applications.
When a Tomcat‑based web management system is scaled from a single instance to multiple nodes behind Nginx, session inconsistency arises, and this article explains four practical solutions—session replication, client‑side cookie storage, sticky sessions, and centralized Redis storage—detailing their mechanisms, advantages, and drawbacks.
This article presents a complete case study of diagnosing and optimizing a high‑traffic flash‑sale module in a Java SSM monolithic e‑commerce system, covering problem identification, root‑cause analysis, JVM/Tomcat/Redis/JDBC tuning, code refactoring, and the resulting stability improvements.
This article explores the inner workings of Java HttpSession in Tomcat, explains how sessions are stored in a thread‑safe map, examines the relationship between sessions and cookies, and investigates why browsers share cookies across different ports on the same host, leading to unexpected session behavior.
This guide walks through installing Supervisor on CentOS 7, configuring its core settings, creating program definitions for Tomcat and Redis, and managing services with supervisord and supervisorctl, providing a reliable solution for automatic process recovery on Linux/Unix systems.
This article explains how to enable and use Spring Boot's graceful shutdown feature in version 2.3, including configuration of the embedded web server and Actuator, and also provides a custom solution for older Spring Boot releases to achieve smooth termination of ongoing requests.
This article explains how Tomcat, a popular Java web server and servlet container, handles incoming HTTP requests by providing socket services, distributing URLs to web applications, encapsulating request and response objects, and invoking servlet classes, illustrated with step‑by‑step screenshots of a simple implementation.
This article explains how Tomcat works as a servlet container, detailing the seven essential steps—from socket handling and request dispatch to request/response encapsulation, servlet base classes, implementations, configuration, and startup—so you can build a minimal Tomcat-like server yourself.
This guide walks you through configuring Nginx as a reverse proxy on Linux, covering user creation, compilation, SSL support, proxy directives, troubleshooting, and a second example that routes traffic to two Tomcat services on different ports.
Learn how Tomcat, the popular Java web server and servlet container, processes requests—from socket handling and URL dispatching to request/response encapsulation, servlet lifecycle, configuration, and startup—through a detailed 7‑step guide with illustrative code snippets and diagrams.
This guide explains what Nginx is and how reverse proxy works, details its load‑balancing algorithms, provides step‑by‑step commands to download, compile and install Nginx and Tomcat on CentOS 7, shows how to configure Nginx upstreams for Tomcat servers, and lists common pitfalls such as firewall blocks.
This article explains how Tomcat, the popular Java servlet container, processes incoming HTTP requests by providing socket services, dispatching URLs, wrapping request/response objects, and invoking servlet classes, illustrated with a seven‑step implementation and accompanying screenshots.
This article explains how to optimize a SpringBoot application by adjusting Tomcat settings in the application.properties file, tuning JVM parameters with examples, and demonstrates two practical methods—IDE configuration and command‑line scripts—to improve performance and resource usage.
A Spring Boot channel service suffered an unexplained ~100 ms delay per request, which was traced through network checks, curl timings, and deep Arthas analysis to reveal a Tomcat‑embed bug caused by repeated loading of Swagger static resources, ultimately fixed by upgrading Tomcat.
This article explains how to replace SpringBoot's default embedded Tomcat with Undertow, shows configuration steps, compares their performance and memory usage through benchmarks, and concludes that Undertow is the superior choice for high‑concurrency Java web applications.
Tomcat starts by Bootstrap.main reading server.xml, initializing components, then blocking in Server.await based on the shutdown port, while shutdown can be performed via the shutdown.sh script (sending a SHUTDOWN command), kill signals (preferably SIGTERM for graceful hooks), or custom JVM shutdown hooks, with the script posing security risks and often being replaced by kill‑15 combined with proper hooks in production.
Tomcat 9.0.26 suffers a high‑concurrency deadlock caused by a lock‑order inversion among NIO poller and executor threads, dropping TPS to zero and creating thousands of CLOSE_WAIT sockets; downgrading to Tomcat 8 or applying the 9.0.31+ patch that moves the close operation into a finally block restores performance to around 15 K TPS.
This tutorial walks developers through downloading Tomcat, transferring files via SCP, extracting the package, configuring directories, starting the service, opening port 8080 in the Huawei Cloud security group, and finally accessing the web application on a Kunpeng Elastic Cloud Server.
This guide explains how to configure Jenkins to pull Java code from Git, compile and package it with Maven, transfer the artifact to a test server via SCP, and restart Tomcat, providing a complete CI/CD pipeline for Java applications.
This article explains how to handle massive, bursty traffic in lottery‑style applications by designing a load‑balancing layer that filters invalid requests, optimizing Tomcat thread pools, and moving core business logic to Redis while using message queues to smooth gift‑distribution spikes.
This article explains how Spring Boot launches an embedded Tomcat server by tracing the main method, creating and refreshing the application context, and initializing Tomcat's core components such as connectors and containers, while detailing the hierarchy of Engine, Host, Context, and Wrapper.
The article explains how Java 8 parallel streams in Tomcat containers trigger class‑loading failures because ForkJoinWorkerThreads inherit a null context class loader after Tomcat 7.0.74 introduced SafeForkJoinWorkerThreadFactory, leading to deserialization errors and memory‑leak risks, and recommends avoiding dynamic class loading or using custom thread pools.
This article investigates persistent CLOSE_WAIT sockets in a Tomcat‑Nginx architecture, identifies HttpClient’s connection‑manager as the root cause, and details the step‑by‑step analysis and configuration changes that finally eliminated the issue.
Learn how to implement a smooth, graceful shutdown for Spring Boot applications that use an embedded Tomcat server by customizing the Tomcat connector, enabling the Actuator shutdown endpoint, and automating the process with scripts, ensuring in‑flight requests complete before the service stops.
This tutorial explains how to customize Spring Boot's embedded Tomcat server by adjusting ports, addresses, error handling, connection limits, SSL settings, and access log options through application.properties, providing clear code examples for each configuration.
This guide compares IntelliJ IDEA and Eclipse, explains the workspace shift, walks through default and project-specific configurations for JDK, Maven, Git, Tomcat, and presents a collection of practical shortcuts and UI tweaks to boost Java development productivity.
The article recounts the author’s path from a novice Java developer at Alibaba to becoming an Apache Tomcat committer, PMC member, and Apache Foundation member, detailing early challenges, contributions to Tomcat and Dubbo, participation in Apache Roadshows, and insights on open‑source collaboration and community governance.
The author recounts his path from joining Alibaba's middleware team in 2014 to becoming an Apache Tomcat committer, PMC member, and Apache Foundation member, while also guiding Dubbo's migration to Apache and sharing practical lessons on open‑source contribution and large‑scale backend systems.
This article explains how to configure and tune Spring Boot's embedded Tomcat, adjust JVM parameters, enable remote debugging, and connect monitoring tools such as JConsole and JVisualVM, providing practical steps and code examples for improved performance and easier troubleshooting in production environments.
This guide explains how to deploy Tomcat in a production environment by separating Tomcat and web‑app directories, using symbolic links for version upgrades, configuring CATALINA_HOME and CATALINA_BASE, and providing a custom startup script to achieve isolated configurations for multiple web applications.
This article provides a comprehensive tutorial on installing Apache Tomcat, setting up the required JDK, configuring environment variables, adjusting server ports, and applying performance optimizations such as disabling AJP, switching to NIO, enabling external thread pools, and tuning JVM options for production use.
This guide walks you through Tomcat’s role as a lightweight Java web server, details the prerequisites and step‑by‑step installation, shows how to configure environment variables, adjust ports, and apply performance optimizations such as disabling AJP, switching to NIO, and tuning JVM settings for production use.
When switching from HTTP to HTTPS, Tomcat fails to retrieve the client IP via X-Forwarded-For because of RemoteIpValve configuration and Nginx proxy settings, leading to null values and requiring adjustments in server.xml and Nginx headers to correctly propagate the original client IP.
This article analyzes a production Java service that repeatedly hit org.apache.http.conn.ConnectionPoolTimeoutException due to exhausted HttpClient connection pools, explains how CLOSE_WAIT sockets are created when responses are not closed, and provides step‑by‑step code fixes and Tomcat configuration tweaks to eliminate the problem.
This article breaks down Tomcat’s modular architecture, detailing the relationships and functions of Server, Service, Connector, Container, Engine, Host, Context, and Wrapper, and explains how the Pipeline‑Valve mechanism processes requests from start to finish.
The article explains why a Java‑based backend experiences higher CPU usage, reduced thread count, and frequent Young GC when traffic spikes, detailing the impact of Tomcat thread limits, JVM garbage‑collection pauses, and memory reclamation on overall service performance.
This guide walks through planning server IPs, installing and configuring keepalived for high availability, crafting master and backup keepalived.conf files, creating a Tomcat health‑check script, monitoring logs, handling failover, and resolving common errors on Linux systems.
This article provides a step‑by‑step tutorial on preparing the environment, configuring Tomcat, copying Jenkins files, and handling permissions to successfully migrate a Jenkins instance to a new machine or directory.
The article explains the evolution from classic three‑tier Java web architecture to cluster, distributed, and microservice designs, detailing each model’s components, load‑balancing mechanisms, session sharing, and the trade‑offs of using technologies such as Tomcat, Nginx, Dubbo, and Spring Cloud.
This article compares deploying multiple applications on a single Tomcat instance versus using separate Tomcat instances per application, outlining the operational and developer advantages and disadvantages, and offering guidance on choosing the appropriate strategy based on resource needs.