com.google.gwt.user.server.rpc.RemoteServiceServlet.getThreadLocalRequest()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(78)

本文整理了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

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);

相关文章

微信公众号

最新文章

更多