use of org.teknux.jettybootstrap.JettyBootstrap in project jetty-bootstrap by teknux-org.
the class JettyBootstrapTest method do14SslExplodedWarTest.
@Test
public void do14SslExplodedWarTest() throws IllegalStateException, IOException, JettyBootstrapException, KeyManagementException, NoSuchAlgorithmException, KeyStoreException, URISyntaxException {
File folder = temporaryFolder.newFolder();
copyResourceToFile("/webapp", folder);
JettyBootstrap jettyBootstrap = initServer(true);
jettyBootstrap.addExplodedWarApp(folder.getPath(), null, "/sslExplodedWar");
jettyBootstrap.startServer();
Assert.assertEquals(new SimpleResponse(200, "StaticResContent\n"), get("/sslExplodedWar/index.html"));
}
use of org.teknux.jettybootstrap.JettyBootstrap in project jetty-bootstrap by teknux-org.
the class JettyBootstrapTest method do11StaticResourceFromClasspathTest.
@Test
public void do11StaticResourceFromClasspathTest() throws IllegalStateException, IOException, JettyBootstrapException, KeyManagementException, NoSuchAlgorithmException, KeyStoreException {
JettyBootstrap jettyBootstrap = initServer(false);
jettyBootstrap.addExplodedWarAppFromClasspath("/webapp", null, "/staticResourceFromClasspath");
jettyBootstrap.startServer();
Assert.assertEquals(new SimpleResponse(200, "StaticResContent\n"), get("/staticResourceFromClasspath/index.html"));
}
use of org.teknux.jettybootstrap.JettyBootstrap in project jetty-bootstrap by teknux-org.
the class JettyBootstrapTest method do07ServletWarFromClasspathTest.
@Test
public void do07ServletWarFromClasspathTest() throws IllegalStateException, IOException, JettyBootstrapException, KeyManagementException, NoSuchAlgorithmException, KeyStoreException {
JettyBootstrap jettyBootstrap = initServer(false);
jettyBootstrap.addWarAppFromClasspath("/servlet.war", "/servletWarFromClasspath");
jettyBootstrap.startServer();
Assert.assertEquals(new SimpleResponse(200, "Value=value1" + LINE_SEPARATOR), get("/servletWarFromClasspath?value=value1"));
Assert.assertEquals(new SimpleResponse(200, "Value=value2" + LINE_SEPARATOR), get("/servletWarFromClasspath?value=value2"));
}
use of org.teknux.jettybootstrap.JettyBootstrap in project jetty-bootstrap by teknux-org.
the class JettyBootstrapTest method do12SslStaticResourceFromClasspathTest.
@Test
public void do12SslStaticResourceFromClasspathTest() throws IllegalStateException, IOException, JettyBootstrapException, KeyManagementException, NoSuchAlgorithmException, KeyStoreException {
JettyBootstrap jettyBootstrap = initServer(true);
jettyBootstrap.addExplodedWarAppFromClasspath("/webapp", null, "/sslStaticResourceFromClasspath");
jettyBootstrap.startServer();
Assert.assertEquals(new SimpleResponse(200, "StaticResContent\n"), get("/sslStaticResourceFromClasspath/index.html"));
}
Aggregations