Bug 491054 Adds recipe "Building a web app with taglibs"
diff --git a/recipe-taglibs/.gitignore b/recipe-taglibs/.gitignore
new file mode 100644
index 0000000..244e5f9
--- /dev/null
+++ b/recipe-taglibs/.gitignore
@@ -0,0 +1,2 @@
+**/META-INF/MANIFEST.MF
+
diff --git a/recipe-taglibs/README.md b/recipe-taglibs/README.md
new file mode 100644
index 0000000..fd375a1
--- /dev/null
+++ b/recipe-taglibs/README.md
@@ -0,0 +1,3 @@
+TODO
+
+Sample URL: http://localhost:8080/taglibs/app/sample.htm
diff --git a/recipe-taglibs/app/build.gradle b/recipe-taglibs/app/build.gradle
new file mode 100644
index 0000000..9d6c235
--- /dev/null
+++ b/recipe-taglibs/app/build.gradle
@@ -0,0 +1,32 @@
+// add the build task 'clean'
+apply plugin: 'base'
+
+// add the build task 'dockerize'
+apply plugin: "com.eclipsesource.dockerizor"
+
+dockerize.dependsOn ':web-bundle:build'
+
+dockerizor {
+ repository = 'virgo-recipe/taglibs'
+ maintainer = 'Florian Waibel <fwaibel@eclipsesource.com>'
+ description = 'Virgo Recipe taglibs created with Gradle Plugin: com.eclipsesource.dockerizor'
+
+ javaImage = 'java:openjdk-8u72-jre'
+
+ createLocalCopy = true
+
+ virgoFlavour = 'VTS'
+ virgoVersion = 'latest'
+
+ pickupFiles = ['recipe-taglibs.plan']
+
+ removeAdminConsole = false
+}
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ repositoryUsr project(':web-bundle')
+}
diff --git a/recipe-taglibs/app/recipe-taglibs.plan b/recipe-taglibs/app/recipe-taglibs.plan
new file mode 100644
index 0000000..4014df2
--- /dev/null
+++ b/recipe-taglibs/app/recipe-taglibs.plan
@@ -0,0 +1,9 @@
+<plan name="recipe-mongodb" version="0.1" scoped="false" atomic="true"
+ xmlns="http://www.eclipse.org/virgo/schema/plan"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.eclipse.org/virgo/schema/plan
+ http://www.eclipse.org/virgo/schema/plan/eclipse-virgo-plan.xsd">
+
+ <artifact type="bundle" name="org.eclipse.virgo.guides.mongodb" version="[0.1, 1)" />
+</plan>
diff --git a/recipe-taglibs/build.gradle b/recipe-taglibs/build.gradle
new file mode 100644
index 0000000..d55b779
--- /dev/null
+++ b/recipe-taglibs/build.gradle
@@ -0,0 +1,139 @@
+buildscript {
+ repositories {
+ mavenCentral()
+ maven {
+ url "https://plugins.gradle.org/m2/"
+ }
+ }
+ dependencies {
+ classpath "gradle.plugin.org.eclipse.virgo.bundlor:bundlor-plugin:0.2"
+ classpath "gradle.plugin.com.eclipsesource.dockerizor:dockerizor:0.4"
+ }
+}
+
+ext.virgoProjects = [
+ project(':web-bundle'),
+]
+
+ext.dockerProjects = [
+ project(':runtime-only'),
+ project(':app'),
+]
+
+configure(virgoProjects + dockerProjects) {
+ repositories {
+ mavenLocal()
+ mavenCentral()
+ ivy {
+ url "http://build.eclipse.org/rt/virgo/ivy/bundles/release/"
+ layout "pattern", { artifact "[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" }
+ }
+ }
+}
+
+configure(virgoProjects) {
+ apply plugin: 'java'
+ apply plugin: 'eclipse'
+ apply plugin: 'eclipse-wtp'
+
+ version = '0.1.0.BUILD-SNAPSHOT'
+
+ compileJava {
+ options.encoding = 'utf-8'
+ options.fork = true
+ doFirst {
+ options.forkOptions.with {
+ executable = 'java'
+ jvmArgs = [
+ '-cp',
+ configurations.ecj.asPath,
+ 'org.eclipse.jdt.internal.compiler.batch.Main',
+ '-source',
+ '1.8',
+ '-target',
+ '1.8',
+ '-warn:-unused'
+ ]
+ }
+ }
+ }
+
+ compileTestJava {
+ options.encoding = 'utf-8'
+ options.fork = true
+ doFirst {
+ options.forkOptions.with {
+ executable = 'java'
+ jvmArgs = [
+ '-cp',
+ configurations.ecj.asPath,
+ 'org.eclipse.jdt.internal.compiler.batch.Main',
+ '-source',
+ '1.8',
+ '-target',
+ '1.8',
+ '-warn:-unused'
+ ]
+ }
+ }
+ }
+
+ eclipse {
+ jdt {
+ sourceCompatibility = 1.8
+ targetCompatibility = 1.8
+ }
+
+ project {
+ natures 'org.eclipse.virgo.ide.facet.core.bundlenature', 'org.eclipse.wst.common.project.facet.core.nature'
+ buildCommand 'org.eclipse.virgo.ide.bundlor.core.builder'
+ }
+
+ wtp {
+ facet {
+ facets = []
+ facet name: 'jst.java', version: '1.8'
+ facet name: 'org.eclipse.virgo.server.bundle', version: '1.0'
+ }
+ }
+ }
+
+ configurations { ecj { } }
+}
+
+configure(virgoProjects) {
+ apply plugin: 'org.eclipse.virgo.bundlor'
+
+ task('addProjectVersionToGradlePropertiesTask', type: Copy) {
+ ext.outputDir = new File(buildDir, 'bundlor-properties')
+ inputs.file project.rootProject.file('gradle.properties')
+ outputs.dir ext.outputDir
+ from project.rootProject.file('gradle.properties')
+ into ext.outputDir
+ }
+
+ task('mergeClassesAndResources', type: Copy, dependsOn: 'compileJava') {
+ ext.bundlorInputPath = new File(buildDir, 'bundlor-inputPath')
+ inputs.file sourceSets.main.output.classesDir
+ inputs.file sourceSets.main.resources
+ outputs.dir ext.bundlorInputPath
+ from sourceSets.main.output.classesDir
+ from sourceSets.main.resources
+ into ext.bundlorInputPath
+ }
+
+ project.tasks.'bundlor'.dependsOn('addProjectVersionToGradlePropertiesTask', 'mergeClassesAndResources')
+
+ bundlor {
+ ext.bundlorInputPath = new File(buildDir, 'bundlor-inputPath')
+ project.tasks['bundlor'].inputs.file ext.bundlorInputPath
+ manifestTemplatePath = "template.mf"
+ propertiesPath = new File("${project.buildDir}/bundlor-properties/gradle.properties")
+ inputPath = ext.bundlorInputPath
+ failOnWarnings = false
+ }
+}
+
+task wrapper(type: Wrapper) {
+ gradleVersion = '2.0'
+}
diff --git a/recipe-taglibs/gradle.properties b/recipe-taglibs/gradle.properties
new file mode 100644
index 0000000..d601110
--- /dev/null
+++ b/recipe-taglibs/gradle.properties
@@ -0,0 +1,11 @@
+#springframeworkVersion = 4.2.1.RELEASE
+springframeworkVersion = 3.2.10.RELEASE
+
+#slf4jVersion = 1.7.13
+
+#javaxServletVersion = 3.0.0.v201112011016
+
+javassistVersion = 3.20.0-GA
+ognlVersion = 3.1.2
+unbescapeVersion = 1.1.2.RELEASE
+thymeleafVersion = 2.1.4.VIRGO
diff --git a/recipe-taglibs/gradle/wrapper/gradle-wrapper.jar b/recipe-taglibs/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..2c6137b
--- /dev/null
+++ b/recipe-taglibs/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/recipe-taglibs/gradle/wrapper/gradle-wrapper.properties b/recipe-taglibs/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..e5729ab
--- /dev/null
+++ b/recipe-taglibs/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Tue Apr 05 10:59:34 CEST 2016
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip
diff --git a/recipe-taglibs/gradlew b/recipe-taglibs/gradlew
new file mode 100755
index 0000000..9d82f78
--- /dev/null
+++ b/recipe-taglibs/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/recipe-taglibs/gradlew.bat b/recipe-taglibs/gradlew.bat
new file mode 100644
index 0000000..5f19212
--- /dev/null
+++ b/recipe-taglibs/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/recipe-taglibs/runtime-only/build.gradle b/recipe-taglibs/runtime-only/build.gradle
new file mode 100644
index 0000000..f355a2d
--- /dev/null
+++ b/recipe-taglibs/runtime-only/build.gradle
@@ -0,0 +1,24 @@
+// add the build task 'clean'
+apply plugin: 'base'
+
+// add the build task 'dockerize'
+apply plugin: "com.eclipsesource.dockerizor"
+
+dockerizor {
+ repository = 'virgo-recipe/taglibs-runtime'
+ maintainer = 'Florian Waibel <fwaibel@eclipsesource.com>'
+ description = 'Virgo Recipe taglibs (runtime-only) created with Gradle Plugin: com.eclipsesource.dockerizor'
+
+ javaImage = 'java:openjdk-8u72-jre'
+
+ createLocalCopy = true
+
+ virgoFlavour = 'VTS'
+ virgoVersion = 'latest'
+
+ removeAdminConsole = false
+}
+
+repositories {
+ mavenCentral()
+}
diff --git a/recipe-taglibs/settings.gradle b/recipe-taglibs/settings.gradle
new file mode 100644
index 0000000..67f58c4
--- /dev/null
+++ b/recipe-taglibs/settings.gradle
@@ -0,0 +1 @@
+include 'web-bundle', 'runtime-only', 'app'
diff --git a/recipe-taglibs/web-bundle/build.gradle b/recipe-taglibs/web-bundle/build.gradle
new file mode 100644
index 0000000..3cee1dd
--- /dev/null
+++ b/recipe-taglibs/web-bundle/build.gradle
@@ -0,0 +1,15 @@
+dependencies {
+ ecj group: "org.eclipse.jdt.core.compiler", name: "ecj", version: "4.4.2"
+
+/*
+ compile group: "org.eclipse.virgo.mirrored", name: "org.springframework.core", version: springframeworkVersion
+ compile group: "org.eclipse.virgo.mirrored", name: "org.springframework.context", version: springframeworkVersion
+ compile group: "org.eclipse.virgo.mirrored", name: "org.springframework.beans", version: springframeworkVersion
+ compile group: "org.eclipse.virgo.mirrored", name: "org.springframework.web", version: springframeworkVersion
+ compile group: "org.eclipse.virgo.mirrored", name: "org.springframework.webmvc", version: springframeworkVersion
+*/
+ compile group: "org.springframework", name: "spring-core", version: springframeworkVersion
+ compile group: "org.springframework", name: "spring-context", version: springframeworkVersion
+ compile group: "org.springframework", name: "spring-beans", version: springframeworkVersion
+ compile group: "org.springframework", name: "spring-webmvc", version: springframeworkVersion
+}
diff --git a/recipe-taglibs/web-bundle/src/main/java/org/eclipse/virgo/recipies/web/FormHandler.java b/recipe-taglibs/web-bundle/src/main/java/org/eclipse/virgo/recipies/web/FormHandler.java
new file mode 100644
index 0000000..170826e
--- /dev/null
+++ b/recipe-taglibs/web-bundle/src/main/java/org/eclipse/virgo/recipies/web/FormHandler.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+package org.eclipse.virgo.recipies.web;
+
+/**
+ *
+ * @author cgfrost
+ *
+ */
+public class FormHandler {
+
+ private String comment;
+
+ public void setComment(String comment) {
+ this.comment = comment;
+ }
+
+ public String getComment() {
+ return comment;
+ }
+
+}
diff --git a/recipe-taglibs/web-bundle/src/main/java/org/eclipse/virgo/recipies/web/SampleController.java b/recipe-taglibs/web-bundle/src/main/java/org/eclipse/virgo/recipies/web/SampleController.java
new file mode 100644
index 0000000..87657f1
--- /dev/null
+++ b/recipe-taglibs/web-bundle/src/main/java/org/eclipse/virgo/recipies/web/SampleController.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+package org.eclipse.virgo.recipies.web;
+
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.servlet.ModelAndView;
+
+
+/**
+ * <p>
+ * AppController deals with requests for the console landing page, general information view and links.
+ * </p>
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ *
+ * AppController is threadsafe
+ *
+ */
+@Controller
+public final class SampleController {
+
+ private final FormHandler formHandler = new FormHandler();
+
+ /**
+ * Custom handler for displaying a list of properties.
+ * @return ModelAndView to render
+ */
+ @RequestMapping("/sample.htm")
+ public ModelAndView overview(String comment) {
+ if(comment == null || comment.length() == 0){
+ comment = "None.";
+ }
+ return new ModelAndView("sample").addObject("commentHandler", formHandler).addObject("lastComment", comment);
+ }
+
+}
diff --git a/recipe-taglibs/web-bundle/src/main/resources/WEB-INF/applicationContext.xml b/recipe-taglibs/web-bundle/src/main/resources/WEB-INF/applicationContext.xml
new file mode 100644
index 0000000..87a1816
--- /dev/null
+++ b/recipe-taglibs/web-bundle/src/main/resources/WEB-INF/applicationContext.xml
@@ -0,0 +1,10 @@
+<?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:osgi="http://www.springframework.org/schema/osgi"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+
+</beans>
+
diff --git a/recipe-taglibs/web-bundle/src/main/resources/WEB-INF/jsp/sample.jsp b/recipe-taglibs/web-bundle/src/main/resources/WEB-INF/jsp/sample.jsp
new file mode 100644
index 0000000..720d76f
--- /dev/null
+++ b/recipe-taglibs/web-bundle/src/main/resources/WEB-INF/jsp/sample.jsp
@@ -0,0 +1,24 @@
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %><%--
+--%><%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %><%--
+--%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+<head>
+ <title>Virgo Admin Console</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+
+<body class="main tundra">
+ <center>
+ <p>
+ Previous comment: <%=request.getAttribute("lastComment") %>
+ </p>
+ <p>
+ <form:form commandName="commentHandler">
+ Comment: <form:input path="comment" />
+ <input type="submit" value="Send!" />
+ </form:form>
+ </p>
+ </center>
+</body>
+</html>
\ No newline at end of file
diff --git a/recipe-taglibs/web-bundle/src/main/resources/WEB-INF/sample-servlet.xml b/recipe-taglibs/web-bundle/src/main/resources/WEB-INF/sample-servlet.xml
new file mode 100644
index 0000000..827fb34
--- /dev/null
+++ b/recipe-taglibs/web-bundle/src/main/resources/WEB-INF/sample-servlet.xml
@@ -0,0 +1,20 @@
+<?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.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
+
+ <context:component-scan base-package="org.eclipse.virgo.recipies.web" />
+
+ <!-- VIEW CONFIG -->
+
+ <bean id="topViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
+ <!--
+ -->
+ <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
+ <property name="prefix" value="/WEB-INF/jsp/" />
+ <property name="suffix" value=".jsp" />
+ </bean>
+
+</beans>
diff --git a/recipe-taglibs/web-bundle/src/main/resources/WEB-INF/web.xml b/recipe-taglibs/web-bundle/src/main/resources/WEB-INF/web.xml
new file mode 100644
index 0000000..d39d2b8
--- /dev/null
+++ b/recipe-taglibs/web-bundle/src/main/resources/WEB-INF/web.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<web-app 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"
+ version="2.5">
+
+ <display-name>Taglibs Sample</display-name>
+
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+
+ <!-- CONFIGURE A PARENT APPLICATION CONTEXT -->
+
+ <context-param>
+ <param-name>contextClass</param-name>
+ <param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+
+ <!-- DISPATCHER SERVLET CONFIG -->
+ <servlet>
+ <servlet-name>sample</servlet-name>
+ <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>sample</servlet-name>
+ <url-pattern>/app/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
diff --git a/recipe-taglibs/web-bundle/template.mf b/recipe-taglibs/web-bundle/template.mf
new file mode 100644
index 0000000..fd3db22
--- /dev/null
+++ b/recipe-taglibs/web-bundle/template.mf
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-Version: 3.6.4.RELEASE
+Bundle-Name: Web
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.virgo.jetty.sample.tags
+Web-ContextPath: taglibs
+Excluded-Exports: *
+Require-TldBundle: org.springframework.web.servlet
+Import-Template:
+ org.springframework.*;version="[3.1.0, 4)",
+ org.eclipse.virgo.web.*;version="[3.0.0,4.0.0)",
+ javax.servlet.*;version="[2.5.0,3.0.0)"
+Import-Package:
+ org.springframework.context.config;version="[3.1.0, 4)",
+ org.springframework.web.servlet;version="[3.1.0, 4)",
+ org.springframework.web.servlet.tags.form;version="[3.1.0, 4)",
+ org.springframework.core;version="[3.1.0, 4)"
+Import-Bundle:
+ org.springframework.context;version="[3.1.0, 4)"