title: Redirecting to another view in spring MVC controller
body: <p>I am trying redirect to another url from one url in spring controller but on its own it changes the url to other than I mentioned and gives 404 error</p>
  
  <p>My spring controller is as follows:</p>
  
  <pre><code> @Controller
  @SessionAttributes({ "dataObject", "userId" , "screen" , "scrUpdate" })
  public class ScreenDesignerController extends BaseController {
  /**
   * Injected screen designer service class.
   */
  @Autowired
  private ScreenDesignerService screendiService;
  
  @RequestMapping(value = "EditScreen", method = RequestMethod.POST)
  public String  editScreen(Model model , @RequestBody String tempdata , RedirectAttributes ra) throws Exception {
      ScreenUpdate scrUpdate;
      try {
          logger.info("in editscreen post method: ");
          scrUpdate = screendiService.formatScreen(tempdata);
          logger.info("screenID: " + scrUpdate.getScreenId());
          ra.addFlashAttribute("scrUpdate", scrUpdate);
      } catch (Exception e) {
          logger.error("in editscreen post method: " + e);
      }
  
      return "redirect:/UpdateScreen";
  
  
  }
  
  /**
   * Controller get method for Screen Update.
   * @param model Model.
   * @param scrUpdate to create layout for updating screen.
   * @return the template name
   * @throws Exception if anything goes wrong
   */
  
  @RequestMapping(value = "UpdateScreen", method = RequestMethod.GET)
  public final String updateScreen(Model model, @ModelAttribute("scrUpdate") ScreenUpdate scrUpdate) throws Exception {
      try {
          model.addAttribute("screen", scrUpdate);
          logger.info("Update Screen GET");
      } catch (Exception e) {
          logger.error("inside GET Catch UpdateScreen: " + e);
      }
      return "ScreenDesigner/UpdateScreen";
  }
  </code></pre>