Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Filter Error Page  RSS feed

 
Andy Holm
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using a login filter with Facelets and JSF 2.0 that is giving me a blank page when an error is generated by business logic. When I take the filter off, the error page is shown properly. It is happening on a request (rather than a forward). It worked in JSF 1.2 with JSPs. Any ideas what I might be doing wrong?

Here's the filter mapping from my web.xml.




Here's my error-page definitions in my web.xml:



My actual error page is called /pages/error.xhtml. The error is happening on a call to chain.doFilter() in the Filter. Is there a good way to see what page the filter might be trying to load on the error? Any other tips to debug?


 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depending on the server, attempts to generate JSF-based error pages may not work. In order for JSF to behave properly, you have to route a URL through the FacesServlet, and the container may not be fully simulating this process when it dispatches the error page. For best results, keep pages referenced from web.xml as straight JSP or HTML files. They can forward to JSF, if the situation permits it.
 
Andy Holm
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried using a JSP page for my error page but got the same blank page when the business logic threw an error and the login filter was turned on. Any other ideas to try? I am using Apache Tomcat 6 if that matters.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!