* @param document A document.
* @return The complete HTTP URL of the document when requested via the web.
*/
protected String getWebUrl(Document document) {
String url;
Proxy proxy = document.getPublication().getProxy(document, false);
if (proxy != null) {
url = proxy.getURL(document);
} else {
Request request = ContextHelper.getRequest(this.context);
final String serverUrl = "http://" + request.getServerName() + ":"
+ request.getServerPort();
final String webappUrl = document.getCanonicalWebappURL();