Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.
This commit is contained in:
commit
40fd98d6a9
|
@ -212,12 +212,17 @@ public class ResourceHandler extends HandlerWrapper implements ResourceFactory,
|
||||||
{
|
{
|
||||||
if (_defaultStylesheet == null)
|
if (_defaultStylesheet == null)
|
||||||
{
|
{
|
||||||
_defaultStylesheet = Resource.newResource(this.getClass().getResource("/jetty-dir.css"));
|
_defaultStylesheet = getDefaultStylesheet();
|
||||||
}
|
}
|
||||||
return _defaultStylesheet;
|
return _defaultStylesheet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Resource getDefaultStylesheet()
|
||||||
|
{
|
||||||
|
return Resource.newResource(ResourceHandler.class.getResource("/jetty-dir.css"));
|
||||||
|
}
|
||||||
|
|
||||||
public String[] getWelcomeFiles()
|
public String[] getWelcomeFiles()
|
||||||
{
|
{
|
||||||
return _welcomes;
|
return _welcomes;
|
||||||
|
|
|
@ -40,6 +40,7 @@ import org.eclipse.jetty.server.ResourceContentFactory;
|
||||||
import org.eclipse.jetty.server.ResourceService;
|
import org.eclipse.jetty.server.ResourceService;
|
||||||
import org.eclipse.jetty.server.ResourceService.WelcomeFactory;
|
import org.eclipse.jetty.server.ResourceService.WelcomeFactory;
|
||||||
import org.eclipse.jetty.server.handler.ContextHandler;
|
import org.eclipse.jetty.server.handler.ContextHandler;
|
||||||
|
import org.eclipse.jetty.server.handler.ResourceHandler;
|
||||||
import org.eclipse.jetty.util.URIUtil;
|
import org.eclipse.jetty.util.URIUtil;
|
||||||
import org.eclipse.jetty.util.resource.Resource;
|
import org.eclipse.jetty.util.resource.Resource;
|
||||||
import org.eclipse.jetty.util.resource.ResourceFactory;
|
import org.eclipse.jetty.util.resource.ResourceFactory;
|
||||||
|
@ -221,7 +222,7 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory, Welc
|
||||||
}
|
}
|
||||||
if (_stylesheet == null)
|
if (_stylesheet == null)
|
||||||
{
|
{
|
||||||
_stylesheet = Resource.newResource(this.getClass().getResource("/jetty-dir.css"));
|
_stylesheet = ResourceHandler.getDefaultStylesheet();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -228,8 +228,11 @@ public class DemoModulesTests extends AbstractJettyHomeTest
|
||||||
assertTrue(runStart.awaitConsoleLogsFor("Started Server@", 10, TimeUnit.SECONDS));
|
assertTrue(runStart.awaitConsoleLogsFor("Started Server@", 10, TimeUnit.SECONDS));
|
||||||
|
|
||||||
startHttpClient();
|
startHttpClient();
|
||||||
ContentResponse response = client.GET("http://localhost:" + httpPort + "/test/hello");
|
ContentResponse helloResponse = client.GET("http://localhost:" + httpPort + "/test/hello");
|
||||||
assertEquals(HttpStatus.OK_200, response.getStatus(), new ResponseDetails(response));
|
assertEquals(HttpStatus.OK_200, helloResponse.getStatus());
|
||||||
|
|
||||||
|
ContentResponse cssResponse = client.GET("http://localhost:" + httpPort + "/jetty-dir.css");
|
||||||
|
assertEquals(HttpStatus.OK_200, cssResponse.getStatus());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<bundle-symbolic-name>${project.groupId}.cdi.owb</bundle-symbolic-name>
|
<bundle-symbolic-name>${project.groupId}.cdi.owb</bundle-symbolic-name>
|
||||||
<openwebbeans.version>2.0.18</openwebbeans.version>
|
<openwebbeans.version>2.0.19</openwebbeans.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
<artifactId>geronimo-annotation_1.3_spec</artifactId>
|
<artifactId>geronimo-annotation_1.3_spec</artifactId>
|
||||||
<version>1.1</version>
|
<version>1.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
|
Loading…
Reference in New Issue