From b1a3f8b182ba8b8c71b6030613fccf21a64bdd21 Mon Sep 17 00:00:00 2001 From: Ben Alex Date: Sat, 3 Apr 2004 05:35:40 +0000 Subject: [PATCH] Provide authentication failure reason to user. --- samples/contacts/etc/filter/acegilogin.jsp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/contacts/etc/filter/acegilogin.jsp b/samples/contacts/etc/filter/acegilogin.jsp index 2dea61cf20..a76ae4fdfa 100644 --- a/samples/contacts/etc/filter/acegilogin.jsp +++ b/samples/contacts/etc/filter/acegilogin.jsp @@ -1,4 +1,6 @@ <%@ taglib prefix='c' uri='http://java.sun.com/jstl/core' %> +<%@ page import="net.sf.acegisecurity.ui.webapp.AuthenticationProcessingFilter" %> +<%@ page import="net.sf.acegisecurity.AuthenticationException" %> <%-- This page will be copied into WAR's root directory if NOT using container adapter --%> @@ -21,7 +23,8 @@ --%> - Your login attempt was not successful, try again. + Your login attempt was not successful, try again.

+ Reason: <%= ((AuthenticationException) session.getAttribute(AuthenticationProcessingFilter.ACEGI_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>