This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes Exception Handling - using an error page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Exception Handling - using an error page" Watch "Exception Handling - using an error page" New topic
Author

Exception Handling - using an error page

Kurt Boets
Greenhorn

Joined: Oct 19, 2004
Posts: 14
Hello,

I am trying to assure correct exception handling; depending on the exception, the user is forwared to an error page.
I did develop a Filter class, an ErrorAwareRequestWrapper class that wraps the http error codes.
When I do a deploy (on a BEA Weblogic 8.1) I receive an error.
Hereby I will show you my :
  • The Filter class.
  • The ErrorAwareRequestWrapper class
  • The web.xml file
  • The stack trace of the exception thrown by the server










  • Has anyone yet expercience with handling exceptions using error pages or
    filters ?
    All help is welcome.
    Thx,
    Varun Khanna
    Ranch Hand

    Joined: May 30, 2002
    Posts: 1400
    Try to make your ErrorHandlerFilter class "public"


    - Varun
    Kurt Boets
    Greenhorn

    Joined: Oct 19, 2004
    Posts: 14
    Indeed, it works now.
    Thx,
    Dinesh Gupta
    Greenhorn

    Joined: Mar 16, 2009
    Posts: 1
    Hi,

    This a very useful post. I want to implement same type of filter.
    I am using JSF and Struts tiles component.
    The problem is that sendError method of the ErrorAwareRequestWrapper is not called.

    If anyone have idea, Please reply.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Exception Handling - using an error page
     
    Similar Threads
    Exception handling in Faces Filter
    Tomcat servlet-mapping bypass if real file requested
    problem with jSF and Filter
    redirect to port 443
    request does not pass to action