Qortora · Search · Indexed page

undertow.ioFetched 2026-08-15T03:21:57Z

Undertow · Undertow

Undertow · Undertow Undertow Red Hat Home Blog Download Documentation Get Involved Undertow Undertow is a flexible performant web server written in java, providing both blocking and non-blocking APIs based on NIO. Undertow has a composition-based architecture that allows you to …

Open original source · Full cached text

Undertow · Undertow Undertow Red Hat Home Blog Download Documentation Get Involved Undertow Undertow is a flexible performant web server written in java, providing both blocking and non-blocking APIs based on NIO. Undertow has a composition-based architecture that allows you to build a web server by combining small single purpose handlers. This design gives you the flexibility to choose between a full Java EE servlet 4.0 container, or a low-level non-blocking handler, to anything in between. Undertow is designed to be fully embeddable, with easy-to-use fluent builder APIs. Undertows lifecycle is completely controlled by the embedding application. Undertow is sponsored by JBoss and is the default web server in the WildFly Application Server. Why Undertow HTTP/2 Support Undertow supports HTTP/2 out of the box, no overriding the boot class path required. HTTP Upgrade Support Support for HTTP upgrade, to allow multiple protocols to be multiplexed over the HTTP port. Web Socket Support Undertow provides full support for Web Sockets, including JSR-356 support. Servlet 4.0 Undertow provides support for Servlet 4.0, including support for embedded servlet. It is also possible to mix both Servlets and native undertow non-blocking handlers in the same deployment. Embeddable Undertow can be embedded in an application or run standalone with just a few lines of code. Flexible An Undertow server is configured by chaining handlers together. It is possible to add as much or as little functionality as you need, so you dont pay for what you are not using. Show me the code Ok then. Here is a simple Hello World server using Async IO: public class HelloWorldServer { public static void main(final String[] args) { Undertow server = Undertow.builder() .addHttpListener(8080, "localhost") .setHandler(new HttpHandler() { @Override public void handleRequest(final HttpServerExchange exchange) throws Exception { exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/plain"); exchange.getResponseSender().send("Hello World"); } }).build(); server.start(); } } Copyright © Undertow. All rights reserved. For details on our trademarks, please visit our Trademark Policy and Trademark List. Trademarks of third parties are owned by their respective holders and their mention here does not suggest any endorsement or association.