Closed
Description
The problem can be reproduced using spring-boot-sample-web-jsp
with a src/main/webapp/WEB-INF/jsp/error.jsp
with the following contents:
<!DOCTYPE html>
<html lang="en">
<body>
Something went wrong: ${status} ${error}
</body>
</html>
$ mvn spring-boot:run
$ curl :8080/foo -H "Accept:text/html"
<html><body><h1>Whitelabel Error Page</h1><p>This application has no explicit mapping for /error, so you are seeing this as a fallback.</p><div id='created'>Mon Apr 09 14:27:21 BST 2018</div><div>There was an unexpected error (type=Internal Server Error, status=500).</div><div>Foo</div></body></html>
By contrast, it works when packaged as a war:
$ mvn clean package
$ java -jar target/spring-boot-sample-web-jsp-2.0.2.BUILD-SNAPSHOT.war
curl :8080/foo -H "Accept:text/html"
<!DOCTYPE html>
<html lang="en">
<body>
Something went wrong: 500 Internal Server Error
</body>
</html>
The problem occurs in both 1.5 and 2.0.