my dog learned polymorphism
The moose likes Applets and the fly likes Applet-servlet communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet-servlet communication" Watch "Applet-servlet communication" New topic

Applet-servlet communication

Atul Mishra
Ranch Hand

Joined: Jun 08, 2006
Posts: 140
I have my applet running in localmachine and servlet on a remote machine[lets call it

When I try to communicate these two I get this exception: access denied ( connect,resolve)

My servlet runs in tomcat.

What can I do to solve this ? I tried starting tomcat with securitymanager enabled[by giving -security], that didnt help.
What else can I try ?

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
An applet can only connect to the host where it's served from, so if it is hosted on localhost, then it will not be able to connect to any other machine. The way around that is to either sign the applet, or fiddle with your local security policy. Both approaches are HowCanAnAppletReadFilesOnTheLocalFileSystem]described here[/url].
I agree. Here's the link:
subject: Applet-servlet communication
It's not a secret anymore!