Hello there, I'm looking to dive into using thymeleaf for my web application. My goal is to create a simple website with HTML pages. Below is the URL of my landing page controller that returns the index.html page:
@RequestMapping("/index")
public String index() {
return "index";
}
On my index.html page, I have a button that when clicked triggers the following controller call, which should return a different onclick.html page:
@RequestMapping("/web/onclick/{onclickvar}")
public String onclick(Model model, @PathVariable("onclickvar") String onclickvar) {
//do something with onclickvar
return "onclick";
}
If anyone could provide some sample code, I would greatly appreciate it.