projects
/
percentcodec
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
69a9ecf
)
Statische Test-Datei (eine CSS-Datei) zu den Test-Beispielen hinzugefĆ¼gt
author
Kai Moritz
<kai@coolibri.de>
Fri, 1 Jun 2012 23:31:59 +0000
(
01:31
+0200)
committer
Kai Moritz
<kai@coolibri.de>
Thu, 2 Aug 2012 07:03:26 +0000
(09:03 +0200)
cachecontrol-example-jsp/src/main/webapp/WEB-INF/web.xml
patch
|
blob
|
history
cachecontrol-example-jsp/src/main/webapp/default.css
[new file with mode: 0644]
patch
|
blob
cachecontrol-example-jsp/src/main/webapp/page-with-include.jsp
patch
|
blob
|
history
cachecontrol-example-jsp/src/main/webapp/simple-page.jsp
patch
|
blob
|
history
cachecontrol-example-jsp/src/test/java/de/halbekunst/cachecontrol/examples/jsp/JspTest.java
patch
|
blob
|
history
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
f454b87
..
6080872
100644
(file)
--- 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
@@
<filter-name>accelerator</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-name>accelerator</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
-
+ <filter-mapping>
+ <filter-name>accelerator</filter-name>
+ <url-pattern>*.css</url-pattern>
+ </filter-mapping>
</web-app>
</web-app>
diff --git a/cachecontrol-example-jsp/src/main/webapp/default.css
b/cachecontrol-example-jsp/src/main/webapp/default.css
new file mode 100644
(file)
index 0000000..
e04bba2
--- /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
3347af7
..
ba581a4
100644
(file)
--- 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
@@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Page with include</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Page with include</title>
+ <link rel="stylesheet" type="text/css" media="all" href="/default.css">
</head>
<body>
<h1>Hello World!</h1>
</head>
<body>
<h1>Hello World!</h1>
diff --git
a/cachecontrol-example-jsp/src/main/webapp/simple-page.jsp
b/cachecontrol-example-jsp/src/main/webapp/simple-page.jsp
index
23e5779
..
880d761
100644
(file)
--- a/
cachecontrol-example-jsp/src/main/webapp/simple-page.jsp
+++ b/
cachecontrol-example-jsp/src/main/webapp/simple-page.jsp
@@
-5,6
+5,7
@@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Simple Page</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Simple Page</title>
+ <link rel="stylesheet" type="text/css" media="all" href="/default.css">
</head>
<body>
<h1>Hello World!</h1>
</head>
<body>
<h1>Hello World!</h1>
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
26225ab
..
9861068
100644
(file)
--- 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 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;
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());
}
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());
+ }
}
}