title: How can I pass a ModelAndView as parameter to a ModelAndView or a workaround?
body: <pre><code>ModelAndView content= new ModelAndView("myPage", "message", message);
  
  return new ModelAndView("template", "content", content);
  </code></pre>
  
  <p>I am trying to create the page content and pass it as parameter to the template.jsp</p>
  
  <p>myPage.jsp has its own logic and needs to do its own calculations. So it needs to be rendered before being passed.</p>
  
  <p>Is there a workaround to this or a better design choice of implement a template style structure?</p>