Am trying to understand the control flow between web.xml and applicationcontext.xml of a web application. Can someone please explain which loads first?
Spring MVC is a framework built on top of the Servlet API. As such, it requires a Servlet container.
Your Servlet container finds the web.xml
or uses any other deployment strategy (depends on container), finds the Servlet
implementations to instantiate (or through @WebServlet
) and instantiates them.
One of these Servlet
implementations is Spring's DispatcherServlet
which, as part of its initialization, generates an ApplicationContext
which it then uses to configure its controllers and dispatch requests.
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