title: redirect doesn't work in the Spring controller
body: <p>Hhere is a registration field, after registration it should go to the menu page, but it goes to main</p>
  <pre><code>@Controller
  @RequestMapping(&quot;/main&quot;)
  public class SignInPageController {
  
      private UserDao userDao;
  @Autowired
      public SignInPageController(UserDao userDao){this.userDao = userDao;}
  
  @GetMapping(&quot;/menu&quot;)
      public String mainMenuPage(){
          return &quot;main/menu&quot;;
      }
  @GetMapping(&quot;/signup&quot;)
      public String signUpPage(Model model){
          model.addAttribute(&quot;newuser&quot;, new User());
          return &quot;main/signup&quot;;
      }
  @PostMapping(&quot;/signup&quot;)
      public String signUp(@RequestParam(&quot;name&quot;) String name,
                               @RequestParam(&quot;password&quot;) String password,
                               @RequestParam(&quot;email&quot;) String email,
                               @RequestParam(&quot;nativeLanguage&quot;) String nativeLanguage){
          User user = new User(name, password, email, nativeLanguage);
          userDao.signUpUser(user);
          return &quot;redirect:/main/menu&quot;;
      }
  </code></pre>
  <p>can you tell me what the problem is?</p>