title: how to go to another page with data
body: <p>I want to go with an object to another page and show it there</p>
  
  <p>ViewControllers</p>
  
  <pre><code>    @Override
  public void addViewControllers(ViewControllerRegistry registry) {
          registry.addViewController("/songs")
                  .setViewName("/song.html");
          registry.addViewController("/")
                  .setViewName("/index.html");
  }
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>@RestController
  @RequestMapping("/songs")
  public class SongController {
  @RequestMapping("/getSong")
  public Track getSong(String id){
      System.out.println("Song id " + id);
      Optional&lt;Track&gt; byId = trackService.findById(Integer.parseInt(id));
      if(!byId.isPresent()) throw new NullPointerException();
      return byId.get();
  }
  </code></pre>
  
  <p>and JQuery</p>
  
  <pre><code>  $.ajax({
              type: "POST",
              url: "/songs/getSong",
              data: {
                  id: songId
              }
          });
  </code></pre>
  
  <p>it calls method but i dont go to another page)
  what should i do to reach another page with this object or with id
  without using jsp or thymeleaf?</p>