Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

An Applet to contact a different server than it was downloaded from?  RSS feed

Michael Remijan
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 file and
tell the browser's JVM to use it?

Thanks Forum,
Tim Holloway
Posts: 18705
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!