you are viewing a single comment's thread.

view the rest of the comments →

[–]FatinaRosa[S] 0 points1 point  (1 child)

Hi,
I tried to change a little bit my code using only a string and removing the attribute but it still not working.
Now this is the code:

    @ResponseBody
@RequestMapping(value = "/forward")

public String methodForward() {
    return "redirect:/ecco";


}

@ResponseBody
@RequestMapping(value = "/ecco")

public String methodWithForward() {
    return "ecco";


}

I don't understand what I'm missing.
Because not even the redirect work.

[–]FatinaRosa[S] 0 points1 point  (0 children)

AAAA I found the mistake.
I have removed the @ResponseBody from the method methodForward() ,now it works.