================================================================================
     APACHE TOMCAT PORTABLE ENTERPRISE BUNDLE (v2.1 - MULTI-PLATFORM)
     Zero-Configuration, Self-Contained Linux & Windows Runtimes + Pre-Tuned Stack
================================================================================

WHAT IS INCLUDED:
-----------------
1. Apache Tomcat 10.1 (Jakarta Servlet 6.0, HTTP/2, WebSocket)
2. Dual Embedded Eclipse Temurin OpenJDK 21 LTS Runtimes:
   - jdk/linux/   : Full 64-bit Linux (x86_64) OpenJDK 21 LTS Runtime
   - jdk/windows/ : Full 64-bit Windows (x86_64) OpenJDK 21 LTS Runtime
   - jdk/bin/     : Universal cross-platform launcher wrappers
3. Full-Featured Enterprise Controllers (start.sh, start.bat, setup.sh, setup.bat):
   - Automatic OS, Linux Distro, CPU Architecture & Init System (systemd) detection
   - Automatic embedded JVM resolution & native binary execution verification
   - Pre-configured & customizable Garbage Collector (G1GC, ZGC, Shenandoah, ParallelGC)
   - Pre-flight Service detection (systemd on Linux, Windows SCM on Windows),
     stale PID cleanup, and port 8080/8005 conflict checks
   - Built-in systemd & Windows service installer (service-install / service-remove)
4. Pre-hardened server.xml & context.xml:
   - Server banner masking (suppresses version leakage)
   - ErrorReportValve (suppresses technical stack traces)
   - RemoteIpValve (trusted reverse proxy / NGINX / Cloudflare integration)
   - HttpOnly & SameSite=lax session cookie security

HOW TO RUN ON LINUX / DEBIAN / UBUNTU / RHEL / MACOS:
-----------------------------------------------------
Extract anywhere (e.g., /opt/tomcat) and run:
  chmod +x start.sh setup.sh tomcat/bin/*.sh
  ./start.sh                 -> Runs pre-flight checks & starts Tomcat in background
  ./start.sh status          -> Displays OS, JVM, GC, systemd service, PID & port status
  ./start.sh test            -> Verifies native Linux JVM, GC flags & port 8080
  ./start.sh run             -> Runs Tomcat in foreground console
  ./start.sh stop            -> Gracefully stops Tomcat
  ./start.sh restart         -> Restarts Tomcat
  ./start.sh --gc zgc start  -> Starts with Generational ZGC instead of G1GC
  ./start.sh --xms 2048m --xmx 4096m start -> Custom heap sizing
  sudo ./start.sh service-install -> Installs & enables /etc/systemd/system/tomcat.service
  ./setup.sh                 -> Opens interactive management menu

HOW TO RUN ON WINDOWS:
----------------------
Extract anywhere (e.g., C:\Tomcat) and run from PowerShell or Command Prompt:
  .\start.bat                -> Runs pre-flight checks & starts Tomcat in background
  .\start.bat status         -> Displays OS, JVM, GC, Windows Service & port status
  .\start.bat test           -> Verifies Windows JVM, GC flags & port 8080
  .\start.bat run            -> Runs Tomcat in foreground console
  .\start.bat stop           -> Stops Tomcat
  .\start.bat restart        -> Restarts Tomcat
  .\start.bat --gc zgc start -> Starts with Generational ZGC
  .\setup.bat                -> Opens interactive management menu

ACCESSING THE RUNNING SERVER:
-----------------------------
Open your web browser and navigate to:
  http://localhost:8080

LEGAL & REDISTRIBUTION CLAUSE:
------------------------------
This bundle is 100% Free and Open Source Software (FOSS).
- Apache Tomcat is licensed under the Apache License, Version 2.0.
- Eclipse Temurin OpenJDK is licensed under the GNU GPL v2 with Classpath Exception.
See LICENSE.txt for complete licensing details.
================================================================================
