org.apache.openejb.jee.WebApp.setContextRoot()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中org.apache.openejb.jee.WebApp.setContextRoot()方法的一些代码示例,展示了WebApp.setContextRoot()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebApp.setContextRoot()方法的具体详情如下:
包路径:org.apache.openejb.jee.WebApp
类名称:WebApp
方法名:setContextRoot

WebApp.setContextRoot介绍

暂无

代码示例

代码示例来源:origin: org.apache.tomee/openejb-core

public void setWebApp(final WebApp webApp) {
  this.webApp = webApp;
  if (webApp != null) {
    webApp.setContextRoot(contextRoot);
  }
}

代码示例来源:origin: org.apache.openejb/openejb-core

public void setContextRoot(final String contextRoot) {
  if (webApp != null) {
    webApp.setContextRoot(contextRoot);
  }
  this.contextRoot = contextRoot;
}

代码示例来源:origin: org.apache.openejb/openejb-core

public void setWebApp(final WebApp webApp) {
  this.webApp = webApp;
  if (webApp != null) {
    webApp.setContextRoot(contextRoot);
  }
}

代码示例来源:origin: org.apache.tomee/openejb-core

public void setContextRoot(final String contextRoot) {
  if (webApp != null) {
    webApp.setContextRoot(contextRoot);
  }
  this.contextRoot = contextRoot;
}

代码示例来源:origin: org.apache.openejb/openejb-jee

public WebApp contextRoot(final String root) {
  setContextRoot(root);
  return this;
}

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core

public void setWebApp(WebApp webApp) {
  this.webApp = webApp;
  if (webApp != null) webApp.setContextRoot(contextRoot);
}

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core

public void setContextRoot(String contextRoot) {
  if (webApp != null) webApp.setContextRoot(contextRoot);
  this.contextRoot = contextRoot;
}

代码示例来源:origin: org.apache.tomee/openejb-jee

public WebApp contextRoot(final String root) {
  setContextRoot(root);
  return this;
}

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core

public WebModule(WebApp webApp, String contextRoot, ClassLoader classLoader, String jarLocation, String moduleId) {
  this.webApp = webApp;
  if (contextRoot == null) {
    contextRoot = jarLocation.substring(jarLocation.lastIndexOf(System.getProperty("file.separator")));
    if (contextRoot.endsWith(".unpacked")) {
      contextRoot = contextRoot.substring(0, contextRoot.length() - ".unpacked".length());
    }
    if (contextRoot.endsWith(".war")) {
      contextRoot = contextRoot.substring(0, contextRoot.length() - ".war".length());
    }
  }
  if (contextRoot.startsWith("/")) contextRoot = contextRoot.substring(1);
  this.contextRoot = contextRoot;
  this.classLoader = classLoader;
  this.jarLocation = jarLocation;
  if (webApp != null) webApp.setContextRoot(contextRoot);
  if (moduleId == null){
    if (webApp != null && webApp.getId() != null){
      moduleId = webApp.getId();
    } else {
      File file = new File(jarLocation);
      moduleId = file.getName();
      if (moduleId.endsWith(".unpacked")) {
        moduleId = moduleId.substring(0, moduleId.length() - ".unpacked".length());
      }
    }
  }
  this.moduleId = moduleId;
  validation = new ValidationContext(WebModule.class, jarLocation);
}

代码示例来源:origin: org.apache.openejb/openejb-core

public WebModule(final WebApp webApp, String contextRoot, final ClassLoader classLoader, final String jarLocation, final String moduleId) {
  this.webApp = webApp;
  final File file = jarLocation == null ? null : new File(jarLocation);
  this.id = new ID(null, webApp, moduleId, file, null, this);
  this.validation = new ValidationContext(this);
  if (contextRoot == null) {
    contextRoot = null != jarLocation ? jarLocation.substring(jarLocation.lastIndexOf(File.separator)) : ".";
    if (contextRoot.endsWith(".unpacked")) {
      contextRoot = contextRoot.substring(0, contextRoot.length() - ".unpacked".length());
    }
    if (contextRoot.endsWith(".war")) {
      contextRoot = contextRoot.substring(0, contextRoot.length() - ".war".length());
    }
  }
  while (contextRoot.startsWith("/")) {
    contextRoot = contextRoot.substring(1);
  }
  while (contextRoot.startsWith("\\")) {
    contextRoot = contextRoot.substring(1);
  }
  this.contextRoot = contextRoot;
  setClassLoader(classLoader);
  if (webApp != null) {
    webApp.setContextRoot(contextRoot);
  }
  host = SystemInstance.get().getProperty(id.getName() + ".host", null);
}

代码示例来源:origin: org.apache.tomee/openejb-core

public WebModule(final WebApp webApp, String contextRoot, final ClassLoader classLoader, final String jarLocation, final String moduleId) {
  this.webApp = webApp;
  final File file = jarLocation == null ? null : new File(jarLocation);
  this.id = new ID(null, webApp, moduleId, file, null, this);
  this.validation = new ValidationContext(this);
  if (contextRoot == null) {
    contextRoot = null != jarLocation ? jarLocation.substring(jarLocation.lastIndexOf(File.separator)) : ".";
    if (contextRoot.endsWith(".unpacked")) {
      contextRoot = contextRoot.substring(0, contextRoot.length() - ".unpacked".length());
    }
    if (contextRoot.endsWith(".war")) {
      contextRoot = contextRoot.substring(0, contextRoot.length() - ".war".length());
    }
  }
  while (contextRoot.startsWith("/")) {
    contextRoot = contextRoot.substring(1);
  }
  while (contextRoot.startsWith("\\")) {
    contextRoot = contextRoot.substring(1);
  }
  this.contextRoot = contextRoot;
  setClassLoader(classLoader);
  if (webApp != null) {
    webApp.setContextRoot(contextRoot);
  }
  host = SystemInstance.get().getProperty(id.getName() + ".host", null);
}

代码示例来源:origin: org.apache.tomee/openejb-core

if (classClasses != null) {
  final WebApp webapp = new WebApp();
  webapp.setContextRoot(classClasses.context());
  addWebApp(
      appModule, testBean, additionalDescriptors,

相关文章