This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

frank help!!

 
asheet anand
Ranch Hand
Posts: 83
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyoby!!
could you please send me a simple code where a applet
communicates with a servlet
we should have a textfield with a button in the applet
and on clicking the buuton that value in the
textfield should be retrieved in the servlet.
thanks!!
frank thank you foryour answer to my last reguarding
"service" method.but i request you to please in detail
i still have doubts in that.
my ? was posted on 11,jan.
asheet
 
Frank Carver
Sheriff
Posts: 6920
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What still confuses you about the "service()" method? Without a specific question I can't really explain in any more detail.
As for the applet example, I'll let someone else answer that.
 
Sean MacLean
author
Ranch Hand
Posts: 621
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think you'd actually have the applet communicate directly with the servlet (well, you could use a sevlet in the follwing but there is not reason to do so). To do this you'd have to use RMI and there are many security issues that hinder browser-based applets from using it. The most common appraoch is to write a small server application (and run it on the web server) which has a java.net.ServerSocket listening for applet connections. Then, once the applet loads, it can make a socket connection to the the server application. Here are the much used examples of a simple socket chat that should get you started. Note that the actual connection stuff is only a few lines in the applet and the server. Good luck!
http://homepages.unl.ac.uk/~wrightc/tyj/Comms.htm#ChatClient http://homepages.unl.ac.uk/~wrightc/tyj/Comms.htm#ChatServer
Sean
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic