Example usage for org.apache.wicket.request Url isFull

List of usage examples for org.apache.wicket.request Url isFull

Introduction

In this page you can find the example usage for org.apache.wicket.request Url isFull.

Prototype

public boolean isFull() 

Source Link

Document

Returns whether the Url has a host attribute.

Usage

From source file:guru.mmp.application.web.WebSphereAbsoluteUrlRenderer.java

License:Apache License

/**
 * Overrides the normal relative URL rendering to render an absolute URL that is compatible with
 * WebSphere./*from w  ww . j  a v  a2s.  c  o m*/
 *
 * @param url the URL to render
 *
 * @return the WebSphere compatible absolute URL
 */
@Override
public String renderRelativeUrl(Url url) {
    if (url == null) {
        throw new WebApplicationException("Fail to render relative URL for null URL");
    }

    // If this is already a context absolute or full URL then stop here
    if (url.isContextAbsolute() || url.isFull()) {
        return url.toString();
    } else {
        return contextPath + "/" + url.toString();
    }
}