How do Jetty and other containers leverage NIO while sticking to the Servlet specification?
问题 I'm new to NIO, and I am trying to figure out how Jetty leverages NIO. My understanding of how traditional servlet containers that use Blocking IO service a request is as follows: A request arrives A thread is allocated to process the request and the servlet method ( doGet etc) is invoked Servlet method is handed an InputStream and OutputStream The servlet method reads from the InputStream and writes to the OutputStream The InputStream and OutputStream are basically tied to the respective