-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Spring MVC Beginner's Guide
By :

Let's observe what will happen when you change the value
attribute of the @RequestMapping
annotation by executing the following steps:
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.
Now, go to the address bar of the browser and enter the URL, http://localhost:8080/webstore/welcome
.
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
Now, open the HomeController
class, change the @RequestMapping
annotation's value
attribute to /welcome
, and save it. Basically, your new request mapping annotation will look like @RequestMapping("/welcome")
.
Again, run the application and enter...
Change the font size
Change margin width
Change background colour