This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Servlets and the fly likes Applet and Servlet communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Applet and Servlet communication" Watch "Applet and Servlet communication" New topic
Author

Applet and Servlet communication

Laurent Sate
Greenhorn

Joined: Dec 18, 2001
Posts: 10
Hello,
I have a applet which communicates with a servlet.
When my applet attacks my servlet and when my servlet is installed on the same machine (211.1.1.180), the communication is done without problem. But, when the servlet is installed on a another machine (211.1.1.135) I've a java.security.AccessControlException. I work with jdk 1.3.1 and i've tested with jdk 1.1.8 and all works!! I suppose that my problem is with jdk 1.3.1.
below sources:
Applet

Servlet

The exception

I've tried also with a simple application in the place of a applet and that works!!
How can i resolve that?
Thanks for your help
[ February 01, 2002: Message edited by: Laurent Sate ]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 13018
    
    5
The exception you are getting is exactly what one would expect. Normal Applet security policy enforced by the browser prevents accessing data from another server. I think you would have to use a signed applet.
Bill
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17161
    
  27

Correct. In fact, unsigned applets are forbidden to open ANY sort of network connection to any place other than the server that they were loaded from.


An IDE is no substitute for an Intelligent Developer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet and Servlet communication
 
It's not a secret anymore!