title: Jetty: Servlet can't forward to JSP
body: <p>I have the following problem: I'm trying to forward the request from the servlet to the jsp page, but I get an 404. When I´m accessing /sites/home.jsp directly, it loads the jsp.</p>
  
  <pre><code>    WebAppContext sites = new WebAppContext("src/com/example/blub/server/sites", "/sites");
      ServletContextHandler weblet = new ServletContextHandler(ServletContextHandler.SESSIONS);
      weblet.setContextPath("/");
      weblet.addServlet(new ServletHolder(new Weblet()), "/home");
      HandlerList handlers = new HandlerList();
      handlers.setHandlers(new Handler[] {sites, weblet});
      server.setHandler(handlers);
  </code></pre>
  
  <p>.</p>
  
  <pre><code>public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
      req.getRequestDispatcher("/sites/home.jsp").forward(req, resp);
  }
  </code></pre>