This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Servlets and the fly likes servlet applet communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet applet communication" Watch "servlet applet communication" New topic

servlet applet communication

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
what are the ways by which applet and servlet can communicate?
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
u can communicate with a servlet from an applet by,
1.calling the servlet URL using showDocument method of applet context.(pass servlet URL as param)
2.Another way is to open a connection to servlet using URLConnection reference.
URL url=new URL("servlet url here");
URLConnection uc=url.openConnection();
i think this will work.
u have to prepare the query string yourself if u want to send some values in applet to servlet .
try them.
I agree. Here's the link:
subject: servlet applet communication
It's not a secret anymore!