From: Kai Moritz Date: Mon, 18 Jun 2012 23:41:31 +0000 (+0200) Subject: WIP: Versuch den StaticTest zu reparieren... X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=9239a3fb05891abf7883ed3995022ffdade33c00;p=percentcodec WIP: Versuch den StaticTest zu reparieren... --- diff --git a/examples/static/src/main/webapp/WEB-INF/web.xml b/examples/static/src/main/webapp/WEB-INF/web.xml index 288754d4..8c1c69db 100644 --- a/examples/static/src/main/webapp/WEB-INF/web.xml +++ b/examples/static/src/main/webapp/WEB-INF/web.xml @@ -48,7 +48,7 @@ default - org.eclipse.jetty.servlet.DefaultServlet + org.apache.catalina.servlets.DefaultServlet diff --git a/examples/static/src/test/java/de/halbekunst/cachecontrol/examples/jsp/StaticTest.java b/examples/static/src/test/java/de/halbekunst/cachecontrol/examples/jsp/StaticTest.java index 66a2826a..67ebfa17 100644 --- a/examples/static/src/test/java/de/halbekunst/cachecontrol/examples/jsp/StaticTest.java +++ b/examples/static/src/test/java/de/halbekunst/cachecontrol/examples/jsp/StaticTest.java @@ -21,7 +21,7 @@ public class StaticTest extends HttpTestCase { @Test public void testStaticContent() throws Exception { - WebResponse response = executeRequest("http://localhost:8080/default.css"); + WebResponse response = executeRequest("http://localhost:8080/static/page.html"); log.info("Title:\t\t{}", response.getTitle()); log.debug("Text:\t\t{}", response.getText()); } diff --git a/examples/static/src/test/java/org/apache/catalina/servlets/DefaultServlet.java b/examples/static/src/test/java/org/apache/catalina/servlets/DefaultServlet.java new file mode 100644 index 00000000..73cfe59d --- /dev/null +++ b/examples/static/src/test/java/org/apache/catalina/servlets/DefaultServlet.java @@ -0,0 +1,12 @@ +package org.apache.catalina.servlets; + +import javax.servlet.http.HttpServlet; + +/** + * Möglichst simple Fake-Implementierung für die Ausführung des Testfalls + * + * @author kai + */ +public class DefaultServlet extends HttpServlet { + +} diff --git a/test/src/main/java/de/halbekunst/juplo/test/HttpTestCase.java b/test/src/main/java/de/halbekunst/juplo/test/HttpTestCase.java index cbf99461..76c46468 100644 --- a/test/src/main/java/de/halbekunst/juplo/test/HttpTestCase.java +++ b/test/src/main/java/de/halbekunst/juplo/test/HttpTestCase.java @@ -8,7 +8,6 @@ import java.io.File; import java.util.Enumeration; import javax.servlet.http.HttpServletRequest; import org.junit.Before; -import org.eclipse.jetty.servlet.DefaultServlet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -39,7 +38,6 @@ public abstract class HttpTestCase { @Before public void init() throws Exception { sr = new ServletRunner(config, ""); // Dies ist der einzige Konstruktor, der die Context-Root der Webapp im Testfall korrekt initialisiert :/ - sr.registerServlet("default", DefaultServlet.class.getName()); client = sr.newClient(); }