File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes frank help!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "frank help!!" Watch "frank help!!" New topic

frank help!!

asheet anand
Ranch Hand

Joined: Nov 15, 2000
Posts: 83
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.
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.
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
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.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Sean MacLean
Ranch Hand

Joined: Nov 07, 2000
Posts: 621
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 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!
I agree. Here's the link:
subject: frank help!!
It's not a secret anymore!