Hi folks,

I would like to show messages personalized with UsernameNotFoundException in my login page 8)
<%
((AuthenticationException) session.getAttribute(AbstractProcessingFilter.ACEG I_SECURITY_LAST_EXCEPTION_KEY)).getMessage()
%>
but, all exception that is throwed in AuthenticationDao.loadUserByUsername
public UserDetails loadUserByUsername(String username)
throws UsernameNotFoundException, DataAccessException;
it is catched in DaoAuthenticationProvider.getUserFromBackend and substituted by BadCredentialsException
private UserDetails getUserFromBackend(String username) {
try {
return this.authenticationDao.loadUserByUsername(username );
} catch (UsernameNotFoundException notFound) {
throw new BadCredentialsException("Bad credentials presented");
} catch (DataAccessException repositoryProblem) {
throw new AuthenticationServiceException(repositoryProblem
.getMessage(), repositoryProblem);
}
}
How I can show my proper messages?