Another reason for this is that loadExt.js may not lie directly under WebContent but there may be any folder hierarchy under WebContent where these js files may lie. Like in my sample, they lie under WebContent/js/loaderExt.js. So I had to remove this hardcoding and make it configurable