<packaging>war</packaging>
<name>Juplo - Examples: Static Content</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>${commons-io.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
</project>
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
*/
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());
+ }
}
<!-- Verwendete Versionen -->
<aspectj.version>1.6.11</aspectj.version>
+ <commons-io.version>1.3.2</commons-io.version>
<httpunit.version>1.7.1</httpunit.version>
<jasper.version>6.0.29</jasper.version>
<jetty.version>8.1.4.v20120524</jetty.version>