I am using Undertow to create a simple application.
public class App {
public static void main(String[] args) {
Undertow server = Undertow.builder().
Undertow uses NIO, which means that a single thread handles all the requests. If you want to do blocking operations in your request handler, you have to dispatch this operation to a worker thread.
In your example, you put the thread to sleep, which means tha any request handling is put to sleep, since this thread handles all requests.
However even if you dispatched the operation to worker thread and put that to sleep, you still would see the blocking issue you mention. This is because you open the same url in several tabs on the same browser. The browsers have an internal blocking of their own. If you open the same url in different tabs, the second url will start the request after the first has finished. Try any url you want to see for yourself. You can easily be confused with this browser behaviour.