liveBook · Manning

Apache Tomcat

As explained in Spring Start Here, Second Edition

Tomcat is an open-source Java servlet container and web server that executes Java web components.

Tomcat is a servlet container: it translates HTTP requests for a Java application and turns the app’s responses into HTTP responses. It also calls the servlet associated with a requested path. section 7.1.3

Figure 7.6 A servlet container (e.g., Tomcat) speaks HTTP. It translates the HTTP request to our Spring app and the app’s response into an HTTP response. This way, we don’t need to care about the protocol used for communication on the network, as we simply write everything as Java objects and methods.

Follow the request and response through Tomcat to see how it connects an HTTP client with a Spring application. section 7.1.3

Spring Boot default

Add the web dependency and Spring Boot configures Tomcat by convention; a new app starts it on port 8080. section 7.2.3

How Spring Start Here, Second Edition covers it

How deep it goes
Explains request-response translation and servlet dispatch, then notes Spring Boot’s default setup without detailing configuration.
Examples
Uses path-associated servlets to handle requests and shows Tomcat starting by default on port 8080.
What you can do after
Understand how a servlet container connects HTTP clients to Java applications and why Spring Boot starts Tomcat by default.
How it connects
Connects servlet containers with HTTP, Java servlets, Spring applications, and Spring Boot autoconfiguration.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring Start Here, Second Edition. The section links point to the parts of the book it draws on.