%@ page import="org.acegisecurity.context.SecurityContextHolder" %> <%@ page import="org.acegisecurity.Authentication" %> <%@ page import="org.acegisecurity.ui.AccessDeniedHandlerImpl" %>
<%= request.getAttribute(AccessDeniedHandlerImpl.ACEGI_SECURITY_ACCESS_DENIED_EXCEPTION_KEY)%>
<%
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
if (auth != null) {
%>
Authentication object as a String: <%= auth.toString() %>
<% } %>