Skip to content
Snippets Groups Projects
Commit 47568088 authored by Rhys Evans's avatar Rhys Evans
Browse files

Successfully updated current webpages to incorporate controller GetMapping for URL address usage

parent 92286e61
No related branches found
No related tags found
1 merge request!2Merger to resolve "As a user, I want the webpage to be easily operable so that I can navigate through the content effortlessly and accomplish my tasks efficiently."
......@@ -3,27 +3,26 @@ package Team5.SmartTowns.Webpages;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;
import org.springframework.stereotype.Controller;
@Controller
public class WebpageController {
@GetMapping()
public ModelAndView getXWebPage("/html page here"){
ModelAndView modelAndView = new ModelAndView("Desired ViewName");
@GetMapping("/Caerleon")
public ModelAndView getCaerleonPage(){
ModelAndView modelAndView = new ModelAndView("towns/caerleon");
return modelAndView;
}
@GetMapping()
public ModelAndView getYWebPage("/html page here"){
ModelAndView modelAndView = new ModelAndView("Desired ViewName");
@GetMapping("/Caerphilly")
public ModelAndView getCaerphillyPage(){
ModelAndView modelAndView = new ModelAndView("towns/caerphilly");
return modelAndView;
}
@GetMapping()
public ModelAndView getZWebPage("/html page here"){
ModelAndView modelAndView = new ModelAndView("Desired ViewName");
@GetMapping("/Risca")
public ModelAndView getRiscaPage(){
ModelAndView modelAndView = new ModelAndView("towns/risca");
return modelAndView;
}
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>asdasd</title>
</head>
<body>
sadasdasdasd
</body>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment