Problem solved using this configuration.
faces-config.xml
<factory>
<exception-handler-factory>org.omnifaces.exceptionhandler.FullAjaxExceptionHandlerFactory</exception-handler-factory>
</factory>
Make Shiro JSF ajax aware by adding FacesAjaxAwareUserFilter
Added <bean class="com.xxx.custom.FacesAjaxAwareUserFilter" />
to util:map
application-config.xml
<util:map>
<entry key="authc">
<bean
class="org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter" />
<bean class="com.xxx.custom.FacesAjaxAwareUserFilter" />
</entry>
</util:map>
web.xml
Added error redirect page to the web.xml
.
<error-page>
<error-code>500</error-code>
<location>/error.xhtml</location>
</error-page>
Mistake in my part.
There happens to be a
SessionTimeoutFilter
which was used for redirecting non Ajax Timeout events, Due to some personal reasons, they wont works peacefully together and i still don't know what made the angry, when staying together. Any help on that is greatly appreciated.This is the code i removed
<filter> <filter-name>SessionTimeoutFilter</filter-name> <filter-class>com.xxx.SessionTimeoutFilter</filter-class> <init-param> <param-name>SessionTimeoutRedirect</param-name> <param-value>/login</param-value> </init-param> </filter> <filter-mapping> <filter-name>SessionTimeoutFilter</filter-name> <servlet-name>Faces Servlet</servlet-name> </filter-mapping>