+++ /dev/null
-#!/bin/bash
-#
-
-# OutOfMemoryException beim "mvn jetty:run" umgehen und
-# Parameter zum nachträglichen anhängen eines Debuggers
-# setzen
-export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256m -XX:-UseGCOverheadLimit -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n"
-
-rm -v src/main/webapp/WEB-INF/lib/juplo*
-
-mvn jetty:run
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>de.halbekunst</groupId>
- <artifactId>juplo</artifactId>
- <version>2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>${pom.parent.artifactId}-cachecontrol-example-jsp</artifactId>
- <packaging>war</packaging>
- <name>Juplo - CacheControl - Examples: JSP-Page</name>
-
- <dependencies>
-
- <!-- Juplo -->
- <dependency>
- <groupId>${pom.parent.groupId}</groupId>
- <artifactId>${pom.parent.artifactId}-cachecontrol</artifactId>
- <version>${pom.parent.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <!-- JSP-Stuff... -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>${jstl.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <!-- Spring -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-webmvc</artifactId>
- <version>${springframework.version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>${springframework.version}</version>
- <scope>runtime</scope>
- <exclusions>
- <!-- Exclude Commons Logging in favor of SLF4j -->
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-aspects</artifactId>
- <version>${springframework.version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- <version>${aspectj.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <!-- Logging -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>${slf4j.binding}</artifactId>
- <version>${slf4j.version}</version>
- <scope>runtime</scope>
- </dependency>
-
-
- <!-- Test -->
- <dependency>
- <groupId>${pom.parent.groupId}</groupId>
- <artifactId>${pom.parent.artifactId}-test</artifactId>
- <version>${pom.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>jasper</artifactId>
- <version>${jasper.version}</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
- <version>8.0.1.v20110908</version>
- <configuration>
- <connectors>
- <connector implementation="org.eclipse.jetty.server.nio.BlockingChannelConnector">
- <host>0.0.0.0</host>
- <port>8080</port>
- <acceptors>2</acceptors>
- </connector>
- </connectors>
- <scanIntervalSeconds>0</scanIntervalSeconds>
- <scanTargetPatterns>
- <scanTargetPattern>
- <directory>${project.basedir}/src/main/webapp/WEB-INF</directory>
- <excludes>
- <exclude>**/*.jsp</exclude>
- </excludes>
- <includes>
- <include>**/*.properties</include>
- <include>**/*.xml</include>
- </includes>
- </scanTargetPattern>
- </scanTargetPatterns>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>tomcat-maven-plugin</artifactId>
- <version>1.1</version>
- <configuration>
- <path>/</path>
- <uriEncoding>UTF-8</uriEncoding>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
-
- <!-- Activates the AspectJ-Weaver -->
- <context:component-scan base-package="de.halbekunst"/>
- <context:spring-configured/>
-
- <bean id="eTag" class="java.lang.String">
- <constructor-arg value="Hallo Welt!"/>
- </bean>
-
- <bean id="weak" class="java.lang.Boolean">
- <constructor-arg value="true"/>
- </bean>
-
- <bean id="lastModified" class="java.lang.Long">
- <constructor-arg value="1338593731"/>
- </bean>
-
- <bean id="cacheSeconds" class="java.lang.Integer">
- <constructor-arg value="3600"/>
- </bean>
-
- <bean id="simpleUrlHandlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
- <property name="defaultHandler" value="urlFilenameViewController"/>
- </bean>
-
- <bean id="urlFilenameViewController" class="org.springframework.web.servlet.mvc.UrlFilenameViewController"/>
-
- <!-- Resolves view names to protected .jsp resources within the /WEB-INF/views directory -->
- <bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="prefix" value="/WEB-INF/views/"/>
- <property name="suffix" value=".jsp"/>
- </bean>
-
-</beans>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
- <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%p - %C{1}.%M(%L) | %m%n"/>
- </layout>
- </appender>
-
- <logger name="de.halbekunst">
- <level value="trace"/>
- </logger>
-
- <root>
- <level value="info"/>
- <appender-ref ref="CONSOLE"/>
- </root>
-
-</log4j:configuration>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<taglib xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
- version="2.1">
-
- <description>JSTL 1.1 core library</description>
- <display-name>JSTL core</display-name>
- <tlib-version>1.1</tlib-version>
- <short-name>c</short-name>
- <uri>http://java.sun.com/jsp/jstl/core</uri>
-
- <validator>
- <description>
- Provides core validation features for JSTL tags.
- </description>
- <validator-class>
- org.apache.taglibs.standard.tlv.JstlCoreTLV
- </validator-class>
- </validator>
-
- <tag>
- <description>
- Catches any Throwable that occurs in its body and optionally
- exposes it.
- </description>
- <name>catch</name>
- <tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class>
- <body-content>JSP</body-content>
- <attribute>
- <description>
-Name of the exported scoped variable for the
-exception thrown from a nested action. The type of the
-scoped variable is the type of the exception thrown.
- </description>
- <name>var</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- </tag>
-
- <tag>
- <description>
- Simple conditional tag that establishes a context for
- mutually exclusive conditional operations, marked by
- <when> and <otherwise>
- </description>
- <name>choose</name>
- <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
- <body-content>JSP</body-content>
- </tag>
-
- <tag>
- <description>
- Simple conditional tag, which evalutes its body if the
- supplied condition is true and optionally exposes a Boolean
- scripting variable representing the evaluation of this condition
- </description>
- <name>if</name>
- <tag-class>org.apache.taglibs.standard.tag.rt.core.IfTag</tag-class>
- <body-content>JSP</body-content>
- <attribute>
- <description>
-The test condition that determines whether or
-not the body content should be processed.
- </description>
- <name>test</name>
- <required>true</required>
- <rtexprvalue>true</rtexprvalue>
- <type>boolean</type>
- </attribute>
- <attribute>
- <description>
-Name of the exported scoped variable for the
-resulting value of the test condition. The type
-of the scoped variable is Boolean.
- </description>
- <name>var</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Scope for var.
- </description>
- <name>scope</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- </tag>
-
- <tag>
- <description>
- Retrieves an absolute or relative URL and exposes its contents
- to either the page, a String in 'var', or a Reader in 'varReader'.
- </description>
- <name>import</name>
- <tag-class>org.apache.taglibs.standard.tag.rt.core.ImportTag</tag-class>
- <tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class>
- <body-content>JSP</body-content>
- <attribute>
- <description>
-The URL of the resource to import.
- </description>
- <name>url</name>
- <required>true</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Name of the exported scoped variable for the
-resource's content. The type of the scoped
-variable is String.
- </description>
- <name>var</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Scope for var.
- </description>
- <name>scope</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Name of the exported scoped variable for the
-resource's content. The type of the scoped
-variable is Reader.
- </description>
- <name>varReader</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Name of the context when accessing a relative
-URL resource that belongs to a foreign
-context.
- </description>
- <name>context</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Character encoding of the content at the input
-resource.
- </description>
- <name>charEncoding</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
- </tag>
-
- <tag>
- <description>
- The basic iteration tag, accepting many different
- collection types and supporting subsetting and other
- functionality
- </description>
- <name>forEach</name>
- <tag-class>org.apache.taglibs.standard.tag.rt.core.ForEachTag</tag-class>
- <tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class>
- <body-content>JSP</body-content>
- <attribute>
- <description>
-Collection of items to iterate over.
- </description>
- <name>items</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <type>java.lang.Object</type>
- <deferred-value>
- <type>java.lang.Object</type>
- </deferred-value>
- </attribute>
- <attribute>
- <description>
-If items specified:
-Iteration begins at the item located at the
-specified index. First item of the collection has
-index 0.
-If items not specified:
-Iteration begins with index set at the value
-specified.
- </description>
- <name>begin</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <type>int</type>
- </attribute>
- <attribute>
- <description>
-If items specified:
-Iteration ends at the item located at the
-specified index (inclusive).
-If items not specified:
-Iteration ends when index reaches the value
-specified.
- </description>
- <name>end</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <type>int</type>
- </attribute>
- <attribute>
- <description>
-Iteration will only process every step items of
-the collection, starting with the first one.
- </description>
- <name>step</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <type>int</type>
- </attribute>
- <attribute>
- <description>
-Name of the exported scoped variable for the
-current item of the iteration. This scoped
-variable has nested visibility. Its type depends
-on the object of the underlying collection.
- </description>
- <name>var</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Name of the exported scoped variable for the
-status of the iteration. Object exported is of type
-javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested
-visibility.
- </description>
- <name>varStatus</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- </tag>
-
- <tag>
- <description>
- Iterates over tokens, separated by the supplied delimeters
- </description>
- <name>forTokens</name>
- <tag-class>org.apache.taglibs.standard.tag.rt.core.ForTokensTag</tag-class>
- <body-content>JSP</body-content>
- <attribute>
- <description>
-String of tokens to iterate over.
- </description>
- <name>items</name>
- <required>true</required>
- <rtexprvalue>true</rtexprvalue>
- <type>java.lang.String</type>
- <deferred-value>
- <type>java.lang.String</type>
- </deferred-value>
- </attribute>
- <attribute>
- <description>
-The set of delimiters (the characters that
-separate the tokens in the string).
- </description>
- <name>delims</name>
- <required>true</required>
- <rtexprvalue>true</rtexprvalue>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <description>
-Iteration begins at the token located at the
-specified index. First token has index 0.
- </description>
- <name>begin</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <type>int</type>
- </attribute>
- <attribute>
- <description>
-Iteration ends at the token located at the
-specified index (inclusive).
- </description>
- <name>end</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <type>int</type>
- </attribute>
- <attribute>
- <description>
-Iteration will only process every step tokens
-of the string, starting with the first one.
- </description>
- <name>step</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <type>int</type>
- </attribute>
- <attribute>
- <description>
-Name of the exported scoped variable for the
-current item of the iteration. This scoped
-variable has nested visibility.
- </description>
- <name>var</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Name of the exported scoped variable for the
-status of the iteration. Object exported is of
-type
-javax.servlet.jsp.jstl.core.LoopTag
-Status. This scoped variable has nested
-visibility.
- </description>
- <name>varStatus</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- </tag>
-
- <tag>
- <description>
- Like <%= ... >, but for expressions.
- </description>
- <name>out</name>
- <tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class>
- <body-content>JSP</body-content>
- <attribute>
- <description>
-Expression to be evaluated.
- </description>
- <name>value</name>
- <required>true</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Default value if the resulting value is null.
- </description>
- <name>default</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Determines whether characters <,>,&,'," in the
-resulting string should be converted to their
-corresponding character entity codes. Default value is
-true.
- </description>
- <name>escapeXml</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
- </tag>
-
-
- <tag>
- <description>
- Subtag of <choose> that follows <when> tags
- and runs only if all of the prior conditions evaluated to
- 'false'
- </description>
- <name>otherwise</name>
- <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class>
- <body-content>JSP</body-content>
- </tag>
-
- <tag>
- <description>
- Adds a parameter to a containing 'import' tag's URL.
- </description>
- <name>param</name>
- <tag-class>org.apache.taglibs.standard.tag.rt.core.ParamTag</tag-class>
- <body-content>JSP</body-content>
- <attribute>
- <description>
-Name of the query string parameter.
- </description>
- <name>name</name>
- <required>true</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Value of the parameter.
- </description>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
- </tag>
-
- <tag>
- <description>
- Redirects to a new URL.
- </description>
- <name>redirect</name>
- <tag-class>org.apache.taglibs.standard.tag.rt.core.RedirectTag</tag-class>
- <body-content>JSP</body-content>
- <attribute>
- <description>
-The URL of the resource to redirect to.
- </description>
- <name>url</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Name of the context when redirecting to a relative URL
-resource that belongs to a foreign context.
- </description>
- <name>context</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
- </tag>
-
- <tag>
- <description>
- Removes a scoped variable (from a particular scope, if specified).
- </description>
- <name>remove</name>
- <tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class>
- <body-content>empty</body-content>
- <attribute>
- <description>
-Name of the scoped variable to be removed.
- </description>
- <name>var</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Scope for var.
- </description>
- <name>scope</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- </tag>
-
- <tag>
- <description>
- Sets the result of an expression evaluation in a 'scope'
- </description>
- <name>set</name>
- <tag-class>org.apache.taglibs.standard.tag.rt.core.SetTag</tag-class>
- <body-content>JSP</body-content>
- <attribute>
- <description>
-Name of the exported scoped variable to hold the value
-specified in the action. The type of the scoped variable is
-whatever type the value expression evaluates to.
- </description>
- <name>var</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Expression to be evaluated.
- </description>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <deferred-value>
- <type>java.lang.Object</type>
- </deferred-value>
- </attribute>
- <attribute>
- <description>
-Target object whose property will be set. Must evaluate to
-a JavaBeans object with setter property property, or to a
-java.util.Map object.
- </description>
- <name>target</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Name of the property to be set in the target object.
- </description>
- <name>property</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Scope for var.
- </description>
- <name>scope</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- </tag>
-
- <tag>
- <description>
- Creates a URL with optional query parameters.
- </description>
- <name>url</name>
- <tag-class>org.apache.taglibs.standard.tag.rt.core.UrlTag</tag-class>
- <body-content>JSP</body-content>
- <attribute>
- <description>
-Name of the exported scoped variable for the
-processed url. The type of the scoped variable is
-String.
- </description>
- <name>var</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Scope for var.
- </description>
- <name>scope</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-URL to be processed.
- </description>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
- <attribute>
- <description>
-Name of the context when specifying a relative URL
-resource that belongs to a foreign context.
- </description>
- <name>context</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
- </tag>
-
- <tag>
- <description>
- Subtag of <choose> that includes its body if its
- condition evalutes to 'true'
- </description>
- <name>when</name>
- <tag-class>org.apache.taglibs.standard.tag.rt.core.WhenTag</tag-class>
- <body-content>JSP</body-content>
- <attribute>
- <description>
-The test condition that determines whether or not the
-body content should be processed.
- </description>
- <name>test</name>
- <required>true</required>
- <rtexprvalue>true</rtexprvalue>
- <type>boolean</type>
- </attribute>
- </tag>
-
-</taglib>
+++ /dev/null
-<%@page contentType="text/html" pageEncoding="UTF-8" session="false"%>
-<p>Hello World, again...</p>
+++ /dev/null
-<%@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>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
-
- <!-- Context Configuration locations for Spring XML files -->
-
- <context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>classpath:/config.xml</param-value>
- </context-param>
-
-
- <!-- Listener-Definitions -->
-
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
-
-
- <!-- Filter-Definitions -->
-
- <filter>
- <filter-name>accelerator</filter-name>
- <filter-class>de.halbekunst.juplo.cachecontrol.AcceleratorFilter</filter-class>
- </filter>
-
- <filter>
- <filter-name>logger</filter-name>
- <filter-class>de.halbekunst.juplo.test.LoggingHttpServletResponseFilter</filter-class>
- </filter>
-
-
- <!-- Filter-Mappings -->
-
- <filter-mapping>
- <filter-name>logger</filter-name>
- <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>*.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>
+++ /dev/null
-body {
- background-color: #ccc;
- color: #444;
-}
-h1,h2,h3,h4 {
- color: #000;
-}
\ No newline at end of file
+++ /dev/null
-<!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>
+++ /dev/null
-<%@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>Page with forward</title>
- </head>
- <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" />
- </body>
-</html>
+++ /dev/null
-<%@page contentType="text/html" pageEncoding="UTF-8" session="false" buffer="1kb" %>
-<%@taglib uri="/WEB-INF/c.tld" prefix="c"%>
-<!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>Page with include</title>
- <link rel="stylesheet" type="text/css" media="all" href="/default.css">
- </head>
- <body>
- <h1>Hello World!</h1>
- <c:forEach var="i" begin="1" end="100" step="1">${i}:<jsp:include page="/WEB-INF/included.jsp" /></c:forEach>
- </body>
-</html>
+++ /dev/null
-<%@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>
+++ /dev/null
-package de.halbekunst.cachecontrol.examples.jsp;
-
-import de.halbekunst.juplo.test.HttpTestCase;
-import com.meterware.httpunit.WebResponse;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- * @author kai
- */
-public class JspTest extends HttpTestCase {
-
- private static final Logger log = LoggerFactory.getLogger(JspTest.class);
-
-
- public JspTest() {
- super("src/main/webapp/WEB-INF/web.xml");
- }
-
-
- @Test
- public void testSimplePage() throws Exception {
- WebResponse response = executeRequest("http://localhost:8080/simple-page.jsp");
- log.info("Title:\t\t{}", response.getTitle());
- log.debug("Text:\t\t{}", response.getText());
- }
-
- @Test
- public void testPageWithInclude() throws Exception {
- WebResponse response = executeRequest("http://localhost:8080/page-with-include.jsp");
- log.info("Title:\t\t{}", response.getTitle());
- log.debug("Text:\t\t{}", response.getText());
- }
-
- @Test
- public void testPageWithForward() throws Exception {
- WebResponse response = executeRequest("http://localhost:8080/page-with-forward.jsp");
- 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());
- }
-}
+++ /dev/null
-#!/bin/bash
-#
-
-# OutOfMemoryException beim "mvn jetty:run" umgehen und
-# Parameter zum nachträglichen anhängen eines Debuggers
-# setzen
-export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256m -XX:-UseGCOverheadLimit -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n"
-
-rm -v src/main/webapp/WEB-INF/lib/juplo*
-
-mvn tomcat:run-war
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
+ <nextCatalog catalog="../.netbeans/6.9/var/cache/mavencachedirs/586500746/retriever/catalog.xml"/>
+</catalog>
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+#
+
+# OutOfMemoryException beim "mvn jetty:run" umgehen und
+# Parameter zum nachträglichen anhängen eines Debuggers
+# setzen
+export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256m -XX:-UseGCOverheadLimit -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n"
+
+rm -v src/main/webapp/WEB-INF/lib/juplo*
+
+mvn jetty:run
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>de.halbekunst</groupId>
+ <artifactId>juplo-examples</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>${pom.parent.artifactId}-jsp</artifactId>
+ <packaging>war</packaging>
+ <name>Juplo - Examples: JSP-Pages</name>
+
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+ <!-- Activates the AspectJ-Weaver -->
+ <context:component-scan base-package="de.halbekunst"/>
+ <context:spring-configured/>
+
+ <bean id="eTag" class="java.lang.String">
+ <constructor-arg value="Hallo Welt!"/>
+ </bean>
+
+ <bean id="weak" class="java.lang.Boolean">
+ <constructor-arg value="true"/>
+ </bean>
+
+ <bean id="lastModified" class="java.lang.Long">
+ <constructor-arg value="1338593731"/>
+ </bean>
+
+ <bean id="cacheSeconds" class="java.lang.Integer">
+ <constructor-arg value="3600"/>
+ </bean>
+
+ <bean id="simpleUrlHandlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
+ <property name="defaultHandler" value="urlFilenameViewController"/>
+ </bean>
+
+ <bean id="urlFilenameViewController" class="org.springframework.web.servlet.mvc.UrlFilenameViewController"/>
+
+ <!-- Resolves view names to protected .jsp resources within the /WEB-INF/views directory -->
+ <bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
+ <property name="prefix" value="/WEB-INF/views/"/>
+ <property name="suffix" value=".jsp"/>
+ </bean>
+
+</beans>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%p - %C{1}.%M(%L) | %m%n"/>
+ </layout>
+ </appender>
+
+ <logger name="de.halbekunst">
+ <level value="trace"/>
+ </logger>
+
+ <root>
+ <level value="info"/>
+ <appender-ref ref="CONSOLE"/>
+ </root>
+
+</log4j:configuration>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<taglib xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+ version="2.1">
+
+ <description>JSTL 1.1 core library</description>
+ <display-name>JSTL core</display-name>
+ <tlib-version>1.1</tlib-version>
+ <short-name>c</short-name>
+ <uri>http://java.sun.com/jsp/jstl/core</uri>
+
+ <validator>
+ <description>
+ Provides core validation features for JSTL tags.
+ </description>
+ <validator-class>
+ org.apache.taglibs.standard.tlv.JstlCoreTLV
+ </validator-class>
+ </validator>
+
+ <tag>
+ <description>
+ Catches any Throwable that occurs in its body and optionally
+ exposes it.
+ </description>
+ <name>catch</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+exception thrown from a nested action. The type of the
+scoped variable is the type of the exception thrown.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Simple conditional tag that establishes a context for
+ mutually exclusive conditional operations, marked by
+ <when> and <otherwise>
+ </description>
+ <name>choose</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
+ <body-content>JSP</body-content>
+ </tag>
+
+ <tag>
+ <description>
+ Simple conditional tag, which evalutes its body if the
+ supplied condition is true and optionally exposes a Boolean
+ scripting variable representing the evaluation of this condition
+ </description>
+ <name>if</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.IfTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+The test condition that determines whether or
+not the body content should be processed.
+ </description>
+ <name>test</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>boolean</type>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+resulting value of the test condition. The type
+of the scoped variable is Boolean.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope for var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Retrieves an absolute or relative URL and exposes its contents
+ to either the page, a String in 'var', or a Reader in 'varReader'.
+ </description>
+ <name>import</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ImportTag</tag-class>
+ <tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+The URL of the resource to import.
+ </description>
+ <name>url</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+resource's content. The type of the scoped
+variable is String.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope for var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+resource's content. The type of the scoped
+variable is Reader.
+ </description>
+ <name>varReader</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the context when accessing a relative
+URL resource that belongs to a foreign
+context.
+ </description>
+ <name>context</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Character encoding of the content at the input
+resource.
+ </description>
+ <name>charEncoding</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ The basic iteration tag, accepting many different
+ collection types and supporting subsetting and other
+ functionality
+ </description>
+ <name>forEach</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ForEachTag</tag-class>
+ <tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Collection of items to iterate over.
+ </description>
+ <name>items</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.lang.Object</type>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <description>
+If items specified:
+Iteration begins at the item located at the
+specified index. First item of the collection has
+index 0.
+If items not specified:
+Iteration begins with index set at the value
+specified.
+ </description>
+ <name>begin</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+If items specified:
+Iteration ends at the item located at the
+specified index (inclusive).
+If items not specified:
+Iteration ends when index reaches the value
+specified.
+ </description>
+ <name>end</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+Iteration will only process every step items of
+the collection, starting with the first one.
+ </description>
+ <name>step</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+current item of the iteration. This scoped
+variable has nested visibility. Its type depends
+on the object of the underlying collection.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+status of the iteration. Object exported is of type
+javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested
+visibility.
+ </description>
+ <name>varStatus</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Iterates over tokens, separated by the supplied delimeters
+ </description>
+ <name>forTokens</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ForTokensTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+String of tokens to iterate over.
+ </description>
+ <name>items</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.lang.String</type>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <description>
+The set of delimiters (the characters that
+separate the tokens in the string).
+ </description>
+ <name>delims</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>
+Iteration begins at the token located at the
+specified index. First token has index 0.
+ </description>
+ <name>begin</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+Iteration ends at the token located at the
+specified index (inclusive).
+ </description>
+ <name>end</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+Iteration will only process every step tokens
+of the string, starting with the first one.
+ </description>
+ <name>step</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+current item of the iteration. This scoped
+variable has nested visibility.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+status of the iteration. Object exported is of
+type
+javax.servlet.jsp.jstl.core.LoopTag
+Status. This scoped variable has nested
+visibility.
+ </description>
+ <name>varStatus</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Like <%= ... >, but for expressions.
+ </description>
+ <name>out</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Expression to be evaluated.
+ </description>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Default value if the resulting value is null.
+ </description>
+ <name>default</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Determines whether characters <,>,&,'," in the
+resulting string should be converted to their
+corresponding character entity codes. Default value is
+true.
+ </description>
+ <name>escapeXml</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+
+ <tag>
+ <description>
+ Subtag of <choose> that follows <when> tags
+ and runs only if all of the prior conditions evaluated to
+ 'false'
+ </description>
+ <name>otherwise</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class>
+ <body-content>JSP</body-content>
+ </tag>
+
+ <tag>
+ <description>
+ Adds a parameter to a containing 'import' tag's URL.
+ </description>
+ <name>param</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ParamTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Name of the query string parameter.
+ </description>
+ <name>name</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Value of the parameter.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Redirects to a new URL.
+ </description>
+ <name>redirect</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.RedirectTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+The URL of the resource to redirect to.
+ </description>
+ <name>url</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the context when redirecting to a relative URL
+resource that belongs to a foreign context.
+ </description>
+ <name>context</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Removes a scoped variable (from a particular scope, if specified).
+ </description>
+ <name>remove</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <description>
+Name of the scoped variable to be removed.
+ </description>
+ <name>var</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope for var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Sets the result of an expression evaluation in a 'scope'
+ </description>
+ <name>set</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.SetTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Name of the exported scoped variable to hold the value
+specified in the action. The type of the scoped variable is
+whatever type the value expression evaluates to.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Expression to be evaluated.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <description>
+Target object whose property will be set. Must evaluate to
+a JavaBeans object with setter property property, or to a
+java.util.Map object.
+ </description>
+ <name>target</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the property to be set in the target object.
+ </description>
+ <name>property</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope for var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Creates a URL with optional query parameters.
+ </description>
+ <name>url</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.UrlTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+processed url. The type of the scoped variable is
+String.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope for var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+URL to be processed.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the context when specifying a relative URL
+resource that belongs to a foreign context.
+ </description>
+ <name>context</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Subtag of <choose> that includes its body if its
+ condition evalutes to 'true'
+ </description>
+ <name>when</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.WhenTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+The test condition that determines whether or not the
+body content should be processed.
+ </description>
+ <name>test</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>boolean</type>
+ </attribute>
+ </tag>
+
+</taglib>
--- /dev/null
+<%@page contentType="text/html" pageEncoding="UTF-8" session="false"%>
+<p>Hello World, again...</p>
--- /dev/null
+<%@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>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <!-- Context Configuration locations for Spring XML files -->
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>classpath:/config.xml</param-value>
+ </context-param>
+
+
+ <!-- Listener-Definitions -->
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+
+
+ <!-- Filter-Definitions -->
+
+ <filter>
+ <filter-name>accelerator</filter-name>
+ <filter-class>de.halbekunst.juplo.cachecontrol.AcceleratorFilter</filter-class>
+ </filter>
+
+ <filter>
+ <filter-name>logger</filter-name>
+ <filter-class>de.halbekunst.juplo.test.LoggingHttpServletResponseFilter</filter-class>
+ </filter>
+
+
+ <!-- Filter-Mappings -->
+
+ <filter-mapping>
+ <filter-name>logger</filter-name>
+ <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>*.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>
--- /dev/null
+body {
+ background-color: #ccc;
+ color: #444;
+}
+h1,h2,h3,h4 {
+ color: #000;
+}
\ No newline at end of file
--- /dev/null
+<!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>
--- /dev/null
+<%@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>Page with forward</title>
+ </head>
+ <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" />
+ </body>
+</html>
--- /dev/null
+<%@page contentType="text/html" pageEncoding="UTF-8" session="false" buffer="1kb" %>
+<%@taglib uri="/WEB-INF/c.tld" prefix="c"%>
+<!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>Page with include</title>
+ <link rel="stylesheet" type="text/css" media="all" href="/default.css">
+ </head>
+ <body>
+ <h1>Hello World!</h1>
+ <c:forEach var="i" begin="1" end="100" step="1">${i}:<jsp:include page="/WEB-INF/included.jsp" /></c:forEach>
+ </body>
+</html>
--- /dev/null
+<%@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>
--- /dev/null
+package de.halbekunst.cachecontrol.examples.jsp;
+
+import de.halbekunst.juplo.test.HttpTestCase;
+import com.meterware.httpunit.WebResponse;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * @author kai
+ */
+public class JspTest extends HttpTestCase {
+
+ private static final Logger log = LoggerFactory.getLogger(JspTest.class);
+
+
+ public JspTest() {
+ super("src/main/webapp/WEB-INF/web.xml");
+ }
+
+
+ @Test
+ public void testSimplePage() throws Exception {
+ WebResponse response = executeRequest("http://localhost:8080/simple-page.jsp");
+ log.info("Title:\t\t{}", response.getTitle());
+ log.debug("Text:\t\t{}", response.getText());
+ }
+
+ @Test
+ public void testPageWithInclude() throws Exception {
+ WebResponse response = executeRequest("http://localhost:8080/page-with-include.jsp");
+ log.info("Title:\t\t{}", response.getTitle());
+ log.debug("Text:\t\t{}", response.getText());
+ }
+
+ @Test
+ public void testPageWithForward() throws Exception {
+ WebResponse response = executeRequest("http://localhost:8080/page-with-forward.jsp");
+ 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());
+ }
+}
--- /dev/null
+#!/bin/bash
+#
+
+# OutOfMemoryException beim "mvn jetty:run" umgehen und
+# Parameter zum nachträglichen anhängen eines Debuggers
+# setzen
+export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256m -XX:-UseGCOverheadLimit -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n"
+
+rm -v src/main/webapp/WEB-INF/lib/juplo*
+
+mvn tomcat:run-war
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>de.halbekunst</groupId>
+ <artifactId>juplo</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>juplo-examples</artifactId>
+ <packaging>pom</packaging>
+ <name>Juplo - Examples</name>
+
+ <modules>
+ <module>jsp</module>
+ </modules>
+
+ <dependencies>
+
+ <!-- Juplo -->
+ <dependency>
+ <groupId>${pom.parent.groupId}</groupId>
+ <artifactId>juplo-cachecontrol</artifactId>
+ <version>${pom.parent.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- JSP-Stuff... -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>${jstl.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- Spring -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>${springframework.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${springframework.version}</version>
+ <scope>runtime</scope>
+ <exclusions>
+ <!-- Exclude Commons Logging in favor of SLF4j -->
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aspects</artifactId>
+ <version>${springframework.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ <version>${aspectj.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- Logging -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>${slf4j.binding}</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+
+ <!-- Test -->
+ <dependency>
+ <groupId>${pom.parent.groupId}</groupId>
+ <artifactId>juplo-test</artifactId>
+ <version>${pom.parent.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>jasper</artifactId>
+ <version>${jasper.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>8.0.1.v20110908</version>
+ <configuration>
+ <connectors>
+ <connector implementation="org.eclipse.jetty.server.nio.BlockingChannelConnector">
+ <host>0.0.0.0</host>
+ <port>8080</port>
+ <acceptors>2</acceptors>
+ </connector>
+ </connectors>
+ <scanIntervalSeconds>0</scanIntervalSeconds>
+ <scanTargetPatterns>
+ <scanTargetPattern>
+ <directory>${project.basedir}/src/main/webapp/WEB-INF</directory>
+ <excludes>
+ <exclude>**/*.jsp</exclude>
+ </excludes>
+ <includes>
+ <include>**/*.properties</include>
+ <include>**/*.xml</include>
+ </includes>
+ </scanTargetPattern>
+ </scanTargetPatterns>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>tomcat-maven-plugin</artifactId>
+ <version>1.1</version>
+ <configuration>
+ <path>/</path>
+ <uriEncoding>UTF-8</uriEncoding>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
<modules>
<module>test</module>
<module>cachecontrol</module>
- <module>cachecontrol-example-jsp</module>
+ <module>examples</module>
</modules>
<properties>