I'm using Spring-3.0.0RELEASE, spring-security-3.0.1.RELEASE, SWF-2.0.8RELEASE, JSF1.2.
I have <h:commandLink action="securedAction" .../>.
In flow definition XML action is secured as transition:
So when user clicks on link - login page is shown (login.xhtml).HTML Code:<transition on="securedAction"> <secured attributes="ROLE_USER"/> .... </transition>
User enters credentials for account which HAS NOT ROLE_USER.
User is taken back to source page with this 'secured action link'.
User clicks on link again and got:
javax.servlet.ServletException: viewId:/login.xhtml - View /login.xhtml could not be restored.
javax.faces.webapp.FacesServlet.service(FacesServl et.java:270)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(Base XMLFilter.java:178)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseF ilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHa ndleRequest(BaseFilter.java:388)
...
Which is actually caused by spring's AccessDeniedException
Questions are:
1) Why I c this JSF error instead of login page?
2) How do I handle such case to inform user: "you dont have enough credentials" ?


Reply With Quote
