diff --git a/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/rest/FancyURLFilter.java b/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/rest/FancyURLFilter.java
--- a/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/rest/FancyURLFilter.java
+++ b/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/rest/FancyURLFilter.java
@@ -38,8 +38,8 @@
 import org.nuxeo.runtime.api.Framework;
 
 /**
- * Filter used to decode URLs and wrap requests to enable encoding.
- * This filter is useful because Nuxeo support pluggable URL patterns
+ * Filter used to decode URLs and wrap requests to enable encoding. This filter
+ * is useful because Nuxeo support pluggable URL patterns
  *
  * @author tiry
  */
@@ -53,22 +53,22 @@
 
     public void init(FilterConfig conf) throws ServletException {
         log.debug("Nuxeo5 URLFilter started");
-        dummyNavigationHandler = new StaticNavigationHandler(conf.getServletContext());
+        dummyNavigationHandler = new StaticNavigationHandler(
+                conf.getServletContext());
         getUrlService(true);
     }
 
-
     protected URLPolicyService getUrlService() {
         return getUrlService(false);
     }
 
     protected URLPolicyService getUrlService(boolean silent) {
-        if (urlService==null) {
+        if (urlService == null) {
             try {
                 urlService = Framework.getService(URLPolicyService.class);
             } catch (Exception e) {
                 if (!silent) {
-                    log.error("Could not retrieve the URLPolicyService",e);
+                    log.error("Could not retrieve the URLPolicyService", e);
                 }
             }
         }
@@ -81,38 +81,37 @@
 
     public void doFilter(ServletRequest request, ServletResponse response,
             FilterChain chain) throws IOException, ServletException {
-
         HttpServletRequest httpRequest = (HttpServletRequest) request;
         HttpServletResponse httpResponse = (HttpServletResponse) response;
+        try {
 
-        getUrlService();
+            getUrlService();
 
-        // check if this is an URL that needs to be parsed
-        if (urlService.isCandidateForDecoding(httpRequest)) {
-            DocumentView docView = urlService.getDocumentViewFromRequest(httpRequest);
-            // if parse succeeded => process
-            if (docView != null) {
-                // put it in request
-                urlService.setDocumentViewInRequest(httpRequest, docView);
+            // check if this is an URL that needs to be parsed
+            if (urlService.isCandidateForDecoding(httpRequest)) {
+                DocumentView docView = urlService.getDocumentViewFromRequest(httpRequest);
+                // if parse succeeded => process
+                if (docView != null) {
+                    // put it in request
+                    urlService.setDocumentViewInRequest(httpRequest, docView);
 
-                // get the view id for navigation from the stored outcome
-                String jsfOutcome = docView.getViewId();
+                    // get the view id for navigation from the stored outcome
+                    String jsfOutcome = docView.getViewId();
 
-                // get target page according to navigation rules
-                String target = dummyNavigationHandler.getViewIdFromOutcome(jsfOutcome);
+                    // get target page according to navigation rules
+                    String target = dummyNavigationHandler.getViewIdFromOutcome(jsfOutcome);
 
-                // dispatch
-                RequestDispatcher dispatcher;
-                if (target != null) {
-                    dispatcher = httpRequest.getRequestDispatcher(target);
-                } else {
-                    // Use a dummy dispactcher if the target is not needed.
-                    // This comes handy for instance for nxfile url
-                    dispatcher = httpRequest.getRequestDispatcher("/malformed_url_error_page.faces");
-                }
-                try {
-                    // set force encoding in case forward triggers a redirect
-                    // (when a seam page is processed for instance).
+                    // dispatch
+                    RequestDispatcher dispatcher;
+                    if (target != null) {
+                        dispatcher = httpRequest.getRequestDispatcher(target);
+                    } else {
+                        // Use a dummy dispactcher if the target is not needed.
+                        // This comes handy for instance for nxfile url
+                        dispatcher = httpRequest.getRequestDispatcher("/malformed_url_error_page.faces");
+                    }
+                    // set force encoding in case forward triggers a
+                    // redirect (when a seam page is processed for instance).
                     request.setAttribute(
                             URLPolicyService.FORCE_URL_ENCODING_REQUEST_KEY,
                             true);
@@ -120,15 +119,18 @@
                     dispatcher.forward(new FancyURLRequestWrapper(httpRequest,
                             docView), wrapResponse(httpRequest, httpResponse));
                     return;
-                } catch (Exception e) {
-                    // do nothing
                 }
             }
+
+            // do not filter if it's candidate for encoding so soon : document
+            // view has not been set in the request yet => always wrap
+            chain.doFilter(request, wrapResponse(httpRequest, httpResponse));
+
+        } catch (Throwable t) {
+            // interrupt chain and throw exception
+            throw new ServletException(t);
         }
 
-        // do not filter if it's candidate for encoding so soon : document view
-        // has not been set in the request yet => always wrap
-        chain.doFilter(request, wrapResponse(httpRequest, httpResponse));
     }
 
     private ServletResponse wrapResponse(HttpServletRequest request,
diff --git a/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/rest/RestfulPhaseListener.java b/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/rest/RestfulPhaseListener.java
--- a/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/rest/RestfulPhaseListener.java
+++ b/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/rest/RestfulPhaseListener.java
@@ -19,9 +19,6 @@
 
 package org.nuxeo.ecm.platform.ui.web.rest;
 
-import static javax.faces.event.PhaseId.INVOKE_APPLICATION;
-import static javax.faces.event.PhaseId.RENDER_RESPONSE;
-
 import java.io.IOException;
 
 import javax.faces.context.ExternalContext;
@@ -33,8 +30,6 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.jboss.seam.contexts.FacesLifecycle;
-import org.jboss.seam.transaction.Transaction;
 import org.nuxeo.ecm.core.api.ClientRuntimeException;
 import org.nuxeo.ecm.platform.ui.web.rest.api.URLPolicyService;
 import org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionHandler;
@@ -62,7 +57,7 @@
     }
 
     public PhaseId getPhaseId() {
-        return RENDER_RESPONSE;
+        return PhaseId.RENDER_RESPONSE;
     }
 
     public void beforePhase(PhaseEvent event) {
@@ -83,34 +78,7 @@
                 service.applyRequestParameters(context);
             }
         } catch (Exception e) {
-            FacesLifecycle.setPhaseId(INVOKE_APPLICATION); // XXX Hack !
-            try {
-                if (Transaction.instance().isMarkedRollback()) {
-                    Transaction.instance().rollback();
-                }
-            } catch (Exception te) {
-                throw new IllegalStateException(
-                        "Could not rollback transaction", te);
-            }
-
-            try {
-                ExternalContext externalContext = context.getExternalContext();
-                ExceptionHandlingService exceptionHandlingService;
-                try {
-                    exceptionHandlingService = Framework.getService(ExceptionHandlingService.class);
-                } catch (Exception e1) {
-                    //hopeless
-                    throw new ClientRuntimeException(e1);
-                }
-                NuxeoExceptionHandler handler = exceptionHandlingService.getExceptionHandler();
-                handler.handleException(
-                        (HttpServletRequest) externalContext.getRequest(),
-                        (HttpServletResponse) externalContext.getResponse(), e);
-            } catch (ServletException e1) {
-                throw new ClientRuntimeException(e1);
-            } catch (IOException e1) {
-                throw new ClientRuntimeException(e1);
-            }
+            handleException(context, e);
         }
     }
 
@@ -118,4 +86,26 @@
         // nothing to do
     }
 
+    protected void handleException(FacesContext context, Exception e)
+            throws ClientRuntimeException {
+        try {
+            ExternalContext externalContext = context.getExternalContext();
+            ExceptionHandlingService exceptionHandlingService;
+            try {
+                exceptionHandlingService = Framework.getService(ExceptionHandlingService.class);
+            } catch (Exception e1) {
+                // hopeless
+                throw new ClientRuntimeException(e1);
+            }
+            NuxeoExceptionHandler handler = exceptionHandlingService.getExceptionHandler();
+            handler.handleException(
+                    (HttpServletRequest) externalContext.getRequest(),
+                    (HttpServletResponse) externalContext.getResponse(), e);
+        } catch (ServletException e1) {
+            throw new ClientRuntimeException(e1);
+        } catch (IOException e1) {
+            throw new ClientRuntimeException(e1);
+        }
+    }
+
 }
