title: How to use Redirect in ModelAndView
body: <p>I Want to redirect my url to <a href="http://localhost:8080/ClickBuy/product/details" rel="noreferrer">http://localhost:8080/ClickBuy/product/details</a> to          <a href="http://localhost:8080/ClickBuy/home" rel="noreferrer">http://localhost:8080/ClickBuy/home</a> .</p>
  
  <p>I have Define header.jsp and Include it in all my Pages.When I click home link from anywhere else url add /home from current url.So it shows 404 error.</p>
  
  <h2>Controller</h2>
  
  <pre><code>public ModelAndView allProduct()
  {   
  ModelAndView model=new ModelAndView("pl");
  model.addObject("data", pd.getAllProducts());
  return model;
  }
  </code></pre>
  
  <p>How can I use redirect:/ in ModelAndView return type method???</p>