Dummy War File Download: A Safe Test WAR for Apache Tomcat Deployment

Grab a dummy war file to test Tomcat deployment, CI/CD pipelines, and server configs safely. Step-by-step download, deploy, and troubleshooting guide.

Deploying an untested build into a live Tomcat container is one of the fastest ways to lose an afternoon — and a dummy war file is the cheapest insurance you can buy. A dummy war file is a tiny, deployable web archive whose only job is to prove that your server, your paths, and your pipeline actually work before real code shows up. It usually ships with nothing more than a welcome page and a deployment descriptor, so when it deploys cleanly you know the problem was never your infrastructure. This guide covers where to download one, how to deploy it, and how to read the errors when it fails.

What Exactly Is a Dummy War File?

A WAR (web application archive) is simply a ZIP file with a very specific internal layout. Servlet containers — Tomcat, Jetty, WildFly, and friends — look for that layout and nothing else. A dummy war file strips the whole thing down to the minimum that a container will still accept: a WEB-INF/web.xml descriptor, a static index.html at the root, and absolutely no application logic.

That tiny footprint is the entire point. If a dummy war file deploys and renders, you have isolated the variable. Any failure after that belongs to your real application, not your environment.

ArchivePurposeTypical ContentsDeployed To
.warWeb applicationWEB-INF/, static assetsServlet container (Tomcat)
.jarLibrary or executableClasses, META-INF/Classpath or java -jar
.earEnterprise applicationMultiple modulesJava EE / Jakarta EE server
.zipGeneric compressed fileAnythingNowhere, by default

What's Inside a Minimal Dummy War File

  • WEB-INF/web.xml — the deployment descriptor. Optional since Servlet 3.0, but including one makes your test more realistic.
  • index.html — a static welcome page so you can confirm the app is actually being served.
  • WEB-INF/classes/ — an empty folder in most dummy builds, present only to mirror real structure.
  • META-INF/MANIFEST.MF — optional metadata; harmless either way.

A well-built dummy war file is usually under 10 KB. If you download something claiming to be a test WAR and it weighs 40 MB, that's a real application wearing a disguise.

Where to Download a Dummy War File

You have four realistic paths, and the right one depends on what you're actually trying to prove.

OptionBest ForTypical SizeEffort
Official Apache Tomcat sample WARFirst-time deployment testTens of KBNone — download
Maven maven-archetype-webapp buildTesting a real build pipelineSmallLow — mvn package
Hand-built ZIP renamed to .warAir-gapped or offline checksUnder 2 KBLow
Container vendor sample appsVerifying a specific runtime versionVariesMedium

The fastest route for most people is the sample application shipped by the Tomcat project itself. The official Apache Tomcat sample application documentation explains that the example app is packaged as a WAR and can be downloaded directly — with one caveat worth repeating: make sure your browser doesn't rename the file extension or append a new one. Chrome and Edge have both been known to turn sample.war into sample.zip or sample.war.zip on certain systems.

If your file lands with a doubled extension, the container will ignore it silently. You'll stare at a 404 wondering what broke. Rename it and move on.

For teams that want the dummy war file to exercise their actual build tooling, generate it instead of downloading it:

mvn archetype:generate -DgroupId=com.example \
  -DartifactId=dummy-war \
  -DarchetypeArtifactId=maven-archetype-webapp

Then run mvn package and collect the artifact from target/. You now have a dummy war file that went through the same toolchain as your production builds — which is a meaningfully better test.

How to Deploy a Dummy War File on Tomcat

Deployment is deliberately boring, which is exactly what you want from a smoke test. The standard procedure:

StepActionWhat to Verify
1Copy the WAR into $CATALINA_HOME/webappsFile lands with .war intact
2Start Tomcat (catalina.sh run or startup.sh)No stack traces in catalina.out
3Watch for auto-expansionA folder appears named after the WAR
4Open http://localhost:8080/<context>/Welcome page renders
5Re-read the log tailClean startup, no redeploy loop

The context path is derived from the file name. A file named sample.war becomes /sample. If you want the app at the server root, name it ROOT.war. This trips up more beginners than any other single detail.

You don't have to deploy to inspect, either. Since a WAR is a ZIP, you can unpack it first:

jar -xvf sample.war

That gives you a directory tree you can read before committing anything to a server. It's the safest way to check that an unfamiliar download really is a dummy war file and not something with a WEB-INF/lib full of surprises.

Server Settings That Affect Deployment

Setting (in Host)DefaultWhat It DoesWhen to Change It
autoDeploytrueRedeploys when a new WAR appearsDisable in production
unpackWARstrueExpands the WAR into a directoryKeep true for easier debugging
deployOnStartuptrueDeploys existing apps at bootDisable for manual control
appBasewebappsDirectory scanned for appsPoint elsewhere for custom layouts

For a test deployment, leave everything at defaults. The whole value of the exercise is confirming the out-of-the-box behavior works. Tune settings only after you have a baseline.

Troubleshooting a Dummy War File That Won't Deploy

When a dummy war file fails, the error is almost always environmental — which makes it easy to fix once you know where to look.

SymptomLikely CauseFix
404 at /sample/Context name mismatch or capitalizationCheck the expanded folder name and match it exactly
WAR never expandsunpackWARs or autoDeploy disabledRe-enable or restart Tomcat
"Invalid or unreadable WAR file"Browser renamed it to .zip, or truncated downloadRe-download, verify with unzip -t sample.war
500 error on requestMalformed web.xmlValidate against the correct Servlet spec version
Repeated redeploy loopTwo copies of the same WARRemove duplicates from webapps
Works locally, fails in CIDifferent Tomcat major versionCheck the namespace — see below

That last row deserves emphasis. Tomcat 10 and later moved from the javax.servlet namespace to jakarta.servlet. A dummy war file built for Tomcat 9 that references javax.servlet classes can fail on Tomcat 10+ with class-not-found errors. Pure static dummies usually survive the jump because they contain no compiled servlets at all — one more argument for keeping your test WAR minimal.

Community reports from CI maintainers consistently point to the same three culprits: extension renaming, context path assumptions, and version skew. None of them are code problems.

Best Practices for Using a Dummy War File in CI/CD

Treat the dummy war file as a permanent piece of test infrastructure rather than a one-off download. Here's how teams get the most out of it:

Pipeline StageHow the Dummy WAR HelpsSuccess Signal
Local setupConfirms Tomcat is installed and reachableWelcome page loads
BuildVerifies artifact packaging and namingmvn package produces a .war
CI deploy jobTests upload, permissions, and restart logicJob exits green
Staging baselineProves the target host works before the real deployClean catalina.out
MonitoringActs as a reference app for health checksHTTP 200 from a static page

Practical habits worth adopting:

  • Pin the file name. Include the context name in your deploy scripts so sample.war never becomes sample-2.war.
  • Checksum your download. Store a SHA-256 hash so you know the same artifact is being tested every time.
  • Re-test after every Tomcat upgrade. A minor version bump can change deployment defaults.
  • Keep it out of production. A dummy war file on a public server is harmless, but it's also noise. Use a staging host.
  • Log the deploy path. Most "it worked yesterday" incidents are actually "the appBase changed yesterday."

If you want a slightly more realistic test, add a trivial servlet or a health endpoint to your dummy build. You'll then be exercising the servlet lifecycle, not just static file serving — which catches a whole different class of configuration error.

FAQ

Is a dummy war file safe to deploy on a server I don't control? A properly built one is just a static HTML page and an XML descriptor, so there's nothing to exploit. Still, unpack it with jar -xvf before deploying and confirm there's no WEB-INF/lib full of unknown JARs. Trust, but verify.

What's the difference between a dummy war file and sample.war? Functionally, nothing. sample.war is Apache's official example app, and it serves as the most commonly used dummy war file in the wild. A homemade dummy war file is just a version you built yourself with fewer moving parts.

Will a dummy war file work on Tomcat 10 or 11? Usually yes, as long as it contains no compiled servlets. If it references javax.servlet classes, it will fail on Tomcat 10+ because the namespace moved to jakarta.servlet. Rebuild it against the matching Servlet specification.

How do I create my own dummy war file from scratch? Create a folder, add index.html at the root and a minimal web.xml inside WEB-INF/, then zip the contents — not the parent folder — and rename the archive with a .war extension. Drop it into webapps and you have a working test artifact in under two minutes.

By Updated