From b731c26862623b88b1de40461e25bc5385f93448 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Mon, 4 Jun 2012 10:38:30 +0200 Subject: [PATCH] WIP --- examples/jsp/pom.xml | 2 +- .../main/webapp/WEB-INF/views/simple-page.jsp | 15 ------ examples/jsp/src/main/webapp/WEB-INF/web.xml | 48 ------------------- examples/jsp/src/main/webapp/default.css | 7 --- examples/jsp/src/main/webapp/index.html | 40 ---------------- examples/jsp/src/main/webapp/index.jsp | 19 ++++++++ .../jsp/src/main/webapp/page-with-forward.jsp | 2 +- .../jsp/src/main/webapp/page-with-include.jsp | 1 - examples/jsp/src/main/webapp/simple-page.jsp | 14 ------ .../cachecontrol/examples/jsp/JspTest.java | 9 +--- examples/pom.xml | 4 +- 11 files changed, 25 insertions(+), 136 deletions(-) delete mode 100644 examples/jsp/src/main/webapp/WEB-INF/views/simple-page.jsp delete mode 100644 examples/jsp/src/main/webapp/default.css delete mode 100644 examples/jsp/src/main/webapp/index.html create mode 100644 examples/jsp/src/main/webapp/index.jsp delete mode 100644 examples/jsp/src/main/webapp/simple-page.jsp diff --git a/examples/jsp/pom.xml b/examples/jsp/pom.xml index d9f3c6a2..7eaed0bd 100644 --- a/examples/jsp/pom.xml +++ b/examples/jsp/pom.xml @@ -10,7 +10,7 @@ 2.0-SNAPSHOT - ${pom.parent.artifactId}-jsp + juplo-examples-jsp war Juplo - Examples: JSP-Pages diff --git a/examples/jsp/src/main/webapp/WEB-INF/views/simple-page.jsp b/examples/jsp/src/main/webapp/WEB-INF/views/simple-page.jsp deleted file mode 100644 index 194cac5b..00000000 --- a/examples/jsp/src/main/webapp/WEB-INF/views/simple-page.jsp +++ /dev/null @@ -1,15 +0,0 @@ -<%@page contentType="text/html" pageEncoding="UTF-8" session="false" buffer="1kb" %> - - - - - - Simple Page - - - -

Hello World!

-

This is a really simple page...

-

This version of a really simple page was delivered via SPRING!

- - diff --git a/examples/jsp/src/main/webapp/WEB-INF/web.xml b/examples/jsp/src/main/webapp/WEB-INF/web.xml index 64cdaf70..c5661f84 100644 --- a/examples/jsp/src/main/webapp/WEB-INF/web.xml +++ b/examples/jsp/src/main/webapp/WEB-INF/web.xml @@ -38,57 +38,9 @@ *.jsp - - accelerator - *.html - accelerator *.jsp - - accelerator - *.css - - - accelerator - /test-servlet - - - accelerator - /spring/* - - - - - - - test-servlet - de.halbekunst.juplo.test.TestServlet - - - - dispatcher-servlet - org.springframework.web.servlet.DispatcherServlet - - contextConfigLocation - - - - 1 - - - - - - - test-servlet - /test-servlet - - - - dispatcher-servlet - /spring/* - diff --git a/examples/jsp/src/main/webapp/default.css b/examples/jsp/src/main/webapp/default.css deleted file mode 100644 index e04bba27..00000000 --- a/examples/jsp/src/main/webapp/default.css +++ /dev/null @@ -1,7 +0,0 @@ -body { - background-color: #ccc; - color: #444; -} -h1,h2,h3,h4 { - color: #000; -} \ No newline at end of file diff --git a/examples/jsp/src/main/webapp/index.html b/examples/jsp/src/main/webapp/index.html deleted file mode 100644 index cd95f2c5..00000000 --- a/examples/jsp/src/main/webapp/index.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Static Page - - - -

Static Page

-

This page is a static HTML-page

-

At the same time, it gives an overview over all tests...

-

JSP-Pages

- -

Static Content

- -

Dynamic Servlet-Answers

- - - diff --git a/examples/jsp/src/main/webapp/index.jsp b/examples/jsp/src/main/webapp/index.jsp new file mode 100644 index 00000000..742231c3 --- /dev/null +++ b/examples/jsp/src/main/webapp/index.jsp @@ -0,0 +1,19 @@ +<%@page contentType="text/html" pageEncoding="UTF-8" session="false" buffer="1kb" %> + + + + + + Simple Page + + +

Simple Page

+

This page is a simple jsp-page

+

At the same time, it gives an overview over all tests...

+ + + diff --git a/examples/jsp/src/main/webapp/page-with-forward.jsp b/examples/jsp/src/main/webapp/page-with-forward.jsp index 35e49058..da8bda0e 100644 --- a/examples/jsp/src/main/webapp/page-with-forward.jsp +++ b/examples/jsp/src/main/webapp/page-with-forward.jsp @@ -9,6 +9,6 @@

Hello World!

This should not be seen, because the page is forwardes to /simple-page.jsp

- + diff --git a/examples/jsp/src/main/webapp/page-with-include.jsp b/examples/jsp/src/main/webapp/page-with-include.jsp index ba581a46..3347af77 100644 --- a/examples/jsp/src/main/webapp/page-with-include.jsp +++ b/examples/jsp/src/main/webapp/page-with-include.jsp @@ -6,7 +6,6 @@ Page with include -

Hello World!

diff --git a/examples/jsp/src/main/webapp/simple-page.jsp b/examples/jsp/src/main/webapp/simple-page.jsp deleted file mode 100644 index 880d7611..00000000 --- a/examples/jsp/src/main/webapp/simple-page.jsp +++ /dev/null @@ -1,14 +0,0 @@ -<%@page contentType="text/html" pageEncoding="UTF-8" session="false" buffer="1kb" %> - - - - - - Simple Page - - - -

Hello World!

-

This is a really simple page...

- - diff --git a/examples/jsp/src/test/java/de/halbekunst/cachecontrol/examples/jsp/JspTest.java b/examples/jsp/src/test/java/de/halbekunst/cachecontrol/examples/jsp/JspTest.java index 9861068b..cce6ae8e 100644 --- a/examples/jsp/src/test/java/de/halbekunst/cachecontrol/examples/jsp/JspTest.java +++ b/examples/jsp/src/test/java/de/halbekunst/cachecontrol/examples/jsp/JspTest.java @@ -22,7 +22,7 @@ public class JspTest extends HttpTestCase { @Test public void testSimplePage() throws Exception { - WebResponse response = executeRequest("http://localhost:8080/simple-page.jsp"); + WebResponse response = executeRequest("http://localhost:8080/index.jsp"); log.info("Title:\t\t{}", response.getTitle()); log.debug("Text:\t\t{}", response.getText()); } @@ -40,11 +40,4 @@ 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()); - } } diff --git a/examples/pom.xml b/examples/pom.xml index 28a64a6b..2dd33ce4 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -16,6 +16,9 @@ jsp + static + servlet + spring @@ -77,7 +80,6 @@ runtime - ${pom.parent.groupId} -- 2.20.1