I was wondering if it would be possible for a Java Web Applet to grab its own URL?
You can use Applet#getCodeBase