Skip to content

Commit

Permalink
Arrange the ROOT context logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfclere committed Feb 29, 2012
1 parent bdfc98e commit 3de0547
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/java/src/main/java/org/jboss/mod_cluster/JBossWeb.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,24 +154,24 @@ public JBossWeb(String route, String host, boolean nat, String webapp, String[]
// createHost( host, appBase);
// baseHost.setDeployOnStartup(true);
baseHost.setBackgroundProcessorDelay(1);
StandardHost stdhost = (StandardHost)baseHost;
//StandardHost stdhost = (StandardHost)baseHost;
// stdhost.setDeployXML(true);
stdhost.setConfigClass("org.apache.catalina.startup.ContextConfig");
baseHost.setConfigClass("org.apache.catalina.startup.ContextConfig");
// stdhost.setUnpackWARs(true);
if (Aliases != null && Aliases.length>0) {
for (int j = 0; j < Aliases.length; j++) {
stdhost.addAlias(Aliases[j]);
baseHost.addAlias(Aliases[j]);
}
}
HostConfig hostConfig = new HostConfig();
stdhost.addLifecycleListener(hostConfig);
baseEngine.addChild( baseHost );
baseHost.addLifecycleListener(hostConfig);
baseEngine.addChild(baseHost);

//Create default context
Context rootContext = new StandardContext();
rootContext.setDocBase(docBase);
if (webapp.equals("ROOT"))
rootContext.setPath("/");
rootContext.setPath("");
else
rootContext.setPath("/" + webapp);
ContextConfig config = new ContextConfig();
Expand Down Expand Up @@ -238,7 +238,7 @@ void AddContext(String path, String docBase, String servletname, boolean wait) {
}
}
void AddContext(String path, String docBase) {
AddContext(path, docBase, null, false);
AddContext(path, docBase, "MyCount", false);
}

public JBossWeb(String route, String host) throws IOException {
Expand Down

0 comments on commit 3de0547

Please sign in to comment.