Hello,
I want to use the Exception Annotation in a BaseClass to use it in all my Controller, like this:
But how to get the Message from the Exception in my JSP?Code:public class BaseController { public final String EXCEPTION_VIEW = "exception"; @ExceptionHandler({ Exception.class }) public String handleException() { return EXCEPTION_VIEW; } }
This don't work.HTML Code:<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ page contentType="text/html" isELIgnored="false" %> <h3>Exception occurred during request processing.</h3> <h5>Exception message:</h5> <p><c:out value="${exception.message}"/></p>
regards
chris



Reply With Quote