When ever exception occurs it is redirected to error page that works fine. But i want to capture when ever an exception occurs . I am not concern with the type and where it occurs i need to get print stack trace of the exception when ever it occurs.
For this i created a class
`@Name("errorHandler") public class ErrorHandlerImpl extends ExceptionHandler {
private String stackTrace;
public String getStackTrace() {
return stackTrace; }
public void setStackTrace(String stackTrace) { this.stackTrace = stackTrace; }
@Override public boolean isHandler(Exception e) { return true; } }`
I dont know how can i call handle method to get the exception. I am new to seam so tell me how i use this class. My error.xhtml page calls stackTrace like this.
<h1>Error</h1> <h:outputText value="#{errorHandler.stackTrace}"></h:outputText> <br></br> <h:messages id="errorMessage" styleClass="message"/> Please help me how can i get stack trace of the exception. Thanks & Regards