Kevin,
No, I haven't solved this problem. I haven't been able to get the
buttons to work right from my error page. When I try your web.xml
changes, I get on deploy:
[WebXmlParser] Ignored element 'dispatcher' as child of 'filter-mapping'.
So that does not help...
I'm getting the feeling that this isn't working because the error page
is a f:subview. Why is that a requirement for error pages again?? If I
change the error page to a full f:view, then the button works the second
time I click it. (The first time I click it, the error page simply
refreshes with the ErrorPage.faces showing up in the address bar instead
of whatever page caused the error). So, that is getting closer...
Time to head home though - this problem will have to wait for later. ;)
Regards,
Jeff Bischoff
Kenneth L Kurz & Associates, Inc.
Kevin Swanson wrote:
I am having the exact same problem using MyFaces with Facelets. It seems like
both the bean name and method are ignored for the action attribute of
commandLink in my error page. I can define a totally bogus commandLink with
action="foo.bar" where there is no managed bean named foo and still it does
nothing and reports no error. I know my error page is OK, because I can
manually get to it by typing the url and it works. Something about how Faces
is transferring to the error page is breaking things.
I did try updating my web.xml like this:
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>*.faces</url-pattern>
<dispatcher>ERROR</dispatcher>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
to make sure that the Extension filter was called when directed to the error
page.
Have you had any luck figuring this out yet? If not, you could try the above
web.xml change and let me know if it works. If it works for you and not me,
then I have some other problem likely due to using Facelets.
Kevin
Jeff Bischoff wrote:
Hi guys,
I've followed the wiki [1] for handling server errors. (e.g. 500, 404)
The page that I have made for this displays fine. But when I try to add
a button for the user to navigate to another page, it does nothing. Such
a button is necessary because simply hitting the "back" button on their
browsers will most likely leave them at the same page, staring at the
error message.
I have tried both h:commandButton and h:commandLink. Is it normal for
navigation away from one of these pages to fail? My button links to an
action on a session-scoped managed bean. The action works fine from
commandLinks in other pages, even after an error occurs (in cases where
the back button gets me back to a non-error page)