permaculture playing cards
The moose likes Servlets and the fly likes Servlet and Socket Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet and Socket" Watch "Servlet and Socket" New topic

Servlet and Socket

Niral Trivedi
Ranch Hand

Joined: Nov 26, 2001
Posts: 46
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

Joined: May 21, 2003
Posts: 70
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.

I agree. Here's the link:
subject: Servlet and Socket
It's not a secret anymore!