Skip to content

Commit

Permalink
[FIXED JENKINS-22442]
Browse files Browse the repository at this point in the history
Jetty doesn't let us control where the files are to be exploded, so do
the extraction by ourselves.
  • Loading branch information
kohsuke committed Apr 1, 2014
1 parent 7c3d48f commit ec38d13
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/java/winstone/HostConfiguration.java
Expand Up @@ -69,17 +69,16 @@ public HostConfiguration(Server server, String hostname, ClassLoader commonLibCL
}

// Is this the single or multiple configuration ? Check args
File appFile = Option.WARFILE.get(args);
if (appFile==null)
appFile = Option.WEBROOT.get(args);
File warfile = Option.WARFILE.get(args);
File webroot = Option.WEBROOT.get(args);

Handler handler;
// If single-webapp mode
if (webappsDir == null && appFile != null) {
if (webappsDir == null && ((warfile != null) || (webroot != null))) {
String prefix = Option.PREFIX.get(args);
if (prefix.endsWith("/")) // trim off the trailing '/' that Jetty doesn't like
prefix = prefix.substring(0,prefix.length()-1);
handler = configureAccessLog(create(appFile, prefix),"webapp");
handler = configureAccessLog(create(getWebRoot(webroot,warfile), prefix),"webapp");
}
// Otherwise multi-webapp mode
else {
Expand Down

0 comments on commit ec38d13

Please sign in to comment.