title: Redirect to another controller after ajax call
body: <p>I want to redirect to another controller after a successful ajax call also i want to send some data that I get in the response</p>
  
  <p>User Controller</p>
  
  <pre><code>@RequestMapping(method = RequestMethod.POST, value = "/user/preferences")
  public @ResponseBody Map&lt;String, List&lt;String&gt;&gt; userPreferences(HttpServletRequest request) {
      Map&lt;String , List&lt;String&gt;&gt; finalPlaces = new LinkedHashMap&lt;String, List&lt;String&gt;&gt;();
      finalPlaces.put(entry.getKey(), new ArrayList&lt;String&gt;(topPlaces));
      return finalPlaces; 
  }
  </code></pre>
  
  <p>Ajax Call</p>
  
  <pre><code>$(".savebutton").click(function(){
       $.ajax({       
          url: "&lt;c:url value='/user/preferences' /&gt;",
          type: 'POST',            
          data:{  
          preferences : preferences
          },
          success: function(response) 
          {
          }, 
          error: function(xhr, ajaxOptions, thrownError) {
            alert('Error');
           }
     });
  });
  </code></pre>
  
  <p>when the above ajax call returns successfully I want to call a method of another controller</p>
  
  <p>Places Controller</p>
  
  <pre><code>@RequestMapping(method = RequestMethod.GET, value = "/places")
  public ModelAndView showRecommnededPlaces(Map&lt;String, List&lt;String&gt;&gt; recommndedPlaces) {
      System.out.print(recommndedPlaces);     
      ModelAndView model = new ModelAndView("places");
      return model; 
  }
  </code></pre>
  
  <p>is it possible to directly call the places controller action from the user controller? </p>
  
  <p>Thanks</p>