I've done this before. I set up HTTP tunnelling for my last project. Use the O'Reilly book '
Java Servlet Programming' by Jason Hunter Chapter 10 - 'Applet-Servlet Communication' as a reference. It was a good reference with code examples of server and client.