I am working on a project where I have to include some code from a JSP. This JSP has code as follows (related to Spring Security) ...
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt' %>
<%@ page import="org.springframework.security.ui.AbstractProcessingFilter" %>
<%@ page import="org.springframework.security.ui.webapp.AuthenticationProcessingFilter" %>
<%@ page import="org.springframework.security.AuthenticationException" %>
....
<c:if test="${not empty param.login_error}">
<font color="red">
Your login attempt was not successful, try again.<br/><br/>
Reason: <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>.
</font>
</c:if>
....
<c:if test="${not empty param.login_error}"><c:out value="${SPRING_SECURITY_LAST_USERNAME}"/></c:if>
...
This is what I tried to check in my servlet:
enumr = request.getAttributeNames();
while(enumr.hasMoreElements())
{
String element = enumr.nextElement()+"";
out.print("<h3>Read an element:");
out.print(element+" » ");
out.print(request.getAttribute(element));
out.print("</h3>");
}
and the corresponding output:
Read an element:__spring_security_session_fixation_filter_applied » true
Read an element:__spring_security_filterSecurityInterceptor_filterApplied » true
Read an element:hibernateFilter.FILTERED » true
Read an element:__spring_security_session_integration_filter_applied » true
Read an element:requestContextFilter.FILTERED » true
An educated guess is that I can conclude an error on reading, *_spring_security_filterSecurityInterceptor_filterApplied*, depicts that an error has occured.
How do I get to read the error message?