This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "can we get rid of socket?" Watch "can we get rid of socket?" New topic
Author

can we get rid of socket?

Simon Xu
Ranch Hand

Joined: Aug 16, 2000
Posts: 235
hi,
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.
Thanks
Ashwin Desai
Ranch Hand

Joined: Jul 17, 2000
Posts: 124
Hi,
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.
Ashwin.
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.
Regards,

------------------
Sandeep Desai
vgdesai@bom3.vsnl.net.in

  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


<b>Sandeep</b> <br /> <br /><b>Sun Certified Programmer for Java 2 Platform</b><br /> <br /><b>Oracle Certified Solution Developer - JDeveloper</b><br /><b>-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java </b><br /><b>-- Object-Oriented Analysis and Design with UML</b><br /> <br /><b>Oracle Certified Enterprise Developer - Oracle Internet Platform</b><br /><b>-- Enterprise Connectivity with J2EE </b><br /><b>-- Enterprise Development on the Oracle Internet Platform </b>
Simon Xu
Ranch Hand

Joined: Aug 16, 2000
Posts: 235
hi,
Thanks for your reply.
Regarding to the applet-servlet commu, which is generally better? in which respects?
Thanks
 
Don't get me started about those stupid light bulbs.
 
subject: can we get rid of socket?
 
Similar Threads
Java Network Question, pls help
Using an Applet as a forum/instant messanger
File Reader(Urgent)
socket's http connection
Socket connection problem