Tomcat Directory Structure

Harry · 12 Sep 2026 · 10 views

The Layout

apache-tomcat-10.1.32/
├── bin/     # start/stop scripts and binaries
├── conf/    # server.xml, web.xml, context.xml, catalina.properties
├── lib/     # shared jars loaded by all webapps (JDBC drivers go here)
├── logs/    # catalina.out, localhost.*.log, access logs
├── temp/    # scratch files for the JVM
├── webapps/ # deployed web applications (exploded or WAR)
└── work/    # compiled JSPs and session cache

conf - The Brains

  • server.xml - ports, connectors, engine, hosts, global resources.
  • web.xml - default servlet mappings, welcome files, MIME types.
  • context.xml - defaults applied to every webapp context.
  • catalina.properties - classloader and system properties.

webapps - Where Apps Live

Drop myapp.war here and Tomcat auto-deploys and extracts it to myapp/. The built-in ROOT directory is the default app at /.

work - JSP Compilation

JSP pages are compiled into Java servlets under work/Catalina/localhost/. Clearing work forces JSPs to recompile - a classic fix after upgrading.

Key Points

  • logs and work grow over time - tidy them regularly.
  • JDBC drivers can live in lib/ for global access or in WEB-INF/lib per app.
  • conf/ is the part you should back up with your app.
Share this post:

Comments (0)

Please login or register to comment.