From 50d98cb69e831b62993a87ed6620514d4b147683 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 2 Jun 2012 01:31:59 +0200 Subject: [PATCH 1/1] =?utf8?q?Statische=20Test-Datei=20(eine=20CSS-Datei)?= =?utf8?q?=20zu=20den=20Test-Beispielen=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- cachecontrol-example-jsp/src/main/webapp/WEB-INF/web.xml | 5 ++++- cachecontrol-example-jsp/src/main/webapp/default.css | 7 +++++++ .../src/main/webapp/page-with-include.jsp | 1 + cachecontrol-example-jsp/src/main/webapp/simple-page.jsp | 1 + .../de/halbekunst/cachecontrol/examples/jsp/JspTest.java | 8 +++++++- 5 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 cachecontrol-example-jsp/src/main/webapp/default.css diff --git a/cachecontrol-example-jsp/src/main/webapp/WEB-INF/web.xml b/cachecontrol-example-jsp/src/main/webapp/WEB-INF/web.xml index f454b87f..60808729 100644 --- a/cachecontrol-example-jsp/src/main/webapp/WEB-INF/web.xml +++ b/cachecontrol-example-jsp/src/main/webapp/WEB-INF/web.xml @@ -32,6 +32,9 @@ accelerator *.jsp - + + accelerator + *.css + diff --git a/cachecontrol-example-jsp/src/main/webapp/default.css b/cachecontrol-example-jsp/src/main/webapp/default.css new file mode 100644 index 00000000..e04bba27 --- /dev/null +++ b/cachecontrol-example-jsp/src/main/webapp/default.css @@ -0,0 +1,7 @@ +body { + background-color: #ccc; + color: #444; +} +h1,h2,h3,h4 { + color: #000; +} \ No newline at end of file diff --git a/cachecontrol-example-jsp/src/main/webapp/page-with-include.jsp b/cachecontrol-example-jsp/src/main/webapp/page-with-include.jsp index 3347af77..ba581a46 100644 --- a/cachecontrol-example-jsp/src/main/webapp/page-with-include.jsp +++ b/cachecontrol-example-jsp/src/main/webapp/page-with-include.jsp @@ -6,6 +6,7 @@ Page with include +

Hello World!

diff --git a/cachecontrol-example-jsp/src/main/webapp/simple-page.jsp b/cachecontrol-example-jsp/src/main/webapp/simple-page.jsp index 23e57793..880d7611 100644 --- a/cachecontrol-example-jsp/src/main/webapp/simple-page.jsp +++ b/cachecontrol-example-jsp/src/main/webapp/simple-page.jsp @@ -5,6 +5,7 @@ Simple Page +

Hello World!

diff --git a/cachecontrol-example-jsp/src/test/java/de/halbekunst/cachecontrol/examples/jsp/JspTest.java b/cachecontrol-example-jsp/src/test/java/de/halbekunst/cachecontrol/examples/jsp/JspTest.java index 26225ab9..9861068b 100644 --- a/cachecontrol-example-jsp/src/test/java/de/halbekunst/cachecontrol/examples/jsp/JspTest.java +++ b/cachecontrol-example-jsp/src/test/java/de/halbekunst/cachecontrol/examples/jsp/JspTest.java @@ -2,7 +2,6 @@ package de.halbekunst.cachecontrol.examples.jsp; import de.halbekunst.juplo.test.HttpTestCase; import com.meterware.httpunit.WebResponse; -import com.meterware.servletunit.InvocationContext; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,4 +40,11 @@ public class JspTest extends HttpTestCase { log.info("Title:\t\t{}", response.getTitle()); log.debug("Text:\t\t{}", response.getText()); } + + @Test + public void testStaticContent() throws Exception { + WebResponse response = executeRequest("http://localhost:8080/default.css"); + log.info("Title:\t\t{}", response.getTitle()); + log.debug("Text:\t\t{}", response.getText()); + } } -- 2.20.1