I'm trying to create a tiny web server to route information between client applications for a Diffie-Hellman Key Exchange encryption system. Sadly, I have very little experience with Java networking. What would be the best way to set up a server to receive values from user A and pass it onto user B, and vice versa? I've looked into servlets with Tomcat/Google App Engine, but they appear to be mainly dealing with HTML webpages. I've tried using sockets, but I am not sure if I can host a ServerSocket application on the internet.
What is the best way to achieve this goal?