title: Return Response (HttpServletResponse) to HttpServletRequest
body: <p>I always end up with a <code>ClassCastException</code> when trying to cast <code>javax.ws.rs.core.Response</code>into a<code>javax.servlet.http.HttpServletResponse</code></p>
  
  <p>My Servlet looks like this:</p>
  
  <pre><code>@GET
  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          Response myResponse = processRequest(request);
          //myResponse -&gt; response
  }
  </code></pre>
  
  <p>The servlet is hosted on a a jetty:</p>
  
  <pre><code>context = new ServletContextHandler(ServletContextHandler.SESSIONS);
  context.addServlet(new ServletHolder(servlet),"/*");
  </code></pre>
  
  <p>I want to return the content of myResponse (basically some json body if it matters) if this is possible.</p>
  
  <p>Can someone help?</p>