I'm toying with the idea of a project that would download an applet off of one server but that applet would connect to a different server to get data. I'm pretty sure the SecurityManager will not allow that applet to do that by default. But I'm thinking a signed applet can. I have worked with Java Web Start and know the procedures for creating signed jar files for that environment. Problem with Web Start is that it's an all or nothing SecurityManager. So, I've got a few questions: (1) is signing an applet done the same way as signing jars for Web Start? (2) For an applet, where do I put the security.properties file and tell the browser's JVM to use it?
Thanks Forum, Michael
Java EE Evangelist — Author, EJB 3 in Action 2nd Edition — Java Community Process Member
I may be out of date here, but applet signing isn't a pretty process. For one thing, the mechanisms for NetScape and IE weren't the same. Usually I just don't find it worth the trouble. For low-volume stuff, I'd just have the applet tunnel through the server it was loaded from and have that server contact the destination server. For higher-volume stuff, I'd consider simply having the applet downloaded from the server that it will be talking to. After all, though an unsigned applet is forbidden to talk to a server other than the one it came from, it's a fundamental attribute of HTML that different parts of a web page can (and frequently do) come from more than one server. A third approach if there's some compelling reason not to keep the applet code on the applet's server would be to have the applet's server proxy for the server that actually contains the applet code.
Customer surveys are for companies who didn't pay proper attention to begin with.
subject: An Applet to contact a different server than it was downloaded from?