title: Forwarding from servlet to JSP cause HTTP 404
body: <p>I have seem some question similar like mine(like <a href="https://stackoverflow.com/questions/17001185/pass-hidden-parameters-using-response-sendredirect">this one</a>), but none of them solved my question. So I'll post one.</p>
  
  <p>My JSP website structure is like this:</p>
  
  <p>/subpage/funcA.jsp
  /main.jsp</p>
  
  <p>My main page contains all necessary js and css definitions, subpages don't have those defines. So If I'm going to display my funcA page properly, its URL will need to be written like this</p>
  
  <ul>
  <li><a href="http://localhost/myProj/main.jsp#subpage/funcA.jsp" rel="nofollow noreferrer">http://localhost/myProj/main.jsp#subpage/funcA.jsp</a></li>
  </ul>
  
  <p>Here's the problem: I'm trying to use <code>forward()</code> to send some attributes to <code>funcA.jsp</code>, so I can pre-fill those attributes into form texts in funcA.jsp. But I can't get it working! All I got is 404s.</p>
  
  <p>Here's my forward code:</p>
  
  <pre><code>RequestDispatcher dispatcher = getServletContext()
                          .getRequestDispatcher("/main.jsp#subpage/funcA.jsp");
  dispatcher.forward(req, res);
  </code></pre>
  
  <p>Can anyone tell me what did I miss? thanks.</p>