• Post Reply Bookmark Topic Watch Topic
  • New Topic

client socket to servlet  RSS feed

 
Paramagurusamy Balasubramanian
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I've created a client socket..I've also created a server socket in servlet.I need to communicate that with a servlet..How can i achieve that?.How to give the host name inside the constructor of client socket?.is it "http://127.0.0.1:8080/servlet/servletfile".
If i give like this it throws unknownhostexception.how can i achieve my task?.
Early suggestions appreciated..
Best Regards,
Paramaguru
 
parul patidar
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

if u want that whenever u write something on outputstram at client ur servlet get called automatically u can use URLConnection class
parul patidar
Originally posted by Parama guru:
Hi everyone,
I've created a client socket..I've also created a server socket in servlet.I need to communicate that with a servlet..How can i achieve that?.How to give the host name inside the constructor of client socket?.is it "http://127.0.0.1:8080/servlet/servletfile".
If i give like this it throws unknownhostexception.how can i achieve my task?.
Early suggestions appreciated..
Best Regards,
Paramaguru

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!