本文整理了Java中org.apache.openejb.jee.WebApp.setContextRoot()
方法的一些代码示例,展示了WebApp.setContextRoot()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebApp.setContextRoot()
方法的具体详情如下:
包路径:org.apache.openejb.jee.WebApp
类名称: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,
内容来源于网络,如有侵权,请联系作者删除!