title: Can a post request object be forwarded in another post request?
body: <p>I have the following situation. I get a request to my server. This is being handled by a java servlet. the java servlet calls a jsp file to create a html page. The servlet passes a request object to the jsp. 
  From the html page people can click on buttons which do post requests to other pages.</p>
  
  <p>I would like to be able to pass the original request object (with additional info) along to the next page.</p>
  
  <p>1) Is this possible? (maybe create a javascript object from the request object?)</p>
  
  <p>2) Am I going about this all wrong and should I be creating user sessions or something? I have no experience with this.</p>
  
  <p>Thanks</p>
  
  <p>EDIT:</p>
  
  <p>I think an example might clear somethings up.</p>
  
  <p>1) from an external site a post request is done to servlet A. In this servlet I do the following:</p>
  
  <pre><code>protected void doPost(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {  
  
  String jsp = "WEB-INF/webpage.jsp";
  RequestDispatcher rd = request.getRequestDispatcher(jsp);
  rd.forward(request,response);
  }
  </code></pre>
  
  <p>Then in the jsp I do this:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;/head&gt;
  &lt;body&gt; 
      &lt;form method="post" action="http://myurl.com/servletB" target="_self"&gt;
              &lt;% String first_name = request.getParameter("first_name");%&gt; 
              Hello &lt;%= first_name %&gt;
              What is your lastname: &lt;input type="text" name="last_name"&gt;
              &lt;input type="submit" value="submit"&gt;
          &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But in the original request was more information then only the first_name. And in servlet B I need all the information from the original request + the last_name.</p>