I'm running out of ideas by now, and don't know what else to try. The point is not even one error-page is working, I just would like to know, what am I doing wrong?, here is the code:
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/sessionexpired.xhtml</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/500.xhtml</location>
</error-page>
When having this code in my web.xml I get this message:
XML read error: no element found
What this message means? how can I solve this? Thanks.
BTW, I have also tried to use filters to handle the ViewExpiredException, then it works the first time when I send the POST message and redirects to the sessionexpired.xhtml. But if I click backward and then make the POST call again BAM! I get again the ViewExpiredException.
UPDATE 30-NOV-2011 --[ALTERNATE SOLUTION]-------------------------------------
After a while I found that in order to make it work you have to specify the loation to .html or .jsp files, so it would end up being:
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/sessionexpired.html</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/500.jsp</location>
</error-page>