On Wed, Oct 1, 2008 at 7:41 AM, Andrea Paternesi <[EMAIL PROTECTED]>wrote:
> Hi all, > > i am new here. > I have a problem trying to handling the viewHandlerException. > > As proprosed in this blog here > http://www.jroller.com/mert/entry/handling_errors_with_an_errror > i made a FacesServer wrapper to trying to catch for ServletException. > > Now the main part of the code is this one. > > *public void *service(ServletRequest request, ServletResponse response) > *throws > *ServletException, IOException { > * try *{ > delegate.service(request,response); > } > * catch*(Throwable e) { > redirectToErrorPage((HttpServletRequest) request, > (HttpServletResponse) response); > } > } > > The main problem here is that Myfaces code for the FacesServlet and in > particular the member > > handleLifecycleException(FacesContext facesContext, Exception e) throws > IOException, ServletException; > > handles the exception its own. > > > if(errorHandlerClass != null) { > .. > .. > .. > } > else { > _ErrorPageWriter.handleException(facesContext, e); > } > > it seems to me that the VievHandlerException is handled by the > _ErrorPageWriter and the exception is never thrown up. > So the wrapper is almost useless because the exception will never be > thrown. > > Do you have any ideas or something to cope with this problem? > The info here http://wiki.apache.org/myfaces/Handling_Server_Errors could help you. regards Leonardo Uribe > > Thanks for any help you can give to me. > > > Andrea. > > ------------------------------ > Foto, blog, amici. crea il tuo spazio online! C'รจ > Spaces!<http://home.services.spaces.live.com/> >

