rootURL.setScheme(url.getProtocol());
rootURL.setHost(url.getHost());
rootURL.setPort(url.getPort());
rootURL.setUserInfo(url.getUserInfo());
return create(rootURL.toJavaURL(), "/").createRelative(url.getPath());
}
/**
* Creates the resource from a url... The root will be at the path of this url (ex:
* if url is http://localhost/a/b/c/foo.html then root is /a/b/c).