June 2014
Beginner to intermediate
304 pages
7h 25m
English
Though both redirection and forwarding are used to present a different web page than the one requested, there is a little difference between them. Let's try to understand these by examining them:
HomeController class and add one more request mapping method as follows:@RequestMapping("/welcome/greeting")
public String greeting() {
return "welcome";
}return statement of the existing welcome request mapping method, and save it as follows:return "forward:/welcome/greeting";
http://localhost:8080/webstore/. You will be able to see a welcome message on the web page.Read now
Unlock full access