This method of the StandardSecurityManager Class retrieves the codebase URL associated with the nearest SecurityClassLoader instance found on the call stack. The SecurityClassLoader instance is found by examining the classes associated with each stack frame, and then examining the class loader associated with each class.
public Object getSecurityContext();
Returns the URL associated with the nearest SecurityClassLoader instance.