I need to implement a HTTP proxy server application which will proxy requests from multiple clients to a remote server.

Here are the steps:

1. Client forward request to proxy
2. Proxy forward request to server
3. Server returns request to Proxy
4. Proxy returns request to Client.

I'm just not sure how I should implement this proxy. My first thought was to implement a tomcat application which uses jersey / apache httpclient to forward the request to the remote server and return the response back to the client ?

Is there a better way to implement such a proxy server ?

The proxy would need to handle multiple threads.