Please tell me, Is Jetty non-blocking web server by default or not?
For example, this code below runs Jetty as non-blocking web server?
Server server = new Server(8080);
ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
context.setContextPath("/");
server.setHandler(context);
context.addServlet(new ServletHolder(new MyServlet()),"/*");
server.start();
server.join();
Thank you!!!
It depends on which version of Jetty you're using.
If you really care about the behaviour, you're better off configuring the connector yourself, rather than relying on that convenience constructor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With