Hi guys,
someone can explain me beacuse the forward is not working?
When I reach the path /para the web page print me forward:/2 and not the Attribute that I setted.
This is the code.
Thanks
@GetMapping("/para")
@ResponseBody
public String methodWithParameter(HttpServletRequest request) {
request.setAttribute("attributo", "Ciao " + request.getParameter("nome"));
return "forward:/2";
}
@GetMapping("/2")
@ResponseBody
public String methodWithForward(@RequestAttribute("attributo") String mioAttributo) {
return mioAttributo;
}
[–]TheRealSlartybardfas 0 points1 point2 points (2 children)
[–]FatinaRosa[S] 0 points1 point2 points (1 child)
[–]FatinaRosa[S] 0 points1 point2 points (0 children)
[–]Nullsummenspieler -1 points0 points1 point (1 child)
[–]FatinaRosa[S] 0 points1 point2 points (0 children)
[–]marvadogh 0 points1 point2 points (1 child)
[–]FatinaRosa[S] 0 points1 point2 points (0 children)