Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.

This commit is contained in:
Simone Bordet 2020-11-02 10:47:03 +01:00
commit 40fd98d6a9
5 changed files with 15 additions and 6 deletions

View File

@ -212,12 +212,17 @@ public class ResourceHandler extends HandlerWrapper implements ResourceFactory,
{
if (_defaultStylesheet == null)
{
_defaultStylesheet = Resource.newResource(this.getClass().getResource("/jetty-dir.css"));
_defaultStylesheet = getDefaultStylesheet();
}
return _defaultStylesheet;
}
}
public static Resource getDefaultStylesheet()
{
return Resource.newResource(ResourceHandler.class.getResource("/jetty-dir.css"));
}
public String[] getWelcomeFiles()
{
return _welcomes;

View File

@ -40,6 +40,7 @@ import org.eclipse.jetty.server.ResourceContentFactory;
import org.eclipse.jetty.server.ResourceService;
import org.eclipse.jetty.server.ResourceService.WelcomeFactory;
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.resource.Resource;
import org.eclipse.jetty.util.resource.ResourceFactory;
@ -221,7 +222,7 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory, Welc
}
if (_stylesheet == null)
{
_stylesheet = Resource.newResource(this.getClass().getResource("/jetty-dir.css"));
_stylesheet = ResourceHandler.getDefaultStylesheet();
}
}
catch (Exception e)

View File

@ -228,8 +228,11 @@ public class DemoModulesTests extends AbstractJettyHomeTest
assertTrue(runStart.awaitConsoleLogsFor("Started Server@", 10, TimeUnit.SECONDS));
startHttpClient();
ContentResponse response = client.GET("http://localhost:" + httpPort + "/test/hello");
assertEquals(HttpStatus.OK_200, response.getStatus(), new ResponseDetails(response));
ContentResponse helloResponse = client.GET("http://localhost:" + httpPort + "/test/hello");
assertEquals(HttpStatus.OK_200, helloResponse.getStatus());
ContentResponse cssResponse = client.GET("http://localhost:" + httpPort + "/jetty-dir.css");
assertEquals(HttpStatus.OK_200, cssResponse.getStatus());
}
}
}

View File

@ -13,7 +13,7 @@
<properties>
<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>
<build>
@ -40,7 +40,7 @@
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-annotation_1.3_spec</artifactId>
<version>1.1</version>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>