Time for action – examining request mapping

Let's observe what will happen when you change the value attribute of the @RequestMapping annotation by executing the following steps:

  1. Open your STS and run the webstore project; just right-click on your project and choose Run As | Run on Server. You will be able to view the same welcome message on the browser.
  2. Now, go to the address bar of the browser and enter the URL, http://localhost:8080/webstore/welcome.
  3. You will see the HTTP Status 404 error page on the browser, and you will also see the following warning in the console:
    WARNING: No mapping found for HTTP request with URI [/webstore/welcome] in DispatcherServlet with name ' DefaultServlet'
    

    An error log displaying the "No mapping found" warning message ...

Get Spring MVC Beginner’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.