public ServletInitialHandler(final ServletPathMatches paths, final HttpHandler next, final Deployment deployment, final ServletContextImpl servletContext) { this.next = next; this.servletContext = servletContext; this.paths = paths; this.listeners = servletContext.getDeployment().getApplicationListeners(); SecurityManager sm = System.getSecurityManager(); if(sm != null) { //handle request can use doPrivilidged //we need to make sure this is not abused sm.checkPermission(PERMISSION); } ExceptionHandler handler = servletContext.getDeployment().getDeploymentInfo().getExceptionHandler(); if(handler != null) { this.exceptionHandler = handler; } else { this.exceptionHandler = LoggingExceptionHandler.DEFAULT; } this.firstRequestHandler = deployment.createThreadSetupAction(new ThreadSetupHandler.Action<Object, ServletRequestContext>() { @Override public Object call(HttpServerExchange exchange, ServletRequestContext context) throws Exception { handleFirstRequest(exchange, context); return null; } }); }
if ( from.getExceptionHandler() != null ) logger.debug( "Found exception handler: {}", from.getExceptionHandler() ); into.setExceptionHandler( from.getExceptionHandler() );
info.setEagerFilterInit(src.isEagerFilterInit()); info.setDisableCachingForSecuredPages(src.isDisableCachingForSecuredPages()); info.setExceptionHandler(src.getExceptionHandler()); info.setEscapeErrorMessage(src.isEscapeErrorMessage()); for (SessionListener e : src.getSessionListeners()) {
info.setEagerFilterInit(src.isEagerFilterInit()); info.setDisableCachingForSecuredPages(src.isDisableCachingForSecuredPages()); info.setExceptionHandler(src.getExceptionHandler()); info.setEscapeErrorMessage(src.isEscapeErrorMessage()); for (SessionListener e : src.getSessionListeners()) {
UndertowLogger.REQUEST_IO_LOGGER.ioException((IOException) error); } else { ExceptionHandler exceptionHandler = servletRequestContext.getDeployment().getDeploymentInfo().getExceptionHandler(); if(exceptionHandler == null) { exceptionHandler = LoggingExceptionHandler.DEFAULT;