• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

frank help!!

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 carry this gun in case a vending machine doesn't give me my fritos. This gun and this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic