Introduction to Apache Tiles
What is Apache Tiles?
Tiles is a templating framework: you define page layouts once (header, menu, body, footer) and compose every page from reusable fragments called tiles. Change the header in one file and all 200 pages update.
Tiles vs JSP Includes vs Thymeleaf
- JSP includes - static copy-paste; no central layout contract.
- Tiles - named layouts with inheritance; the classic Spring MVC choice.
- Thymeleaf Layout Dialect - the modern replacement; works with Spring Boot executable jars.
Important Version Truth
Apache Tiles 3 works with Spring MVC 5.x. Spring Framework 6 removed Tiles support (TilesConfigurer is gone), and Spring Boot 3 executable jars cannot serve JSPs reliably. Learn Tiles for legacy projects and interviews; build new projects with Thymeleaf.
How This Tutorial Works
We build a small book-catalog war on Spring 5 + Tiles 3, then show exactly where Boot 3 breaks and how to migrate. Companion code: spring-tiles-examples on GitHub.
Key Points
- Tiles equals layouts plus fragments plus inheritance.
- Target stack here: Spring 5.3, Tiles 3.0.8, war packaging.
- Spring 6 and Boot 3 mean Thymeleaf, not Tiles.