Can servlet respond to non-http requests?

see a lot of descriptions that servlet can handle almost all types of requests, but mostly only http. So you want to know what other requests servlet can handle? It is best to enumerate related classes.

Mar.07,2021

I guess it should be like this. The underlying layer of servlet itself encapsulates the protocol parsing of http. You can take a look at the source code of J2EE. There should be a special package about http.


servlet is an interface that defines the template method for processing requests, which needs to be populated when we implement it, such as the service method.
servlet can theoretically handle any type of request, but the only servlet protocol supported by java ee7 is http

.
Menu