Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet and Socket

 
Niral Trivedi
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have one java server running on a machine. And I have servlet running on another machine. I want to talk to the java server from the servlet using socket.
Any special thing I have to be aware of? Any good site/tutorial/info available onilne?
Thanks in advance
 
Dani Mazzuca
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
no, no problems, just do it like any other Socket connection. The servlet can open a Socket() connection with your other Java-Server. The last one should create a ServlerSocket() object and accept() requests from your servlet.

Dani
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic