A few days ago while trying an ajaxed request inside my page, using a4j to a rule defined URL using url rewrite api, I kept having this exception javax.faces.application.ViewExpiredException.
In my urlrewrite.xml I have the next rule:


After some debugging, I found out that for some reason the post back request of JSF ajaxed request was coming as /folder/add/add_registry.jsf.jsf with the double .jsf it couldn’t be recognized and the view was lost, leading to the ViewExpiredException.
Adding the next <outbound-rule> under my previous <role> solved the problem.


Related Posts:
Friendly URLs in JSF with Glassfish