java networking via browser
I have two java programs that can talk to each other as server-client when run on the same computer. I need to convert these into a system like this:
a. Client connects to a server e.g. abc.com via a web browser.
b. client sends data to server via the browser itself.
c. The server responds back with the manipulated data.
I am new to networking in java and hence I would appreciate a lot if anyone can suggest some method to implement this scenario using java networking. I have tried this using php socket methods earlier but don't know how to get the "browser" into the play with java.
The server side can have anything. The constraint is that the client should connect to server by a browser only.