|

|
Tip #9: Protecting Your Applets from Theft Sometimes you may post an applet that you don't want anyone else to copy and post on their own web site. A piece of code similar to the following will prevent an applet from functioning when not coming from a specified URL. This should of course be combined with obfuscation/encryption in order to be truly effective.
public void init()
{
String host = getDocumentBase().getHost();
if (!(host.equals("www.webrewery.com")) &&
!(host.equals("webrewery.com")))
return;
// normal code goes here
}
|
| First aide kits emergency first aid first aide kits emergency supplies store www.ifirstaidkits.com |