简体   繁体   中英

Java Applet Network Connection

At the moment when my applet runs in a web browser it is blocked from making any outside network connections. Is it possible to change any settings to allow it make connections?

It works fine when run from the desktop, but when in a browser it restricts it.

Thanks

~ Kyle G

Applets can connect back to the server they were downloaded from ("same origin policy"). From 6u10 they can also access sites with appropriate crossdomain.xml file (google it).

Randomly allowing access to any site obviously isn't going to be good for security. You can sign your code and have the PlugIn allow users to remove security. However, that requires you know about security to do it safely (which most people don't) . For a "nice" security dialog you need a certificate signed by a trusted certificate authority.

Another option is to have your web server machine forward on connections. However, that again is tricky to do securely.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM