title: get jsp response as a string inside servlet
body: <p>Is there a way to get response from a jsp file as a String inside servlet. Something like</p>
  
  <pre><code>protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
       String section1 = getResponseFromJSP();
       // do something else ...
       sendMailToUser(section1);
  }
  </code></pre>
  
  <p>I'm using Servlet API 2.4 and java 1.4</p>