// shared global JS files
SimpleSortingVector sharedGlobalJSPaths = wConfigImpl.getSharedGlobalJSInjectionPaths();
sharedGlobalJSPaths.setSortComparator( JSUtilities.getStringComparator() );
// sort to ensure JS is loaded in correct order
sharedGlobalJSPaths.reSort();
Enumeration sharedGlobalJSPathElems = sharedGlobalJSPaths.elements();
while( sharedGlobalJSPathElems.hasMoreElements() ) {
String jsPath = getValidPath( (String) sharedGlobalJSPathElems.nextElement() );
Object compiledScript = scriptEngine.compileScript( readJSContent( jsPath ) );
scriptEngine.executeCompiledScript( compiledScript, null );
}