/** * Rewrites a relative url to be context relative, leaves absolute urls same. * * @param url * @param request * @return rewritten url */ public static String rewriteToContextRelative(String url, Request request) { if (isRelative(url)) { final String prefix = request.getRelativePathPrefixToContextRoot(); return prefix + url; } else { return url; } } }
/** {@inheritDoc} */ public String rewriteStaticRelativeUrl(String string) { return UrlUtils.rewriteToContextRelative(string, RequestCycle.get().getRequest()); }
/** {@inheritDoc} */ public String rewriteStaticRelativeUrl(String string) { return UrlUtils.rewriteToContextRelative(string, RequestCycle.get().getRequest()); }
if (!UrlUtils.isRelative(url.toString()) || (!sharedResourceURL && portletRequest))
/** * @see org.apache.wicket.request.IRequestCodingStrategy#rewriteStaticRelativeUrl(java.lang.String) */ public String rewriteStaticRelativeUrl(String string) { return UrlUtils.rewriteToContextRelative(string, RequestCycle.get().getRequest()); }
if (!UrlUtils.isRelative(url.toString()) || (!sharedResourceURL && portletRequest))