I have a doubt whether the servlets internally uses servlets or not?
In a Spring Boot application, the servlet is registered either as a Spring @Bean or by scanning the @WebServlet annotated classes with an embedded container. With the Spring @Bean approach, we can use the ServletRegistrationBean class to register the servlet.
The Spring Boot starters ( spring-boot-starter-web in particular) use Tomcat as an embedded container by default.
Spring MVC is one of many frameworks built on top of servlets to try make the task of writing a web application a bit easier. Basically all requests are mapped to the DispatcherServlet which acts as a front controller. The DispatcherServlet will then call the controller whose annotations match the incoming request.
Yes it is. Spring-MVC uses DispatcherServlet
under the hood.
Central dispatcher for HTTP request handlers/controllers, e.g. for web UI controllers or HTTP-based remote service exporters. Dispatches to registered handlers for processing a web request, providing convenient mapping and exception handling facilities.
This servlet is very flexible: It can be used with just about any workflow, with the installation of the appropriate adapter classes...
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