From: Kai Moritz Date: Mon, 18 Jun 2012 23:55:48 +0000 (+0200) Subject: WIP: Versuch den StaticTest zu reparieren... X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=d6abb9cc871b327b23dbfb9644ff0416753133f3;p=percentcodec WIP: Versuch den StaticTest zu reparieren... --- diff --git a/examples/static/pom.xml b/examples/static/pom.xml index bbe5b9bc..5cf0634f 100644 --- a/examples/static/pom.xml +++ b/examples/static/pom.xml @@ -14,4 +14,13 @@ war Juplo - Examples: Static Content + + + org.apache.commons + commons-io + ${commons-io.version} + test + + + 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 index 73cfe59d..e96c37ef 100644 --- a/examples/static/src/test/java/org/apache/catalina/servlets/DefaultServlet.java +++ b/examples/static/src/test/java/org/apache/catalina/servlets/DefaultServlet.java @@ -1,6 +1,11 @@ package org.apache.catalina.servlets; +import java.io.IOException; +import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.io.IOUtils; /** * Möglichst simple Fake-Implementierung für die Ausführung des Testfalls @@ -9,4 +14,8 @@ import javax.servlet.http.HttpServlet; */ public class DefaultServlet extends HttpServlet { + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + IOUtils.copy(DefaultServlet.class.getResourceAsStream(request.getRequestURI()), response.getOutputStream()); + } } diff --git a/pom.xml b/pom.xml index cc305ec0..8c63f411 100644 --- a/pom.xml +++ b/pom.xml @@ -36,6 +36,7 @@ 1.6.11 + 1.3.2 1.7.1 6.0.29 8.1.4.v20120524