This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Servlets and the fly likes can we get rid of socket? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "can we get rid of socket?" Watch "can we get rid of socket?" New topic

can we get rid of socket?

Simon Xu
Ranch Hand

Joined: Aug 16, 2000
Posts: 235
I am an applet-servlet application using raw socket comm. Can I swith all to HTTP or URL communication? as socket has some serious problems.
Ashwin Desai
Ranch Hand

Joined: Jul 17, 2000
Posts: 124
Yes you can use HTTP communication. Just wrap your interaction objects into HTTP Get/Post requests and send them across to the server. You may refer Java Servlet Programming by Orielly for more information.
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
Hi Simon,
Yes, you can get rid of the socket.You will have to use HTTP Tunnelling, which means you are opening URLConnection, and passing the data using the HTTP Protocol.This is frequently used when you want your Applet client to communicate with the servlet or any other server-side components via servlets.
Hope this helps.

Sandeep Desai

  1. Sun Certified Java Programmer Scored 93 per cent
  2. Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
  3. IBM Enterprise Connectivity with J2EE Scored 72 per cent
  4. Enterprise Development on the Oracle Internet Platform Scored 44 out of 56
Simon Xu
Ranch Hand

Joined: Aug 16, 2000
Posts: 235
Thanks for your reply.
Regarding to the applet-servlet commu, which is generally better? in which respects?
I agree. Here's the link:
subject: can we get rid of socket?
It's not a secret anymore!