Spring Boot can display a custom error page for a given status code given that a file named with the specific status code is provided to the /error folder. Status error pages can either be static HTML (i.e. added under any of the static resource folders) or built using JSP or other templates engines. The name of the file should be of the exact status code (e.g. 404.jsp, 404.html etc) or a series mask (e.g 3xx.jsp, 4xx.jsp, 5xx.jsp, 5xx.html etc).