반응형
<%@ page isErrorPage="true" %> <html> <head> <title>Example - "PageContext" Error Data</title> </head> <body> <pre> <% ErrorData errorData = pageContext.getErrorData() ; Throwable throwable = errorData.getThrowable() ; StackTraceElement[] stackTrace = throwable.getStackTrace() ; %>
// 에러페이지 URI Request URI: <%= errorData.getRequestURI() %> // 서블릿이름 Servlet Name: <%= errorData.getServletName() %> // 에러코드 Status Code: <%= errorData.getStatusCode() %> // 에러메시지 Message: <%= throwable.getMessage() %> Stack Trace: <% for ( int i = 0 ; i < stackTrace.length ; ++i ) { out.println(stackTrace[i]); } %> </pre> </body> </html>