A minimal Java web application that replaces Tomcat's default ROOT webapp ($TOMCAT_HOME/webapps/ROOT). Displays server info, request headers, and cookies via a servlet and JSP page.
Supports Tomcat 9, 10, and 11 via Maven profiles.
make deps-check # install JDK and Maven via SDKMAN
make build # build ROOT.war (Tomcat 9 by default)
make jetty-run # run locally with embedded Jetty
# open http://localhost:8080/| Tool | Version | Purpose |
|---|---|---|
| GNU Make | 3.81+ | Build orchestration |
| SDKMAN | latest | Java/Maven version management |
| JDK | 11+ | Java runtime and compiler (installed via SDKMAN) |
| Maven | 3.9+ | Build and dependency management (installed via SDKMAN) |
| act | latest | Local GitHub Actions testing (optional) |
Install all required dependencies:
make deps-checkEach profile targets a specific Tomcat version with the appropriate Servlet API:
| Profile | Tomcat | Servlet API | Java | JDK |
|---|---|---|---|---|
tomcat9 (default) |
9.0.x | javax.servlet 4.0 |
11 | 11-tem |
tomcat10 |
10.1.x | jakarta.servlet 6.0 |
17 | 17-tem |
tomcat11 |
11.0.x | jakarta.servlet 6.1 |
21 | 21-tem |
Select a profile with PROFILE=:
make build # Tomcat 9 (default)
make build PROFILE=tomcat10 # Tomcat 10
make build PROFILE=tomcat11 # Tomcat 11Run make help to see all available targets.
| Target | Description |
|---|---|
make build |
Build ROOT.war (use PROFILE=tomcat9|tomcat10|tomcat11) |
make test |
Run tests (use PROFILE=tomcat9|tomcat10|tomcat11) |
make lint |
Check code style with Maven Checkstyle |
make clean |
Cleanup build artifacts |
make run |
Run locally with Jetty (alias for jetty-run) |
make jetty-run |
Run locally with embedded Jetty server |
make verify-all |
Verify build compiles for all Tomcat profiles |
| Target | Description |
|---|---|
make deploy |
Build and deploy ROOT.war to Tomcat |
make tomcat-install |
Download and install Tomcat 9, 10, 11 to ~/tomcat/ |
make tomcat-switch |
Switch active Tomcat version |
| Target | Description |
|---|---|
make ci |
Run full local CI pipeline |
make ci-run |
Run GitHub Actions workflow locally via act |
| Target | Description |
|---|---|
make deps |
Check required tools are installed |
make deps-check |
Install JDK and Maven via SDKMAN |
make deps-ci |
Install Maven for CI environments |
make deps-act |
Install act for local GitHub Actions testing |
make deps-print-updates |
Print project dependency updates |
make deps-update |
Update dependencies to latest releases |
make env-check |
Check installed tools |
make renovate-bootstrap |
Install nvm and npm for Renovate |
make renovate-validate |
Validate Renovate configuration |
make release |
Create and push a new tag |
All profile-aware targets default to tomcat9. Set PROFILE=tomcat10 or PROFILE=tomcat11 to override.
Downloads and installs Tomcat 9, 10, and 11 to ~/tomcat/{9,10,11} with a ~/tomcat/current symlink:
make tomcat-installThe install script can also be called directly:
./scripts/install-tomcat.sh # install all versions
./scripts/install-tomcat.sh --versions 10,11 # install specific versions
./scripts/install-tomcat.sh --current 10 # switch current symlink to Tomcat 10Add these to your shell profile (~/.bashrc or ~/.zshrc):
export TOMCAT_HOME=~/tomcat/current
export CATALINA_HOME=$TOMCAT_HOMEBuild ROOT.war and deploy it to the matching Tomcat installation:
make deploy # Tomcat 9
make deploy PROFILE=tomcat10 # Tomcat 10
make deploy PROFILE=tomcat11 # Tomcat 11Manual deployment
Edit $TOMCAT_HOME/conf/server.xml — set autoDeploy and deployOnStartUp to false:
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="false" deployOnStartUp="false">Then copy the WAR:
rm -rf $TOMCAT_HOME/webapps/ROOT/
rm -f $TOMCAT_HOME/webapps/ROOT.war
cp ./target/ROOT.war $TOMCAT_HOME/webapps/ROOT.war~/tomcat/current/bin/startup.sh # start
xdg-open http://localhost:8080/ # open in browser
tail -f ~/tomcat/current/logs/catalina.out # view logs
~/tomcat/current/bin/shutdown.sh # stopTo run a specific version instead of current:
~/tomcat/10/bin/startup.sh
~/tomcat/10/bin/shutdown.shTo switch which version current points to:
make tomcat-switch PROFILE=tomcat11make jetty-run # Tomcat 9
make jetty-run PROFILE=tomcat10 # Tomcat 10
make jetty-run PROFILE=tomcat11 # Tomcat 11Then open http://localhost:8080/index.html
rm -rf ~/tomcat/9 # remove a specific version
rm -rf ~/tomcat # remove everythingRemove the TOMCAT_HOME and CATALINA_HOME exports from your shell profile.
If your environment enforces SSL certificate validation:
mvn clean install \
-Daether.connector.https.securityMode=insecure \
-Dmaven.wagon.http.ssl.insecure=true \
-Dmaven.wagon.http.ssl.allowall=true \
-Dmaven.wagon.http.ssl.ignore.validity.dates=truejar tf ./target/ROOT.warGitHub Actions runs on every push to master, tags v*, and pull requests.
| Job | Triggers | Steps |
|---|---|---|
| ci | push (master, tags), PR | Lint, Build, Test |
The CI job uses a matrix strategy testing across JDK 11/18/25 with Tomcat 9, JDK 18/25 with Tomcat 10, and JDK 25 with Tomcat 11.
Renovate keeps dependencies up to date with platform automerge enabled.
Default welcome page — http://localhost:8080/
JSP — http://localhost:8080/index.jsp
Servlet — http://localhost:8080/infoservlet