I am trying to design a common error page for Spring MVC using Mustache. I am able to print out the exception type (example: Internal Server Error) using variable "error" and the exception message using the variable called "message".
My Sample Mustache Template:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Common Error</title>
<h2>Unexpected Error: </h2>
<h3>Error: {{error}}</h3>
<h3>Message: {{message}}</h3>
</head>
<body>
</body>
</html>
This shows up as:
Unexpected Error:
Error: Internal Server Error
Message: Unexpected Runtime Error Message
Question 1: How do I print out the Exception Stacktrace?
Question 2: Is there a way to print all the model variable available to the mustache template?