java - Attempting to redirect to 401-error.html: "401-error.xhtml Not Found in ExternalContext as a Resource" -
i attempting redirect unauthenticated users 401-error.html
(static page) when org.jboss.seam.security.notloggedinexception
thrown.
with jsf 1.2, able create exception element in pages.xml /401-error.html
view-id.
however jsf 2.1 not have same behavior.
a loop of notloggedinexceptions
, facesfilenotfoundexception
("401-error.xhtml not found in externalcontext resource") exceptions occur.
<security-constraint> <web-resource-collection> <web-resource-name>unauthenticated pages</web-resource-name> <url-pattern>/error/*</url-pattern> </web-resource-collection> </security-constraint> <error-page> <error-code>401</error-code> <location>/error/401-error.html</location> </error-page>
Comments
Post a Comment