A very simple embedded Java web server with Undertow. Head over to http://undertow.io/ to learn more about Undertow. This example is the same as shown on the homepage just written slightly differently. Undertow is the web server of choice for StubbornJava. It has a very clean and easy to follow API and has a fairly low learning curve. Every request and or filter is a HttpHandler. HttpHandlers can do filtering, routing, validation, exception handling and much more all with the same simple interface. Since the web server is embedded we can easily run this example insaide of any IDE or as a standalone executable Jar. No application containers in sight. Whew!
Java Hello World Web Server
A simple and lightweight Java HTTP server.
Output
Notice how all urls respond the same. Interested in Routing with Undertow?