Introduction to Apache Tomcat
Harry
· 12 Sep 2026
· 29 views
What is Tomcat?
Apache Tomcat is an open-source servlet container (also called a servlet/JSP engine) and web server. It implements the Jakarta Servlet, JSP, EL and WebSocket specifications. Spring Boot and Struts apps typically run inside Tomcat, embedded or standalone.
Tomcat vs a Full App Server
- Tomcat - lightweight; runs servlets, JSP and WebSockets. Perfect for web applications.
- GlassFish / JBoss / WildFly - full Jakarta EE platforms adding EJB, JMS, JPA container etc.
- Spring Boot - usually embeds Tomcat directly in a runnable jar instead of a WAR on a server.
How a Request Flows
Browser -> Connector -> Engine -> Host -> Context (your webapp)
-> Servlet/Filters -> Database -> Response backKey Concepts
- Connector - listens on a port (8080 HTTP, 8443 HTTPS) and converts bytes into requests.
- Engine - the central request-processing object.
- Host - a virtual host; usually matching a domain name.
- Context - one deployed web application.
Key Points
- Tomcat is ideal for servlet/JSP and Spring web apps without full Jakarta EE.
- Everything is configured in XML under conf/ (server.xml, web.xml, context.xml).
- Understand Engine/Host/Context - they map to how you deploy apps.