Spring: Developing Java Applications for the Enterprise
by Ravi Kant Soni, Amuthan Ganeshan, Rajesh RV
The Dispatcher servlet
We put values into the model, and we created the view that can read those values from the model. So, the Controller acts as an intermediate between the View and the Model; with this, we have finished all the coding part required to present the welcome page. So will we be able to run our project now? No. At this stage, if we run our project and enter the URL http://localhost:8080/webstore/ on the browser, we will get an HTTP Status 404 error. This is because we have not performed any servlet mapping yet.
Tip
So what is servlet mapping? Servlet mapping is a configuration of mapping a servlet to a URL or URL pattern. For example, if we map a pattern like /status/* to a servlet, all the HTTP request URLs starting with a text ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access