ctxCfg.setDefaultWebXml(TomcatUtil.noDefaultWebXmlPath()); ctx.addLifecycleListener(ctxCfg);
public Context addWebapp( Host host, String url, String name, String path ) { Context ctx = new StandardContext(); ctx.setName( name ); ctx.setPath( url ); ctx.setDocBase( path ); ContextConfig ctxCfg = new ContextConfig(); ctx.addLifecycleListener( ctxCfg ); ctxCfg.setDefaultWebXml( new File( configurationDir, "conf/web.xml" ).getAbsolutePath() ); if ( host == null ) { getHost().addChild( ctx ); } else { host.addChild( ctx ); } return ctx; } }
public Context addWebapp( Host host, String url, String name, String path ) { Context ctx = new StandardContext(); ctx.setName( name ); ctx.setPath( url ); ctx.setDocBase( path ); ContextConfig ctxCfg = new ContextConfig(); ctx.addLifecycleListener( ctxCfg ); ctxCfg.setDefaultWebXml( new File( configurationDir, "conf/web.xml" ).getAbsolutePath() ); if ( host == null ) { getHost().addChild( ctx ); } else { host.addChild( ctx ); } return ctx; } }
public Context addWebapp( Host host, String url, String name, String path ) { Context ctx = new StandardContext(); ctx.setName( name ); ctx.setPath( url ); ctx.setDocBase( path ); ContextConfig ctxCfg = new ContextConfig(); ctx.addLifecycleListener( ctxCfg ); ctxCfg.setDefaultWebXml( new File( extractDirectory, "conf/web.xml" ).getAbsolutePath() ); if ( host == null ) { getHost().addChild( ctx ); } else { host.addChild( ctx ); } return ctx; } };
public Context addWebapp( Host host, String url, String name, String path ) { Context ctx = new StandardContext(); ctx.setName( name ); ctx.setPath( url ); ctx.setDocBase( path ); ContextConfig ctxCfg = new ContextConfig(); ctx.addLifecycleListener( ctxCfg ); ctxCfg.setDefaultWebXml( new File( extractDirectory, "conf/web.xml" ).getAbsolutePath() ); if ( host == null ) { getHost().addChild( ctx ); } else { host.addChild( ctx ); } return ctx; } };
public Context addWebapp( Host host, String url, String name, String path ) { Context ctx = new StandardContext(); ctx.setName( name ); ctx.setPath( url ); ctx.setDocBase( path ); ContextConfig ctxCfg = new ContextConfig(); ctx.addLifecycleListener( ctxCfg ); ctxCfg.setDefaultWebXml( new File( extractDirectory, "conf/web.xml" ).getAbsolutePath() ); if ( host == null ) { getHost().addChild( ctx ); } else { host.addChild( ctx ); } if (sessionManagerFactoryClassName != null) { boolean cookies = true; constructSessionManager(ctx, sessionManagerFactoryClassName, cookies); } return ctx; } };
/** * @see #addWebapp(String, String) */ public Context addWebapp(Host host, String contextPath, String docBase, ContextConfig config) { Context ctx = createContext(host, contextPath); ctx.setPath(contextPath); ctx.setDocBase(docBase); ctx.addLifecycleListener(new DefaultWebXmlListener()); ctx.setConfigFile(getWebappConfigFile(docBase, contextPath)); ctx.addLifecycleListener(config); // prevent it from looking ( if it finds one - it'll have dup error ) config.setDefaultWebXml(noDefaultWebXmlPath()); // get the host first, creates a new std host if not already set getHost(); // reset ParentClassLoader if (!host.getParentClassLoader().equals(Thread.currentThread().getContextClassLoader())) { host.setParentClassLoader(Thread.currentThread().getContextClassLoader()); } StandardRoot standardRoot = new StandardRoot(ctx); standardRoot.setCacheMaxSize(cacheMaxSize); ctx.setResources(standardRoot); // add the context host.addChild(ctx); return ctx; }
public Context addWebapp(Host host, String url, String name, String path) { silence(host, url); Context ctx = new StandardContext(); ctx.setName(name); ctx.setPath(url); ctx.setDocBase(path); ctx.addLifecycleListener(new DefaultWebXmlListener()); ContextConfig ctxCfg = new ContextConfig(); ctx.addLifecycleListener(ctxCfg); // prevent it from looking ( if it finds one - it'll have dup error ) ctxCfg.setDefaultWebXml(noDefaultWebXmlPath()); if (host == null) { getHost().addChild(ctx); } else { host.addChild(ctx); } return ctx; }
config.setDefaultWebXml(defaultWebXmlLocation); context.addLifecycleListener(config);
@Override public Context addWebapp(Host host, String contextPath, String docBase, LifecycleListener config) { // quit because of private and unneeded //silence(host, contextPath); final Context ctx = createContext(host, contextPath); ctx.setPath(contextPath); ctx.setDocBase(docBase); ctx.addLifecycleListener(newDefaultWebXmlListener()); // *extension point ctx.setConfigFile(getWebappConfigFile(docBase, contextPath)); ctx.addLifecycleListener(config); if (config instanceof ContextConfig) { // prevent it from looking ( if it finds one - it'll have dup error ) ((ContextConfig) config).setDefaultWebXml(noDefaultWebXmlPath()); } if (host == null) { getHost().addChild(ctx); } else { host.addChild(ctx); } return ctx; }
public Context addWebapp(Host host, String url, String name, String path) { silence(host, url); Context ctx = new StandardContext(); ctx.setName(name); ctx.setPath(url); ctx.setDocBase(path); ctx.addLifecycleListener(new DefaultWebXmlListener()); ContextConfig ctxCfg = new ContextConfig(); ctx.addLifecycleListener(ctxCfg); // prevent it from looking ( if it finds one - it'll have dup error ) ctxCfg.setDefaultWebXml(noDefaultWebXmlPath()); if (host == null) { getHost().addChild(ctx); } else { host.addChild(ctx); } return ctx; }
public Context addWebapp(Host host, String url, String path) { silence(url); Context ctx = new StandardContext(); ctx.setPath( url ); ctx.setDocBase(path); if (defaultRealm == null) { initSimpleAuth(); } ctx.setRealm(defaultRealm); ctx.addLifecycleListener(new DefaultWebXmlListener()); ContextConfig ctxCfg = new ContextConfig(); ctx.addLifecycleListener(ctxCfg); // prevent it from looking ( if it finds one - it'll have dup error ) ctxCfg.setDefaultWebXml("org/apache/catalin/startup/NO_DEFAULT_XML"); if (host == null) { getHost().addChild(ctx); } else { host.addChild(ctx); } return ctx; }
public Context addWebapp(Host host, String url, String path) { silence(url); Context ctx = new StandardContext(); ctx.setPath( url ); ctx.setDocBase(path); if (defaultRealm == null) { initSimpleAuth(); } ctx.setRealm(defaultRealm); ctx.addLifecycleListener(new DefaultWebXmlListener()); ContextConfig ctxCfg = new ContextConfig(); ctx.addLifecycleListener(ctxCfg); // prevent it from looking ( if it finds one - it'll have dup error ) ctxCfg.setDefaultWebXml("org/apache/catalin/startup/NO_DEFAULT_XML"); if (host == null) { getHost().addChild(ctx); } else { host.addChild(ctx); } return ctx; }
public Context addWebapp(Host host, String url, String path) { silence(url); Context ctx = new StandardContext(); ctx.setPath( url ); ctx.setDocBase(path); if (defaultRealm == null) { initSimpleAuth(); } ctx.setRealm(defaultRealm); ctx.addLifecycleListener(new DefaultWebXmlListener()); ContextConfig ctxCfg = new ContextConfig(); ctx.addLifecycleListener(ctxCfg); // prevent it from looking ( if it finds one - it'll have dup error ) ctxCfg.setDefaultWebXml("org/apache/catalin/startup/NO_DEFAULT_XML"); if (host == null) { getHost().addChild(ctx); } else { host.addChild(ctx); } return ctx; }
/** * @param host The host in which the context will be deployed * @param contextPath The context mapping to use, "" for root context. * @param docBase Base directory for the context, for static files. * Must exist, relative to the server home * @param config Custom context configurator helper * @return the deployed context * @see #addWebapp(String, String) */ public Context addWebapp(Host host, String contextPath, String docBase, LifecycleListener config) { silence(host, contextPath); Context ctx = createContext(host, contextPath); ctx.setPath(contextPath); ctx.setDocBase(docBase); if (addDefaultWebXmlToWebapp) ctx.addLifecycleListener(getDefaultWebXmlListener()); ctx.setConfigFile(getWebappConfigFile(docBase, contextPath)); ctx.addLifecycleListener(config); if (addDefaultWebXmlToWebapp && (config instanceof ContextConfig)) { // prevent it from looking ( if it finds one - it'll have dup error ) ((ContextConfig) config).setDefaultWebXml(noDefaultWebXmlPath()); } if (host == null) { getHost().addChild(ctx); } else { host.addChild(ctx); } return ctx; }
/** * @param host The host in which the context will be deployed * @param contextPath The context mapping to use, "" for root context. * @param docBase Base directory for the context, for static files. * Must exist, relative to the server home * @param config Custom context configurator helper * @return the deployed context * @see #addWebapp(String, String) */ public Context addWebapp(Host host, String contextPath, String docBase, LifecycleListener config) { silence(host, contextPath); Context ctx = createContext(host, contextPath); ctx.setPath(contextPath); ctx.setDocBase(docBase); ctx.addLifecycleListener(getDefaultWebXmlListener()); ctx.setConfigFile(getWebappConfigFile(docBase, contextPath)); ctx.addLifecycleListener(config); if (config instanceof ContextConfig) { // prevent it from looking ( if it finds one - it'll have dup error ) ((ContextConfig) config).setDefaultWebXml(noDefaultWebXmlPath()); } if (host == null) { getHost().addChild(ctx); } else { host.addChild(ctx); } return ctx; }
/** * @see #addWebapp(String, String) */ public Context addWebapp(Host host, String url, String name, String path) { silence(host, url); Context ctx = new StandardContext(); ctx.setName(name); ctx.setPath(url); ctx.setDocBase(path); ctx.addLifecycleListener(new DefaultWebXmlListener()); ctx.setConfigFile(getWebappConfigFile(path, url)); ContextConfig ctxCfg = new ContextConfig(); ctx.addLifecycleListener(ctxCfg); // prevent it from looking ( if it finds one - it'll have dup error ) ctxCfg.setDefaultWebXml(noDefaultWebXmlPath()); if (host == null) { getHost().addChild(ctx); } else { host.addChild(ctx); } return ctx; }