WIP
authorKai Moritz <kai@coolibri.de>
Mon, 4 Jun 2012 08:38:30 +0000 (10:38 +0200)
committerKai Moritz <kai@coolibri.de>
Thu, 2 Aug 2012 07:03:26 +0000 (09:03 +0200)
examples/jsp/pom.xml
examples/jsp/src/main/webapp/WEB-INF/views/simple-page.jsp [deleted file]
examples/jsp/src/main/webapp/WEB-INF/web.xml
examples/jsp/src/main/webapp/default.css [deleted file]
examples/jsp/src/main/webapp/index.html [deleted file]
examples/jsp/src/main/webapp/index.jsp [new file with mode: 0644]
examples/jsp/src/main/webapp/page-with-forward.jsp
examples/jsp/src/main/webapp/page-with-include.jsp
examples/jsp/src/main/webapp/simple-page.jsp [deleted file]
examples/jsp/src/test/java/de/halbekunst/cachecontrol/examples/jsp/JspTest.java
examples/pom.xml

index d9f3c6a..7eaed0b 100644 (file)
@@ -10,7 +10,7 @@
     <version>2.0-SNAPSHOT</version>
   </parent>
 
     <version>2.0-SNAPSHOT</version>
   </parent>
 
-  <artifactId>${pom.parent.artifactId}-jsp</artifactId>
+  <artifactId>juplo-examples-jsp</artifactId>
   <packaging>war</packaging>
   <name>Juplo - Examples: JSP-Pages</name>
 
   <packaging>war</packaging>
   <name>Juplo - Examples: JSP-Pages</name>
 
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 (file)
index 194cac5..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<%@page contentType="text/html" pageEncoding="UTF-8" session="false" buffer="1kb" %>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-  <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>
-    <p>This is a really simple page...</p>
-    <p>This version of a really simple page was delivered via SPRING!</p>
-  </body>
-</html>
index 64cdaf7..c5661f8 100644 (file)
     <url-pattern>*.jsp</url-pattern>
   </filter-mapping>
 
     <url-pattern>*.jsp</url-pattern>
   </filter-mapping>
 
-  <filter-mapping>
-    <filter-name>accelerator</filter-name>
-    <url-pattern>*.html</url-pattern>
-  </filter-mapping>
   <filter-mapping>
     <filter-name>accelerator</filter-name>
     <url-pattern>*.jsp</url-pattern>
   </filter-mapping>
   <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>
-  <filter-mapping>
-    <filter-name>accelerator</filter-name>
-    <url-pattern>/test-servlet</url-pattern>
-  </filter-mapping>
-  <filter-mapping>
-    <filter-name>accelerator</filter-name>
-    <url-pattern>/spring/*</url-pattern>
-  </filter-mapping>
-
-
-  <!-- Servlet-Definitions -->
-
-  <servlet>
-    <servlet-name>test-servlet</servlet-name>
-    <servlet-class>de.halbekunst.juplo.test.TestServlet</servlet-class>
-  </servlet>
-
-  <servlet>
-    <servlet-name>dispatcher-servlet</servlet-name>
-    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
-    <init-param>
-      <param-name>contextConfigLocation</param-name>
-      <param-value>
-      </param-value>
-    </init-param>
-    <load-on-startup>1</load-on-startup>
-  </servlet>
-
-
-  <!-- Servlet-Mappings -->
-
-  <servlet-mapping>
-    <servlet-name>test-servlet</servlet-name>
-    <url-pattern>/test-servlet</url-pattern>
-  </servlet-mapping>
-
-  <servlet-mapping>
-    <servlet-name>dispatcher-servlet</servlet-name>
-    <url-pattern>/spring/*</url-pattern>
-  </servlet-mapping>
 
 </web-app>
 
 </web-app>
diff --git a/examples/jsp/src/main/webapp/default.css b/examples/jsp/src/main/webapp/default.css
deleted file mode 100644 (file)
index e04bba2..0000000
+++ /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 (file)
index cd95f2c..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-    <title>Static Page</title>
-    <link rel="stylesheet" type="text/css" media="all" href="/default.css">
-  </head>
-  <body>
-    <h1>Static Page</h1>
-    <p>This page is a static HTML-page</p>
-    <p>At the same time, it gives an overview over all tests...</p>
-    <h2>JSP-Pages</h2>
-    <ul>
-      <li><a href="/simple-page.jsp">A really simple JSP-page</a></li>
-      <li><a href="/page-with-include.jsp">A JSP-page with several includes</a></li>
-      <li><a href="/page-with-forward.jsp">A JSP-page with a forward to /simple-page.jsp</a></li>
-    </ul>
-    <h2>Static Content</h2>
-    <ul>
-      <li><a href="/index.html">A plain static HTML-file (this page!)</a></li>
-      <li><a href="/default.css">A plain static CSS-file</a></li>
-    </ul>
-    <h2>Dynamic Servlet-Answers</h2>
-    <ul>
-      <li><a href="/test-servlet">Empty Answer</a></li>
-      <li><a href="/test-servlet?n=16">16-Bytes-Answer</a></li>
-      <li><a href="/test-servlet?n=32">32-Bytes-Answer</a></li>
-      <li><a href="/test-servlet?n=64">64-Bytes-Answer</a></li>
-      <li><a href="/test-servlet?n=128">128-Bytes-Answer</a></li>
-      <li><a href="/test-servlet?n=256">256-Bytes-Answer</a></li>
-      <li><a href="/test-servlet?n=512">512-Bytes-Answer</a></li>
-      <li><a href="/test-servlet?n=1024">1024-Bytes-Answer</a></li>
-      <li><a href="/test-servlet?n=2048">2048-Bytes-Answer</a></li>
-      <li><a href="/test-servlet?n=4096">4096-Bytes-Answer</a></li>
-      <li><a href="/test-servlet?n=8192">8192-Bytes-Answer</a></li>
-      <li><a href="/test-servlet?n=16384">16384-Bytes-Answer</a></li>
-    </ul>
-  </body>
-</html>
diff --git a/examples/jsp/src/main/webapp/index.jsp b/examples/jsp/src/main/webapp/index.jsp
new file mode 100644 (file)
index 0000000..742231c
--- /dev/null
@@ -0,0 +1,19 @@
+<%@page contentType="text/html" pageEncoding="UTF-8" session="false" buffer="1kb" %>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>Simple Page</title>
+  </head>
+  <body>
+    <h1>Simple Page</h1>
+    <p>This page is a simple jsp-page</p>
+    <p>At the same time, it gives an overview over all tests...</p>
+    <ul>
+      <li><a href="/index.jsp">A really simple JSP-page (this page!)</a></li>
+      <li><a href="/page-with-include.jsp">A JSP-page with several includes</a></li>
+      <li><a href="/page-with-forward.jsp">A JSP-page with a forward to /simple-page.jsp</a></li>
+    </ul>
+  </body>
+</html>
index 35e4905..da8bda0 100644 (file)
@@ -9,6 +9,6 @@
   <body>
     <h1>Hello World!</h1>
     <p>This should not be seen, because the page is forwardes to /simple-page.jsp</p>
   <body>
     <h1>Hello World!</h1>
     <p>This should not be seen, because the page is forwardes to /simple-page.jsp</p>
-    <jsp:forward page="/simple-page.jsp" />
+    <jsp:forward page="/index.jsp" />
   </body>
 </html>
   </body>
 </html>
index ba581a4..3347af7 100644 (file)
@@ -6,7 +6,6 @@
   <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/examples/jsp/src/main/webapp/simple-page.jsp b/examples/jsp/src/main/webapp/simple-page.jsp
deleted file mode 100644 (file)
index 880d761..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<%@page contentType="text/html" pageEncoding="UTF-8" session="false" buffer="1kb" %>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-  <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>
-    <p>This is a really simple page...</p>
-  </body>
-</html>
index 9861068..cce6ae8 100644 (file)
@@ -22,7 +22,7 @@ public class JspTest extends HttpTestCase {
 
   @Test
   public void testSimplePage() throws Exception {
 
   @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());
   }
     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());
   }
     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());
-  }
 }
 }
index 28a64a6..2dd33ce 100644 (file)
@@ -16,6 +16,9 @@
 
   <modules>
     <module>jsp</module>
 
   <modules>
     <module>jsp</module>
+    <module>static</module>
+    <module>servlet</module>
+    <module>spring</module>
   </modules>
 
   <dependencies>
   </modules>
 
   <dependencies>
@@ -77,7 +80,6 @@
       <scope>runtime</scope>
     </dependency>
 
       <scope>runtime</scope>
     </dependency>
 
-
     <!-- Test -->
     <dependency>
       <groupId>${pom.parent.groupId}</groupId>
     <!-- Test -->
     <dependency>
       <groupId>${pom.parent.groupId}</groupId>