本文整理了Java中com.google.gwt.user.server.rpc.RemoteServiceServlet.getThreadLocalRequest
方法的一些代码示例,展示了RemoteServiceServlet.getThreadLocalRequest
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RemoteServiceServlet.getThreadLocalRequest
方法的具体详情如下:
包路径:com.google.gwt.user.server.rpc.RemoteServiceServlet
类名称:RemoteServiceServlet
方法名:getThreadLocalRequest
暂无
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Extract the module's base path from the current request.
*
* @return the module's base path, modulo protocol and host, as reported by
* {@link com.google.gwt.core.client.GWT#getModuleBaseURL()} or
* <code>null</code> if the request did not contain the
* {@value com.google.gwt.user.client.rpc.RpcRequestBuilder#MODULE_BASE_HEADER} header
*/
protected String getRequestModuleBasePath() {
try {
String header = getThreadLocalRequest().getHeader(MODULE_BASE_HEADER);
if (header == null) {
return null;
}
String path = new URL(header).getPath();
String contextPath = getThreadLocalRequest().getContextPath();
if (!path.startsWith(contextPath)) {
return null;
}
return path.substring(contextPath.length());
} catch (MalformedURLException e) {
return null;
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
serializationPolicy = doGetSerializationPolicy(getThreadLocalRequest(),
moduleBaseURL, strongName);
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Extract the module's base path from the current request.
*
* @return the module's base path, modulo protocol and host, as reported by
* {@link com.google.gwt.core.client.GWT#getModuleBaseURL()} or
* <code>null</code> if the request did not contain the
* {@value com.google.gwt.user.client.rpc.RpcRequestBuilder#MODULE_BASE_HEADER} header
*/
protected String getRequestModuleBasePath() {
try {
String header = getThreadLocalRequest().getHeader(MODULE_BASE_HEADER);
if (header == null) {
return null;
}
String path = new URL(header).getPath();
String contextPath = getThreadLocalRequest().getContextPath();
if (!path.startsWith(contextPath)) {
return null;
}
return path.substring(contextPath.length());
} catch (MalformedURLException e) {
return null;
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Extract the module's base path from the current request.
*
* @return the module's base path, modulo protocol and host, as reported by
* {@link com.google.gwt.core.client.GWT#getModuleBaseURL()} or
* <code>null</code> if the request did not contain the
* {@value com.google.gwt.user.client.rpc.RpcRequestBuilder#MODULE_BASE_HEADER} header
*/
protected String getRequestModuleBasePath() {
try {
String header = getThreadLocalRequest().getHeader(MODULE_BASE_HEADER);
if (header == null) {
return null;
}
String path = new URL(header).getPath();
String contextPath = getThreadLocalRequest().getContextPath();
if (!path.startsWith(contextPath)) {
return null;
}
return path.substring(contextPath.length());
} catch (MalformedURLException e) {
return null;
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
serializationPolicy = doGetSerializationPolicy(getThreadLocalRequest(),
moduleBaseURL, strongName);
代码示例来源:origin: net.wetheinter/gwt-user
serializationPolicy = doGetSerializationPolicy(getThreadLocalRequest(),
moduleBaseURL, strongName);
内容来源于网络,如有侵权,请联系作者删除!