List of usage examples for org.apache.wicket.request Request getFilterPath
public String getFilterPath()
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.artifactory.webapp.wicket.application.ArtifactoryRequestCycleListener.java
License:Open Source License
private void fixSimpleRepoBrowsingUrl(Request request, Url url) { RepoPath repoPath = RequestUtils.getRepoPath((HttpServletRequest) request.getContainerRequest()); if (repoPath != null) { /*ArrayList<String> prefix = new ArrayList<String>(); String path = repoPath.getPath(); if (StringUtils.isNotEmpty(path)) { int nesting = new StringTokenizer(path, "/").countTokens() + 1; while (nesting > 0) {// w w w . j a va2 s . co m prefix.add(".."); nesting--; } } else { prefix.add(".."); } */ List<String> prefix = Lists.newArrayList(".."); String filterPath = request.getFilterPath(); if (StringUtils.isNotEmpty(filterPath) && filterPath.startsWith("/")) { prefix.add(filterPath.substring(1)); } url.prependLeadingSegments(prefix); } }