Possible Duplicate:
Java and crossdomain.xml
I need an unsigned (I don't want prompt for visitors asking to run the applet) Java applet that scrape source code from another domain. I have made an applet using prowser library, when I execute it on eclipse (as applet) or as runnable jar it works but it don't work when I execute the applet on my website. It returns me "null".
My applet code :
import java.applet.Applet;
public class HelloWorldApplet extends Applet {
public void init() {
Prowser prowser开发者_如何学C = new Prowser();
Tab tab = prowser.createTab();
System.out.println(tab.go("http://www.canyouseeme.org").getPageSource());
}
}
Previously I have had an issue with the import of the library: Export Applet Java with referenced libraries
Thanks in advance for your help.
Put the code that scrapes the other site on your server (i.e., in a servlet), then have the applet talk to the servlet via HTTP (REST, web services, whatever.)
精彩评论