@Override public void setConfigFile(StandardContext standardContext, File contextXmlFile) { try { standardContext.setConfigFile(contextXmlFile.toURI().toURL()); } catch (MalformedURLException e) { throw new TomEERuntimeException(e); } } }
private void setContextXml(StandardContext appContext) { for (String fileName : CONTEXT_XML) { File contextXml = new File(fileName); if (contextXml.exists()) { URL contextUrl; try { contextUrl = contextXml.toURI().toURL(); appContext.setConfigFile(contextUrl); } catch (MalformedURLException exc) { throw new RuntimeException(exc); } break; } } }
File configFile = new File(new File(configPath), baseName+".xml"); if (configFile.isFile()) { context.setConfigFile(configFile.toURI().toURL());
File configFile = new File(new File(configPath), baseName+".xml"); if (configFile.isFile()) { context.setConfigFile(configFile.toURI().toURL());
File configFile = new File(new File(configPath), baseName+".xml"); if (configFile.isFile()) { context.setConfigFile(configFile.toURI().toURL());
public void deployWebApps(AppInfo appInfo, ClassLoader classLoader) throws Exception { for (WebAppInfo webApp : appInfo.webApps) { if (getContextInfo(webApp) == null) { StandardContext standardContext = new StandardContext(); String contextXmlFile = webApp.codebase + "/META-INF/context.xml"; if (new File(contextXmlFile).exists()) { standardContext.setConfigFile(contextXmlFile); standardContext.setOverride(true); } ContextConfig contextConfig = new ContextConfig(); standardContext.addLifecycleListener(contextConfig); standardContext.setPath("/" + webApp.contextRoot); standardContext.setDocBase(webApp.codebase); standardContext.setParentClassLoader(classLoader); standardContext.setDelegate(true); String host = webApp.host; if (host == null) host = "localhost"; HostConfig deployer = deployers.get(host); if (deployer != null) { // host isn't set until we call deployer.manageApp, so pass it ContextInfo contextInfo = addContextInfo(host, standardContext); contextInfo.appInfo = appInfo; contextInfo.deployer = deployer; contextInfo.standardContext = standardContext; deployer.manageApp(standardContext); } } } }
standardContext.setConfigFile(contextXmlUrl);
String baseName = getConfigFile(contextPath); File configFile = new File(new File(configPath), baseName+".xml"); context.setConfigFile(configFile.getAbsolutePath()); mserver.invoke(deployer, "manageApp", new Object[] {context},
File configFile = new File(new File(configPath), baseName+".xml"); if (configFile.isFile()) { context.setConfigFile(configFile.toURI().toURL());
File configFile = new File(new File(configPath), baseName+".xml"); if (configFile.isFile()) { context.setConfigFile(configFile.toURI().toURL());
String baseName = context.getBaseName(); File configFile = new File(new File(configPath), baseName+".xml"); context.setConfigFile(configFile.toURI().toURL()); mserver.invoke(deployer, "manageApp", new Object[] {context},
String baseName = context.getBaseName(); File configFile = new File(new File(configPath), baseName+".xml"); context.setConfigFile(configFile.toURI().toURL()); mserver.invoke(deployer, "manageApp", new Object[] {context},
String baseName = context.getBaseName(); File configFile = new File(new File(configPath), baseName+".xml"); context.setConfigFile(configFile.toURI().toURL()); mserver.invoke(deployer, "manageApp", new Object[] {context},