本文整理了Java中org.apache.wicket.request.Request.getFilterPath
方法的一些代码示例,展示了Request.getFilterPath
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getFilterPath
方法的具体详情如下:
包路径:org.apache.wicket.request.Request
类名称:Request
方法名:getFilterPath
[英]Returns the path to which wicket Filter is mapped or an empty string if the filter is mapped to /. Returned path, unless an empty string, will always start with a slash and will never end with a slash.
[中]返回wicket筛选器映射到的路径,如果筛选器映射到/,则返回空字符串。返回的路径,除非是空字符串,否则总是以斜杠开始,永远不会以斜杠结束。
代码示例来源:origin: apache/wicket
public CharSequence getFilterPrefix() {
if (filterPrefix.get() == null)
{
if (USING_JAVAX_WEB_SOCKET)
{
filterPrefix.compareAndSet(null, "");
}
else
{
filterPrefix.compareAndSet(null, RequestCycle.get().getRequest().getFilterPath());
}
}
return filterPrefix.get();
}
代码示例来源:origin: org.apache.wicket/wicket-native-websocket-core
public CharSequence getFilterPrefix() {
if (filterPrefix.get() == null)
{
if (USING_JAVAX_WEB_SOCKET)
{
filterPrefix.compareAndSet(null, "");
}
else
{
filterPrefix.compareAndSet(null, RequestCycle.get().getRequest().getFilterPath());
}
}
return filterPrefix.get();
}
代码示例来源:origin: org.jabylon/rest.ui
/**
*
* @return the web context or "" if mounted as /
*/
public static String getContextPath()
{
String path = RequestCycle.get().getRequest().getFilterPath();
if(path==null || path.isEmpty())
return "";
return path;
}
代码示例来源:origin: org.wicketstuff/wicketstuff-portlet
private Url encodeSharedResourceUrl(Url url) {
if (url != null) {
Request request = RequestCycle.get().getRequest();
StringBuilder urlBuilder = new StringBuilder();
urlBuilder.append(request.getContextPath());
urlBuilder.append(request.getFilterPath());
urlBuilder.append(PortletFilter.SHARED_RESOURCE_URL_PORTLET_WINDOW_ID_PREFIX);
urlBuilder.append(Base64.encodeBase64URLSafeString(ThreadPortletContext.getWindowID().getBytes()));
urlBuilder.append('/');
urlBuilder.append(url.toString());
url = Url.parse(urlBuilder.toString());
}
return url;
}
代码示例来源:origin: org.opensingular/singular-requirement-commons
private String mountLogoutPathWithRequectCycle(RequestCycle requestCycle, String baseUrl) {
Request request = requestCycle.getRequest();
Url url = request.getUrl();
UrlToolkit urlToolkit = urlToolkitBuilder.build(url);
Optional<String> filterPath = Optional.ofNullable(request.getFilterPath());
String logoutPath = urlToolkit.concatServerAdressWithContext(baseUrl);
logoutPath += "?service=" + urlToolkit.concatServerAdressWithContext(contextPath + filterPath.orElse(""));
return logoutPath;
}
代码示例来源:origin: org.opensingular/singular-requirement-commons
public static String getBaseURL() {
final RequestCycle requestCycle = RequestCycle.get();
final Request request = requestCycle.getRequest();
final String currentPath = request.getUrl().toString();
String fullUrl = requestCycle.getUrlRenderer().renderFullUrl(request.getUrl());
if (org.apache.commons.lang3.StringUtils.isNotBlank(currentPath)) {
final int beginPath = fullUrl.lastIndexOf(currentPath);
fullUrl = fullUrl.substring(0, beginPath - 1);
}
final Optional<String> contextPath = Optional.ofNullable(requestCycle.getRequest().getContextPath());
final Optional<String> filterPath = Optional.ofNullable(requestCycle.getRequest().getFilterPath());
return fullUrl + contextPath.orElse("") + filterPath.orElse("");
}
代码示例来源:origin: org.opensingular/singular-requirement-module
public static String getBaseURL() {
final RequestCycle requestCycle = RequestCycle.get();
final Request request = requestCycle.getRequest();
final String currentPath = request.getUrl().toString();
String fullUrl = requestCycle.getUrlRenderer().renderFullUrl(request.getUrl());
if (org.apache.commons.lang3.StringUtils.isNotBlank(currentPath)) {
final int beginPath = fullUrl.lastIndexOf(currentPath);
fullUrl = fullUrl.substring(0, beginPath - 1);
}
final Optional<String> contextPath = Optional.ofNullable(requestCycle.getRequest().getContextPath());
final Optional<String> filterPath = Optional.ofNullable(requestCycle.getRequest().getFilterPath());
return fullUrl + contextPath.orElse("") + filterPath.orElse("");
}
代码示例来源:origin: org.opensingular/singular-server-commons
private String mountLogoutPathWithRequectCycle(RequestCycle requestCycle, String baseUrl) {
Request request = requestCycle.getRequest();
Url url = request.getUrl();
UrlToolkit urlToolkit = urlToolkitBuilder.build(url);
Optional<String> filterPath = Optional.ofNullable(request.getFilterPath());
String logoutPath = urlToolkit.concatServerAdressWithContext(baseUrl);
logoutPath += "?service=" + urlToolkit.concatServerAdressWithContext(contextPath + filterPath.orElse(""));
return logoutPath;
}
代码示例来源:origin: org.opensingular/singular-requirement-module
private String mountLogoutPathWithRequectCycle(RequestCycle requestCycle, String baseUrl) {
Request request = requestCycle.getRequest();
Url url = request.getUrl();
UrlToolkit urlToolkit = urlToolkitBuilder.build(url);
Optional<String> filterPath = Optional.ofNullable(request.getFilterPath());
String logoutPath = urlToolkit.concatServerAdressWithContext(baseUrl);
logoutPath += "?service=" + urlToolkit.concatServerAdressWithContext(contextPath + filterPath.orElse(""));
return logoutPath;
}
代码示例来源:origin: org.opensingular/singular-server-commons
public static String getBaseURL() {
final RequestCycle requestCycle = RequestCycle.get();
final Request request = requestCycle.getRequest();
final String currentPath = request.getUrl().toString();
String fullUrl = requestCycle.getUrlRenderer().renderFullUrl(request.getUrl());
if (org.apache.commons.lang3.StringUtils.isNotBlank(currentPath)) {
final int beginPath = fullUrl.lastIndexOf(currentPath);
fullUrl = fullUrl.substring(0, beginPath - 1);
}
final Optional<String> contextPath = Optional.ofNullable(requestCycle.getRequest().getContextPath());
final Optional<String> filterPath = Optional.ofNullable(requestCycle.getRequest().getFilterPath());
return fullUrl + contextPath.orElse("") + filterPath.orElse("");
}
代码示例来源:origin: org.artifactory/artifactory-web-common
public static String getWicketAppPath() {
Request request = RequestCycle.get().getRequest();
return request.getContextPath() + request.getFilterPath() + "/";
}
代码示例来源:origin: org.opensingular/server-commons
public static String getBaseURL() {
final RequestCycle requestCycle = RequestCycle.get();
final Request request = requestCycle.getRequest();
final String currentPath = request.getUrl().toString();
String fullUrl = requestCycle.getUrlRenderer().renderFullUrl(request.getUrl());
if (org.apache.commons.lang3.StringUtils.isNotBlank(currentPath)) {
final int beginPath = fullUrl.lastIndexOf(currentPath);
fullUrl = fullUrl.substring(0, beginPath - 1);
}
final Optional<String> contextPath = Optional.ofNullable(requestCycle.getRequest().getContextPath());
final Optional<String> filterPath = Optional.ofNullable(requestCycle.getRequest().getFilterPath());
return fullUrl + contextPath.orElse("") + filterPath.orElse("");
}
}
代码示例来源:origin: apache/wicket
Url commonPrefix = Url.parse(request.getContextPath() + request.getFilterPath());
代码示例来源:origin: org.apache.wicket/wicket-request
Url commonPrefix = Url.parse(request.getContextPath() + request.getFilterPath());
代码示例来源:origin: org.apache.wicket/wicket-request
render.append(request.getFilterPath());
代码示例来源:origin: apache/wicket
render.append(request.getFilterPath());
代码示例来源:origin: org.opensingular/singular-wicket-utils
render.append(request.getFilterPath());
代码示例来源:origin: org.opensingular/wicket-utils
render.append(request.getFilterPath());
内容来源于网络,如有侵权,请联系作者删除!