Example usage for org.apache.wicket.request Request getContextPath

List of usage examples for org.apache.wicket.request Request getContextPath

Introduction

In this page you can find the example usage for org.apache.wicket.request Request getContextPath.

Prototype

public String getContextPath() 

Source Link

Document

Returns the context path or an empty string if the application is running under root context.

Usage

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

License:Apache License

/**
 * Constructs a new <code>WebSphereAbsoluteUrlRenderer</code>.
 *
 * @param request the wicket request//  w ww.jav  a  2s. c o  m
 */
public WebSphereAbsoluteUrlRenderer(Request request) {
    super(request);

    this.contextPath = request.getContextPath();
}

From source file:org.artifactory.common.wicket.util.WicketUtils.java

License:Open Source License

public static String getWicketAppPath() {
    Request request = RequestCycle.get().getRequest();
    return request.getContextPath() + request.getFilterPath() + "/";
}

From source file:org.brixcms.web.BrixUrlMapper.java

License:Apache License

public IRequestHandler mapRequest(Request request) {
    String pathStr = request.getContextPath();

    IRequestHandler target = targetForPath(pathStr, request.getRequestParameters());

    if (target == null) {
        // 404 if node not found
        // return new
        // WebErrorCodeResponseTarget(HttpServletResponse.SC_NOT_FOUND,
        // "Resource
        // " + pathStr
        // + " not found");
        return null;
        // return new PageRequestTarget(new
        // ResourceNotFoundPage(pathStr));
    } else {/*from   www .j  ava 2s  .  c om*/
        return target;
    }
}