ClasspathResource scriptLocation = (ClasspathResource) _externalScripts.get(i);
// This is still very awkward! Should move the code inside PrivateAsset somewhere
// else, so that an asset does not have to be created to to build the URL.
PrivateAsset asset = new PrivateAsset(scriptLocation, _assetService, null);
String url = asset.buildURL(cycle);
// Note: important to use begin(), not beginEmpty(), because browser don't
// interpret <script .../> properly.
writer.begin("script");