этот метод открывает страницу при нажатии на ссылку, в которой мне нужно значение атрибута сообщения, я не добавлял сервлет и jsp, как я могу его отобразить? мой HTML пуст
@GetMapping("/activate/{code}")
public String activate(ModelMap model, @PathVariable String code) {
boolean isActivated = userService.activateUser(code);
if (isActivated) {
model.addAttribute("message", "User Successfully activated");
System.out.println("Successfully");
} else System.out.println("Activation code not found");
model.addAttribute("message", "Activation code not found");
return "verificationPage";
}




попробуй использовать RedirectAttributes
@GetMapping("/activate/{code}")
public String activate(ModelMap model, @PathVariable String code, RedirectAttributes redirAttrs) {
redirAttrs.addFlashAttribute("message", "Here is your message");
}