title: jsf spring security acces denied authentication login
body: <p>I use Spring Security 3 in my jsf2 web app.</p>
  
  <p>When a non-authenticated user tries to access a protected resource, Spring Security redirects to the login page.</p>
  
  <p>In this case, how can I show a message to the user in the login page saying he/she is not allowed to access the resource?</p>
  
  <p>As Spring Security throws an AccessDeniedException in the ExceptionTranslationFilter, and then redirects to the login page, I've tried to use a preRenderView listener in the login page, which checks for "WebAttributes.ACCESS_DENIED_403", but it is null.</p>