title: How to add custom header variable to the request and redirect the user
body: <p>I am trying to build a Java EE application that extracts a certain session cookie, adds it to the request as an HTTP header then forwards the user to a 3rd party URL with this header variable in the request.</p>
  
  <p>I am using <a href="http://vangjee.wordpress.com/2009/02/25/how-to-modify-request-headers-in-a-j2ee-web-application/" rel="nofollow noreferrer">this example</a> as a reference.</p>
  
  <p>I have implemented <code>FakeHeadersRequest</code> and <code>SimpleFilter</code> however not sure how to redirect the request to a different URL with this new header variable. Should I just create a Servlet that forwards the request? Perhaps use Apache http client?</p>
  
  <p>Can someone please help me complete this puzzle?</p>