Well the problem here, is /editor.html loads the AEM Page that has your custom components via an iframe. If you try to resolve the URL server-side, it's going to be the path to the AEM Page (since the components/page are on the URL loaded by the iframe IN the page editor, rather than Page Editor's U...