cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject svn commit: rev 35638 - in cocoon/branches/butterfly: . lib src/java src/java/org/apache/butterfly/environment src/java/org/apache/butterfly/environment/http src/java/org/apache/butterfly/servlet src/webapp src/webapp/WEB-INF tools/jetty tools/jetty/conf tools/jetty/lib tools/loader
Date Tue, 03 Aug 2004 15:50:03 GMT
Author: ugo
Date: Tue Aug  3 08:50:02 2004
New Revision: 35638

Added:
   cocoon/branches/butterfly/build.xml
   cocoon/branches/butterfly/butterfly.bat
   cocoon/branches/butterfly/butterfly.sh   (contents, props changed)
   cocoon/branches/butterfly/lib/spring-web.jar   (contents, props changed)
   cocoon/branches/butterfly/src/java/applicationContext.xml
   cocoon/branches/butterfly/src/java/log4j.properties
   cocoon/branches/butterfly/src/webapp/
   cocoon/branches/butterfly/src/webapp/WEB-INF/
   cocoon/branches/butterfly/src/webapp/WEB-INF/web.xml
   cocoon/branches/butterfly/tools/jetty/
   cocoon/branches/butterfly/tools/jetty/conf/
   cocoon/branches/butterfly/tools/jetty/conf/admin.xml
   cocoon/branches/butterfly/tools/jetty/conf/main.xml
   cocoon/branches/butterfly/tools/jetty/conf/webdefaults.xml
   cocoon/branches/butterfly/tools/jetty/lib/
   cocoon/branches/butterfly/tools/jetty/lib/jetty-4.2.19.jar   (contents, props changed)
   cocoon/branches/butterfly/tools/jetty/lib/servlet-2.3.jar   (contents, props changed)
   cocoon/branches/butterfly/tools/loader/
   cocoon/branches/butterfly/tools/loader/Loader$RepositoryClassLoader.class   (contents, props changed)
   cocoon/branches/butterfly/tools/loader/Loader.class   (contents, props changed)
Modified:
   cocoon/branches/butterfly/.classpath
   cocoon/branches/butterfly/src/java/org/apache/butterfly/environment/Context.java
   cocoon/branches/butterfly/src/java/org/apache/butterfly/environment/http/HttpSession.java
   cocoon/branches/butterfly/src/java/org/apache/butterfly/servlet/ButterflyServlet.java
Log:
Added Jetty and run scripts.
Retrieving Spring application context from servlet.
Ant build file.


Modified: cocoon/branches/butterfly/.classpath
==============================================================================
--- cocoon/branches/butterfly/.classpath	(original)
+++ cocoon/branches/butterfly/.classpath	Tue Aug  3 08:50:02 2004
@@ -20,5 +20,6 @@
 	<classpathentry kind="lib" path="lib/asm-1.4.1.jar"/>
 	<classpathentry kind="lib" path="lib/commons-collections-3.1.jar"/>
 	<classpathentry kind="lib" path="lib/servlet-2_3.jar"/>
+	<classpathentry kind="lib" path="lib/spring-web.jar"/>
 	<classpathentry kind="output" path="build/classes"/>
 </classpath>

Added: cocoon/branches/butterfly/build.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/butterfly/build.xml	Tue Aug  3 08:50:02 2004
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<!-- $Id: build.xml,v 1.4 2004/07/27 15:52:32 ugo Exp $ -->
+
+<project default="webapp" basedir="." name="butterfly">
+
+  <target name="setProps" unless="setProps"
+    description="Set up the properties">
+    <property file="build.properties"/>
+  </target>
+  
+  <target name="init" depends="setProps"
+    description="Initialize the properties">
+    
+    <tstamp/>
+
+    <property name="dest" location="${basedir}/build"/>
+    <property name="webapp.dir" value="${dest}/webapp"/>
+    <property name="classes.dir" value="${dest}/classes"/>
+    <property name="test.dir" value="${dest}/test"/>
+  	<property name="lib.dir" location="lib"/>
+  	<property name="jetty.dir" value="tools/jetty"/>
+  	
+    <path id="classpath.path">
+      <fileset dir="lib">
+        <include name="*.jar"/>
+      </fileset>
+        <fileset dir="lib/endorsed">
+          <include name="*.jar"/>
+        </fileset>
+    </path>
+
+  </target>
+
+  <target name="clean" depends="init"
+    description="Clean up build directories">
+    <delete dir="${dest}"/>
+  </target>
+  
+  <target name="compile" depends="init"
+    description="Compile Java classes"> 
+    <mkdir dir="${classes.dir}"/>
+    <javac srcdir="src/java" destdir="${classes.dir}" source="1.4" target="1.4" debug="yes"
+      excludes="**/*Test.java">
+      <classpath>
+        <path refid="classpath.path"/>
+      </classpath>
+    </javac>
+    <!-- Copy the Log4j properties file -->
+    <copy file="src/java/log4j.properties" todir="${classes.dir}"/>
+  </target>
+
+  <target name="webapp" depends="compile"
+    description="Build web application">
+    <copy todir="${webapp.dir}">
+      <fileset dir="src/webapp" excludes=".svn"/>
+    </copy>
+    <copy todir="${webapp.dir}/WEB-INF/lib">
+      <fileset dir="lib" includes="*.jar"/>
+    </copy>
+    <copy todir="${webapp.dir}/WEB-INF/classes">
+      <fileset dir="${classes.dir}"/>
+    </copy>
+    <!-- Copy applicationContext file -->
+    <copy file="src/java/applicationContext.xml" todir="${webapp.dir}/WEB-INF"/>
+  </target>
+	
+</project>

Added: cocoon/branches/butterfly/butterfly.bat
==============================================================================
--- (empty file)
+++ cocoon/branches/butterfly/butterfly.bat	Tue Aug  3 08:50:02 2004
@@ -0,0 +1,165 @@
+@echo off
+rem  Copyright 1999-2004 The Apache Software Foundation
+rem
+rem  Licensed under the Apache License, Version 2.0 (the "License");
+rem  you may not use this file except in compliance with the License.
+rem  You may obtain a copy of the License at
+rem
+rem      http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem  Unless required by applicable law or agreed to in writing, software
+rem  distributed under the License is distributed on an "AS IS" BASIS,
+rem  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem  See the License for the specific language governing permissions and
+rem  limitations under the License.
+rem
+:: -----------------------------------------------------------------------------
+:: Cocoon Win32 Shell Script
+::
+:: $Id: cocoon.bat,v 1.21 2004/03/08 06:07:14 antonio Exp $
+:: -----------------------------------------------------------------------------
+
+:: Configuration variables
+::
+:: COCOON_HOME
+::   Folder that points to the root of the Cocoon distribution
+::
+:: COCOON_LIB
+::   Folder containing all the library files needed by the Cocoon CLI
+::
+:: JAVA_HOME
+::   Home of Java installation.
+::
+:: JAVA_OPTIONS
+::   Extra options to pass to the JVM
+::
+:: JAVA_DEBUG_PORT
+::   The location where the JVM debug server should listen to
+::
+:: JETTY_PORT
+::   Override the default port for Jetty
+::
+:: JETTY_ADMIN_PORT
+::   The port where the jetty web administration should bind
+::
+:: JETTY_WEBAPP
+::   The directory where the webapp that jetty has to execute is located
+::
+
+:: ----- Verify and Set Required Environment Variables -------------------------
+
+if not "%JAVA_HOME%" == "" goto gotJavaHome
+echo You must set JAVA_HOME to point at your Java Development Kit installation
+goto end
+:gotJavaHome
+
+:: ----- Check System Properties -----------------------------------------------
+
+if not "%EXEC%" == "" goto gotExec
+if not "%OS%" == "Windows_NT" goto noExecNT
+set EXEC=start "Cocoon" /D.
+goto gotExec
+:noExecNT
+set EXEC=
+:gotExec
+
+if not "%COCOON_HOME%" == "" goto gotHome
+set COCOON_HOME=.
+:gotHome
+
+if not "%COCOON_LIB%" == "" goto gotLib
+set COCOON_LIB=%COCOON_HOME%\build\webapp\WEB-INF\lib
+:gotLib
+
+if not "%JETTY_PORT%" == "" goto gotJettyPort
+set JETTY_PORT=8888
+:gotJettyPort
+
+if not "%JETTY_ADMIN_PORT%" == "" goto gotJettyAdminPort
+set JETTY_ADMIN_PORT=8889
+:gotJettyAdminPort
+
+if not "%JETTY_WEBAPP%" == "" goto gotWebapp
+set DEMO_WEBAPP=..\webapp
+if not exist %DEMO_WEBAPP% goto standardWebapp
+set JETTY_WEBAPP=%DEMO_WEBAPP%
+goto gotWebapp
+:standardWebapp
+set JETTY_WEBAPP=%COCOON_HOME%\build\webapp
+:gotWebapp
+echo cocoon.bat: using %JETTY_WEBAPP% as the webapp directory
+
+if not "%JAVA_DEBUG_PORT%" == "" goto gotDebugPort
+set JAVA_DEBUG_PORT=8000
+:gotDebugPort
+
+:: ----- Ensure desktop.ini is activated ---------------------------------------
+
+attrib +s %COCOON_HOME%
+
+:: ----- Set Up The Classpath --------------------------------------------------
+
+set CP=%COCOON_HOME%\tools\loader;%COCOON_HOME%\build\webapp\WEB-INF\classes
+
+:: ----- Check action ----------------------------------------------------------
+
+if ""%1"" == ""cli"" goto doCli
+if ""%1"" == ""servlet"" goto doServlet
+if ""%1"" == ""servlet-admin"" goto doAdmin
+if ""%1"" == ""servlet-debug"" goto doDebug
+IF ""%1"" == ""servlet-profile"" goto doProfile
+
+echo Usage: cocoon (action)
+echo actions:
+echo   cli             Run Cocoon from command line
+echo   servlet         Run Cocoon in a servlet container
+echo   servlet-admin   Run Cocoon in a servlet container and turn container web administration on
+echo   servlet-debug   Run Cocoon in a servlet container and turn on remote JVM debug
+echo   servlet-profile Run Cocoon in a servlet container and turn on JVM profiling
+goto end
+
+:: ----- Cli -------------------------------------------------------------------
+
+:doCli
+set param=
+shift
+:cliLoop
+if "%1"=="" goto cliLoopEnd
+if not "%1"=="" set param=%param% %1
+shift
+goto cliLoop
+
+:cliLoopEnd
+
+"%JAVA_HOME%\bin\java.exe" %JAVA_OPTIONS% -classpath "%CP%" -Djava.endorsed.dirs=lib\endorsed "-Dloader.jar.repositories=%COCOON_LIB%" -Dloader.main.class=org.apache.cocoon.Main Loader %param%
+goto end
+
+:: ----- Servlet ---------------------------------------------------------------
+
+:doServlet
+%EXEC% "%JAVA_HOME%\bin\java.exe" %JAVA_OPTIONS% -classpath "%CP%" "-Djava.endorsed.dirs=%COCOON_HOME%\lib\endorsed" "-Dwebapp=%JETTY_WEBAPP%" -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser -Djetty.port=%JETTY_PORT% -Djetty.admin.port=%JETTY_ADMIN_PORT% "-Dhome=%COCOON_HOME%" "-Dloader.jar.repositories=%COCOON_HOME%\tools\jetty\lib;%COCOON_HOME%\lib\endorsed" -Dloader.main.class=org.mortbay.jetty.Server Loader "%COCOON_HOME%\tools\jetty\conf\main.xml"
+goto end
+
+:: ----- Servlet with Administration Web Interface -----------------------------
+
+:doAdmin
+%EXEC% "%JAVA_HOME%\bin\java.exe" %JAVA_OPTIONS% -classpath "%CP%" "-Djava.endorsed.dirs=%COCOON_HOME%\lib\endorsed" "-Dwebapp=%JETTY_WEBAPP%" -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser -Djetty.port=%JETTY_PORT% -Djetty.admin.port=%JETTY_ADMIN_PORT% "-Dhome=%COCOON_HOME%" "-Dloader.jar.repositories=%COCOON_HOME%\tools\jetty\lib;%COCOON_HOME%\lib\endorsed" -Dloader.main.class=org.mortbay.jetty.Server Loader "%COCOON_HOME%\tools\jetty\conf\main.xml" "%COCOON_HOME%\tools\jetty\conf\admin.xml"
+goto end
+
+:: ----- Servlet Debug ---------------------------------------------------------
+
+:doDebug
+%EXEC% "%JAVA_HOME%\bin\java.exe" %JAVA_OPTIONS% -Xdebug -Xrunjdwp:transport=dt_socket,address=%JAVA_DEBUG_PORT%,server=y,suspend=n  -classpath "%CP%" "-Djava.endorsed.dirs=%COCOON_HOME%\lib\endorsed" "-Dwebapp=%JETTY_WEBAPP%" "-Dhome=%COCOON_HOME%" -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser -Djetty.port=%JETTY_PORT% -Djetty.admin.port=%JETTY_ADMIN_PORT% "-Dloader.jar.repositories=%COCOON_HOME%\tools\jetty\lib;%COCOON_HOME%\lib\endorsed" -Dloader.main.class=org.mortbay.jetty.Server Loader "%COCOON_HOME%\tools\jetty\conf\main.xml"
+goto end
+
+:: ----- Servlet Profile ---------------------------------------------------------
+
+:doProfile
+%EXEC% "%JAVA_HOME%\bin\java.exe" %JAVA_OPTIONS% -Xrunhprof:heap=all,cpu=samples,thread=y,depth=3 -classpath "%CP%" "-Djava.endorsed.dirs=%COCOON_HOME%\lib\endorsed" "-Dwebapp=%JETTY_WEBAPP%" "-Dhome=%COCOON_HOME%" -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser -Djetty.port=%JETTY_PORT% -Djetty.admin.port=%JETTY_ADMIN_PORT% "-Dloader.jar.repositories=%COCOON_HOME%\tools\jetty\lib;%COCOON_HOME%\lib\endorsed" -Dloader.main.class=org.mortbay.jetty.Server Loader "%COCOON_HOME%\tools\jetty\conf\main.xml"
+
+:: ----- End -------------------------------------------------------------------
+
+:end
+set CP=
+set EXEC=
+

Added: cocoon/branches/butterfly/butterfly.sh
==============================================================================
--- (empty file)
+++ cocoon/branches/butterfly/butterfly.sh	Tue Aug  3 08:50:02 2004
@@ -0,0 +1,176 @@
+#!/bin/sh
+#  Copyright 1999-2004 The Apache Software Foundation
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+# -----------------------------------------------------------------------------
+# Cocoon Unix Shell Script
+#
+# $Id: cocoon.sh,v 1.13 2004/03/16 16:25:31 mpo Exp $
+# -----------------------------------------------------------------------------
+
+# Configuration variables
+#
+# COCOON_HOME
+#   The root of the Cocoon distribution
+#
+# COCOON_WEBAPP_HOME
+#   The root of the Cocoon web application
+#
+# COCOON_LIB
+#   Folder containing all the library files needed by the Cocoon CLI
+#
+# JAVA_HOME
+#   Home of Java installation.
+#
+# JAVA_OPTIONS
+#   Extra options to pass to the JVM
+#
+# JAVA_DEBUG_ARGS
+#   The command line arguments for the internal JVM debugger
+#
+# JAVA_PROFILE_ARGS
+#   The command line arguments for the internal JVM profiler
+#
+# JETTY_PORT
+#   Override the default port for Jetty
+# 
+# JETTY_ADMIN_PORT
+#   The port where the jetty web administration should bind
+#
+
+
+usage()
+{
+    echo "Usage: $0 (action)"
+    echo "actions:"
+    echo "  cli               Run Cocoon from the command line"
+    echo "  servlet           Run Cocoon in a servlet container"
+    echo "  servlet-admin     Run Cocoon in a servlet container and turn on container web administration"
+    echo "  servlet-debug     Run Cocoon in a servlet container and turn on JVM remote debug"
+    echo "  servlet-profile   Run Cocoon in a servlet container and turn on JVM profiling"
+    exit 1
+}
+
+[ $# -gt 0 ] || usage
+
+ACTION=$1
+shift
+ARGS="$*"
+
+# ----- Verify and Set Required Environment Variables -------------------------
+
+if [ "$JAVA_HOME" = "" ] ; then
+  echo You must set JAVA_HOME to point at your Java Development Kit installation
+  exit 1
+fi
+
+if [ "$JAVA_OPTIONS" = "" ] ; then
+  JAVA_OPTIONS='-Xms32M -Xmx512M'
+fi
+
+if [ "$COCOON_HOME" = "" ] ; then
+  COCOON_HOME='.'
+fi
+
+if [ "$COCOON_WEBAPP_HOME" = "" ] ; then
+  STANDALONE_WEBAPP=../webapp
+  if [ -d $STANDALONE_WEBAPP ] ; then
+    # for standalone-webapp setup
+    COCOON_WEBAPP_HOME=$STANDALONE_WEBAPP
+  else
+    # when in the build environment
+    COCOON_WEBAPP_HOME="$COCOON_HOME/build/webapp"
+  fi
+fi
+echo "$0: using $COCOON_WEBAPP_HOME as the webapp directory"
+
+if [ "$COCOON_LIB" = "" ] ; then
+  COCOON_LIB="$COCOON_WEBAPP_HOME/WEB-INF/lib"
+fi
+
+if [ "$JETTY_PORT" = "" ] ; then
+  JETTY_PORT='8888'
+fi
+
+if [ "$JETTY_ADMIN_PORT" = "" ] ; then
+  JETTY_ADMIN_PORT='8889'
+fi
+
+if [ "$JAVA_DEBUG_ARGS" = "" ] ; then
+  JAVA_DEBUG_ARGS='-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n'
+fi
+
+if [ "$JAVA_PROFILE_ARGS" = "" ] ; then
+  JAVA_PROFILE_ARGS='-Xrunhprof:heap=all,cpu=samples,thread=y,depth=3'
+fi
+
+
+# ----- Set platform specific variables
+
+PATHSEP=":";
+case "`uname`" in
+   CYGWIN*) PATHSEP=";" ;;
+esac
+
+# ----- Set Local Variables ( used to minimize cut/paste) ---------------------
+
+JAVA="$JAVA_HOME/bin/java"
+ENDORSED_LIBS="$COCOON_HOME/lib/endorsed"
+ENDORSED="-Djava.endorsed.dirs=$ENDORSED_LIBS"
+PARSER=-Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser
+LOADER=Loader
+LOADER_LIB="${COCOON_HOME}/tools/loader${PATHSEP}${COCOON_WEBAPP_HOME}/WEB-INF/classes"
+
+CLI=-Dloader.main.class=org.apache.cocoon.Main
+CLI_LIBRARIES="-Dloader.jar.repositories=$COCOON_LIB"
+
+JETTY=-Dloader.main.class=org.mortbay.jetty.Server
+JETTY_CONF="$COCOON_HOME/tools/jetty/conf"
+JETTY_MAIN="$JETTY_CONF/main.xml"
+JETTY_ADMIN="$JETTY_CONF/admin.xml"
+JETTY_WEBAPP="-Dwebapp=$COCOON_WEBAPP_HOME"
+JETTY_HOME="-Dhome=$COCOON_HOME"
+JETTY_PORT_ARGS="-Djetty.port=$JETTY_PORT"
+JETTY_ADMIN_ARGS="-Djetty.admin.port=$JETTY_ADMIN_PORT"
+JETTY_LIBRARIES="-Dloader.jar.repositories=$COCOON_HOME/tools/jetty/lib${PATHSEP}${ENDORSED_LIBS}"
+
+# ----- Do the action ----------------------------------------------------------
+
+case "$ACTION" in
+  cli)
+        $JAVA $JAVA_OPTIONS -cp $LOADER_LIB $ENDORSED $CLI_LIBRARIES $CLI $LOADER $ARGS
+        ;;
+
+  servlet)
+        $JAVA $JAVA_OPTIONS -cp $LOADER_LIB $ENDORSED $PARSER $JETTY_PORT_ARGS $JETTY_LIBRARIES $JETTY_WEBAPP $JETTY_HOME $JETTY $LOADER $JETTY_MAIN
+        ;;
+
+  servlet-admin)
+        $JAVA $JAVA_OPTIONS -cp $LOADER_LIB $ENDORSED $PARSER $JETTY_PORT_ARGS $JETTY_ADMIN_ARGS $JETTY_LIBRARIES $JETTY_WEBAPP $JETTY_HOME $JETTY $LOADER $JETTY_MAIN $JETTY_ADMIN
+        ;;
+
+  servlet-debug)
+        $JAVA $JAVA_OPTIONS $JAVA_DEBUG_ARGS -cp $LOADER_LIB $ENDORSED $PARSER $JETTY_PORT_ARGS $JETTY_LIBRARIES $JETTY_WEBAPP $JETTY_HOME $JETTY $LOADER $JETTY_MAIN
+        ;;
+
+  servlet-profile)
+        $JAVA $JAVA_OPTIONS $JAVA_PROFILE_ARGS -cp $LOADER_LIB $ENDORSED $PARSER $JETTY_ARGS $JETTY_LIBRARIES $JETTY_WEBAPP $JETTY_HOME $JETTY $LOADER $JETTY_MAIN
+        ;;
+
+  *)
+        usage
+        ;;
+esac
+
+exit 0

Added: cocoon/branches/butterfly/lib/spring-web.jar
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/butterfly/src/java/applicationContext.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/butterfly/src/java/applicationContext.xml	Tue Aug  3 08:50:02 2004
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Copyright 1999-2004 The Apache Software Foundation.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!--+
+    | Spring's bean factory configuration file.
+    |
+    |  $Id: beans.xml,v 1.1 2004/07/23 08:47:20 ugo Exp $
+    +-->
+  
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+ 
+<beans>
+  
+  <bean id="fileSourceFactory" class="org.apache.butterfly.source.impl.FileSourceFactory"/>
+  <bean id="urlSourceFactory" class="org.apache.butterfly.source.impl.URLSourceFactory"/>
+  
+  <bean id="sourceResolver" class="org.apache.butterfly.source.SourceResolver">
+    <property name="factories">
+      <map>
+      	<entry key="file">
+      		<ref bean="fileSourceFactory"/>
+      	</entry>
+      	<entry key="*">
+      		<ref bean="urlSourceFactory"/>
+      	</entry>
+      </map>    
+    </property>
+  </bean>
+  
+  <!-- The XML Parser. Should probably be pooled. -->
+  <bean id="xmlParser" class="org.apache.butterfly.xml.Parser"
+     singleton="false" init-method="initialize">
+     <property name="saxDriver">
+       <value>org.apache.xerces.parsers.SAXParser</value>
+     </property>
+  </bean>
+  
+  <bean id="fileGenerator" class="org.apache.butterfly.generation.FileGenerator" singleton="false">
+    <property name="sourceResolver">
+      <ref bean="sourceResolver"/>
+    </property>  
+    <property name="parser">
+      <ref bean="xmlParser"/>
+    </property>
+  </bean>
+  
+  <bean id="traxTransformerFactory" class="org.apache.butterfly.xml.xslt.TraxTransformerFactory">
+    <property name="sourceResolver">
+      <ref bean="sourceResolver"/>
+    </property>  
+  </bean>
+
+  <bean id="xmlSerializer" class="org.apache.butterfly.serialization.XMLSerializer" singleton="false">
+    <property name="traxTransformerFactory">
+      <ref bean="traxTransformerFactory"/>
+    </property>
+    <property name="encoding">
+      <value>UTF-8</value>
+    </property>
+  </bean>
+    
+</beans>

Added: cocoon/branches/butterfly/src/java/log4j.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/butterfly/src/java/log4j.properties	Tue Aug  3 08:50:02 2004
@@ -0,0 +1,15 @@
+# Configure logging for testing
+
+log4j.rootCategory=WARN, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d %p %c - %m%n
+
+#log4j.category.org.springframework.aop.framework.ProxyFactoryBean=DEBUG
+
+log4j.category.org.springframework.enterpriseservices=DEBUG
+
+log4j.category.org.springframework.transaction.interceptor=INFO
+
+log4j.category.org.springframework.beans.factory=INFO

Modified: cocoon/branches/butterfly/src/java/org/apache/butterfly/environment/Context.java
==============================================================================
--- cocoon/branches/butterfly/src/java/org/apache/butterfly/environment/Context.java	(original)
+++ cocoon/branches/butterfly/src/java/org/apache/butterfly/environment/Context.java	Tue Aug  3 08:50:02 2004
@@ -15,10 +15,10 @@
  */
 package org.apache.butterfly.environment;
 
+import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.Enumeration;
-import java.io.InputStream;
 
 /**
  * Defines an interface to provide client context information .

Modified: cocoon/branches/butterfly/src/java/org/apache/butterfly/environment/http/HttpSession.java
==============================================================================
--- cocoon/branches/butterfly/src/java/org/apache/butterfly/environment/http/HttpSession.java	(original)
+++ cocoon/branches/butterfly/src/java/org/apache/butterfly/environment/http/HttpSession.java	Tue Aug  3 08:50:02 2004
@@ -16,9 +16,9 @@
  */
 package org.apache.butterfly.environment.http;
 
-import org.apache.butterfly.environment.Session;
-
 import java.util.Enumeration;
+
+import org.apache.butterfly.environment.Session;
 
 /**
  *

Modified: cocoon/branches/butterfly/src/java/org/apache/butterfly/servlet/ButterflyServlet.java
==============================================================================
--- cocoon/branches/butterfly/src/java/org/apache/butterfly/servlet/ButterflyServlet.java	(original)
+++ cocoon/branches/butterfly/src/java/org/apache/butterfly/servlet/ButterflyServlet.java	Tue Aug  3 08:50:02 2004
@@ -30,6 +30,8 @@
 import org.apache.commons.lang.BooleanUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
 
 
 /**
@@ -43,14 +45,21 @@
     private ServletContext servletContext;
     private String containerEncoding;
     private String defaultFormEncoding;
+    /** The Spring application context */
+    private WebApplicationContext applicationContext;
 
     /* (non-Javadoc)
      * @see javax.servlet.Servlet#init(javax.servlet.ServletConfig)
      */
     public void init(ServletConfig conf) throws ServletException {
         this.servletContext = conf.getServletContext();
+        this.applicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(this.servletContext);
+        /* FIXME: GenericServlet.getInitParameter causes an NPE. WTF???
         this.containerEncoding = getInitParameter("container-encoding", "ISO-8859-1");
         this.defaultFormEncoding = getInitParameter("form-encoding", "ISO-8859-1");
+        */
+        this.containerEncoding = "ISO-8859-1";
+        this.defaultFormEncoding = "ISO-8859-1";
     }
     
     /* (non-Javadoc)

Added: cocoon/branches/butterfly/src/webapp/WEB-INF/web.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/butterfly/src/webapp/WEB-INF/web.xml	Tue Aug  3 08:50:02 2004
@@ -0,0 +1,454 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+  
+<!--+
+    | This is the Butterfly web-app configurations file
+    +-->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+  "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+
+  <!-- Context Configuration ========================================== -->
+
+  <!--+
+      | Set a context property useful to allow you to ProxyPass your
+      | web application mounted to a different URI without loosing the
+      | ability to do cookie-based sessions.
+      | WARNING: this is Jetty specific!
+      +-->
+  <!--context-param>
+    <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
+    <param-value>/some/path/to/your/webapp</param-value>
+    <description>An override of the session cookie path</description>
+   </context-param-->
+   
+   <context-param>
+     <param-name>contextConfigLocation</param-name>
+     <param-value>/WEB-INF/applicationContext.xml</param-value>
+   </context-param>
+   
+   <listener>
+     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+   </listener>
+
+   
+  <!-- Servlet Configuration ========================================== -->
+
+  <servlet>
+    <servlet-name>Butterfly</servlet-name>
+    <display-name>Butterfly</display-name>
+    <description>Butterfly</description>
+
+    <!--
+      The regular servlet class (trusts the servlet container classloader)
+      -->
+    <servlet-class>org.apache.butterfly.servlet.ButterflyServlet</servlet-class>
+
+    <!--
+      This parameter tells Butterfly to set the thread's context classloader to
+      its own classloader. If you experience strange classloader issues,
+      try setting this parameter to "true" or using ParanoidButterflyServlet.
+    -->
+    <init-param>
+      <param-name>init-classloader</param-name>
+      <param-value>false</param-value>
+    </init-param>
+
+    <!--
+      This parameter allows to set system properties
+    -->
+    <!--
+    <init-param>
+      <param-name>force-property</param-name>
+      <param-value>
+        org.apache.commons.logging.Log=org.apache.commons.logging.impl.LogKitLogger
+      </param-value>
+    </init-param>
+    -->
+
+    <!--
+      This parameter points to the main configuration file for Butterfly.
+      Note that the path is specified in absolute notation but it will be
+      resolved relative to the servlets webapp context path
+    -->
+    <init-param>
+      <param-name>configurations</param-name>
+      <param-value>/WEB-INF/Butterfly.xconf</param-value>
+    </init-param>
+
+    <!--
+      This parameter indicates the configuration file of the LogKit management
+    -->
+    <init-param>
+      <param-name>logkit-config</param-name>
+      <param-value>/WEB-INF/logkit.xconf</param-value>
+    </init-param>
+
+    <!--
+      This parameter indicates the category id of the logger from the LogKit
+      configuration used by the ButterflyServlet.
+    -->
+    <init-param>
+      <param-name>servlet-logger</param-name>
+      <param-value>access</param-value>
+    </init-param>
+
+    <!--
+      This parameter indicates the category id of the logger from the LogKit
+      management configuration for the Butterfly engine.
+      This logger is used for all components described in the Butterfly.xconf
+      and sitemap.xmap file not having specified a logger with the
+      logger="..." attribute in the component configuration file.
+    -->
+    <init-param>
+      <param-name>Butterfly-logger</param-name>
+      <param-value>core</param-value>
+    </init-param>
+
+    <!--
+      This parameter indicates the log level to use throughout startup of the
+      system. As soon as the logkit.xconf the setting of the logkit.xconf
+      configuration is used instead! Only for startup and if the logkit.xconf is
+      not readable/available this log level is of importance.
+
+      Available levels are:
+        DEBUG:        prints all level of log messages.
+        INFO:         prints all level of log messages except DEBUG ones.
+        WARN:         prints all level of log messages except DEBUG and INFO ones.
+        ERROR:        prints all level of log messages except DEBUG, INFO and WARN ones.
+        FATAL_ERROR:  prints only log messages of this level
+    -->
+    <init-param>
+      <param-name>log-level</param-name>
+      <param-value>WARN</param-value>
+    </init-param>
+
+    <!--
+      This parameter switches the logging system from LogKit to Log4J for Butterfly.
+      Log4J has to be configured already.
+      <init-param>
+        <param-name>logger-class</param-name>
+        <param-value>org.apache.avalon.excalibur.logger.Log4JLoggerManager</param-value>
+      </init-param>
+    -->
+
+    <!--
+      If you want to configure log4j using Butterfly, then you can define
+      an XML configuration file here. You can use the usual log4j property
+      substituation mechanism, e.g. ${context-root} is replaced by the
+      context root of this web application etc.
+      You can configure the log4j configuration even if you use LogKit 
+      for Butterfly logging. You can use this to configure third party code
+      for example.
+      <init-param>
+        <param-name>log4j-config</param-name>
+        <param-value>/WEB-INF/log4j.xconf</param-value>
+      </init-param>
+    -->
+    
+    <!--
+      Allow reinstantiating (reloading) of the Butterfly instance. If this is
+      set to "yes" or "true", a new Butterfly instance can be created using
+      the request parameter "Butterfly-reload". It also enables that Butterfly is 
+      reloaded when Butterfly.xconf changes. Default is no for security reasons.
+    -->
+    <init-param>
+      <param-name>allow-reload</param-name>
+      <param-value>no</param-value>
+    </init-param>
+
+    <!--
+      This parameter is used to list classes that should be loaded at
+      initialization time of the servlet. For example, JDBC Drivers used need to
+      be named here. Additional entries may be inserted here during build
+      depending on your build properties.
+    -->
+    <init-param>
+      <param-name>load-class</param-name>
+      <param-value>
+        <!-- For parent ComponentManager sample:
+        org.apache.Butterfly.samples.parentcm.Configurator -->
+        <!-- For IBM WebSphere:
+        com.ibm.servlet.classloader.Handler -->
+      
+        <!-- For Database Driver: 
+        org.hsqldb.jdbcDriver -->
+
+</param-value>
+    </init-param>
+
+    <!--
+      Causes all files in multipart requests to be processed.
+      Default is false for security reasons.
+      Unsupported values will be interpreted as false.
+    -->
+    <init-param>
+      <param-name>enable-uploads</param-name>
+      <param-value>false</param-value>
+    </init-param>
+
+    <!--
+      This parameter allows to specify where Butterfly should put uploaded files.
+      The path specified can be either absolute or relative to the context
+      path of the servlet. On windows platform, absolute directory must start
+      with volume: C:\Path\To\Upload\Directory
+
+      The default directory is "upload-dir" in the work-directory
+
+    <init-param>
+      <param-name>upload-directory</param-name>
+      <param-value>WEB-INF/work/upload-dir</param-value>
+    </init-param>
+    -->
+
+    <!--
+      Causes all files in multipart requests to be saved to upload-dir.
+      Default is true for security reasons.
+      Unsupported values will be interpreted as false.
+    -->
+    <init-param>
+      <param-name>autosave-uploads</param-name>
+      <param-value>true</param-value>
+    </init-param>
+
+    <!--
+      Specify handling of name conflicts when saving uploaded files to disk.
+      Acceptable values are deny, allow, rename (default). Files are renamed
+      x_filename where x is an integer value incremented to make the new
+      filename unique.
+    -->
+    <init-param>
+      <param-name>overwrite-uploads</param-name>
+      <param-value>rename</param-value>
+    </init-param>
+
+    <!--
+      Specify maximum allowed size of the upload. Defaults to 10 Mb.
+
+    <init-param>
+      <param-name>upload-max-size</param-name>
+      <param-value>10000000</param-value>
+    </init-param>
+    -->
+
+    <!--
+      This parameter allows to specify where Butterfly should create its page
+      and other objects cache. The path specified can be either absolute or
+      relative to the context path of the servlet. On windows platform,
+      absolute directory must start with volume: C:\Path\To\Cache\Directory
+
+      The default directory is "cache-dir" in the work-directory
+
+    <init-param>
+      <param-name>cache-directory</param-name>
+      <param-value>WEB-INF/work/cache-dir</param-value>
+    </init-param>
+    -->
+
+    <!--
+      This parameter allows to specify where Butterfly should put it's
+      working files. The path specified is either absolute or relative
+      to the context path of the Butterfly servlet. On windows platform,
+      absolute directory must start with volume: C:\Path\To\Work\Directory
+
+      The default directory is "Butterfly-files" directory in the servlet
+      context's temp directory (context property javax.servlet.context.tempdir).
+
+    <init-param>
+      <param-name>work-directory</param-name>
+      <param-value>WEB-INF/work</param-value>
+    </init-param>
+    -->
+
+    <!--
+      This parameter allows to specify additional directories or jars
+      which Butterfly should put into it's own classpath.
+      Note that you must separate them using the platforms path.separator
+      (":" for *nix and ";" for Windows systems). Also note that absolute
+      pathes are taken as such but relative pathes are rooted at the context
+      root of the Butterfly servlet.
+
+    <init-param>
+      <param-name>extra-classpath</param-name>
+      <param-value>WEB-INF/extra-classes1:/[YOU-ABSOLUTE-PATH-TO]/own.jar</param-value>
+    </init-param>
+    -->
+
+    <!--
+      This parameter allows you to select the parent component manager.
+      The class will be instantiated via the constructor that takes a single
+      String as a parameter. That String will be equal to the text after the
+      '/'.
+
+      Butterfly honors the LogEnabled, Initializable and Disposable interfaces for
+      this class, if it implements them.
+
+      If you uncomment the following lines the parent CM is set to the Parent CM
+      sample, which will look up a configuration via JNDI at
+      org/apache/Butterfly/samples/parentcm/ParentCMConfiguration and use it.
+    <init-param>
+      <param-name>parent-component-manager</param-name>
+      <param-value>org.apache.Butterfly.samples.parentcm.ParentComponentManager/org/apache/Butterfly/samples/parentcm/ParentCMConfiguration</param-value>
+    </init-param>
+    -->
+
+    <!--
+      If you set this parameter to 'true' or 'yes', Butterfly will add processing
+      time to the end of each response. Value 'hide' adds processing time as an
+      HTML comment. By default, processing time is not added (corresponds to
+      value 'no').
+      NOTE: If you use this feature, Butterfly might generated a wrong content
+      length header in the response. This is due to the internal processing
+      of Readers and the Caching. So, this might be the reason if you get
+      a warning about a wrong content length.
+      See http://issues.apache.org/bugzilla/show_bug.cgi?id=17370.
+    <init-param>
+      <param-name>show-time</param-name>
+      <param-value>hide</param-value>
+    </init-param>
+    -->
+
+    <!--
+       If true or not set, this class will try to catch and handle all Butterfly
+       exceptions. If false, it will rethrow them to the servlet container.
+    -->
+    <init-param>
+      <param-name>manage-exceptions</param-name>
+      <param-value>true</param-value>
+    </init-param>
+
+    <!--
+       If true, Avalon Excalibur instrumentation will be enabled on all
+       Instrumentable components with Butterfly and your Butterfly application.
+    -->
+    <init-param>
+      <param-name>enable-instrumentation</param-name>
+      <param-value>false</param-value>
+    </init-param>
+
+    <!--
+       This defines the location of the instrument manager configuration, only
+       used if the init-param enable-instrumentation is enabled.
+    -->
+    <init-param>
+      <param-name>instrumentation-config</param-name>
+      <param-value>/WEB-INF/instrumentation.xconf</param-value>
+    </init-param>
+
+    <!--
+      Set encoding used by the container. If not set the ISO-8859-1 encoding
+      will be assumed.
+    -->
+    <init-param>
+      <param-name>container-encoding</param-name>
+      <param-value>utf-8</param-value>
+    </init-param>
+
+    <!--
+      Set form encoding. This will be the character set used to decode request
+      parameters. If not set the ISO-8859-1 encoding will be assumed.
+    -->
+    <init-param>
+      <param-name>form-encoding</param-name>
+      <param-value>utf-8</param-value>
+    </init-param>
+
+    <!--
+      This parameter allows you to startup Butterfly2 immediately after startup
+      of your servlet engine.
+    -->
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+
+  <!-- URL space mappings ============================================= -->
+
+  <!--
+    Butterfly handles all the URL space assigned to the webapp using its sitemap.
+    It is recommended to leave it unchanged. Under some circumstances though
+    (like integration with proprietary webapps or servlets) you might have
+    to change this parameter.
+  -->
+  <servlet-mapping>
+    <servlet-name>Butterfly</servlet-name>
+    <url-pattern>/</url-pattern>
+  </servlet-mapping>
+
+  <!--
+    Some servlet engines (Tomcat) have defaults which are not overriden
+    by '/' mapping, but must be overriden explicitly.
+  -->
+  <servlet-mapping>
+    <servlet-name>Butterfly</servlet-name>
+    <url-pattern>*.jsp</url-pattern>
+  </servlet-mapping>
+  <!--
+    Some servlet engines (WebLogic) have defaults which are not overriden
+    by '/' mapping, but must be overriden explicitly.
+  -->
+  <servlet-mapping>
+    <servlet-name>Butterfly</servlet-name>
+    <url-pattern>*.html</url-pattern>
+  </servlet-mapping>
+
+  <!-- various MIME type mappings ====================================== -->
+
+  <mime-mapping>
+    <extension>css</extension>
+    <mime-type>text/css</mime-type>
+  </mime-mapping>
+
+  <mime-mapping>
+    <extension>xml</extension>
+    <mime-type>text/xml</mime-type>
+  </mime-mapping>
+
+  <mime-mapping>
+    <extension>xsl</extension>
+    <mime-type>text/xml</mime-type>
+  </mime-mapping>
+
+  <mime-mapping>
+    <extension>xconf</extension>
+    <mime-type>text/xml</mime-type>
+  </mime-mapping>
+
+  <mime-mapping>
+    <extension>xmap</extension>
+    <mime-type>text/xml</mime-type>
+  </mime-mapping>
+
+  <mime-mapping>
+    <extension>ent</extension>
+    <mime-type>text/plain</mime-type>
+  </mime-mapping>
+
+  <mime-mapping>
+    <extension>grm</extension>
+    <mime-type>text/plain</mime-type>
+  </mime-mapping>
+
+
+  <!-- Sample environment entry for the NamingInputModule -->
+  <env-entry>
+    <env-entry-name>greeting</env-entry-name>
+    <env-entry-value>Hello, World</env-entry-value>
+    <env-entry-type>java.lang.String</env-entry-type>
+  </env-entry>
+
+</web-app>
\ No newline at end of file

Added: cocoon/branches/butterfly/tools/jetty/conf/admin.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/butterfly/tools/jetty/conf/admin.xml	Tue Aug  3 08:50:02 2004
@@ -0,0 +1,53 @@
+<?xml version="1.0" ?>
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.2//EN" "http://jetty.mortbay.org/configure_1_2.dtd">
+
+<!-- =============================================================== -->
+<!-- Configure the Jetty Server for the Administration Interface     -->
+<!-- =============================================================== -->
+
+<Configure class="org.mortbay.jetty.Server">
+
+  <!-- =============================================================== -->
+  <!-- Configure the Request Listeners                                 -->
+  <!-- =============================================================== -->
+
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+  <!-- Add and configure a HTTP listener to port 8081                    -->
+  <!-- The default port can be changed using: java -Djetty.admin.port=80 -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+  <Call name="addListener">
+    <Arg>
+      <New class="org.mortbay.http.SocketListener">
+        <Set name="Host">127.0.0.1</Set>
+        <Set name="Port"><SystemProperty name="jetty.admin.port" default="8081"/></Set>
+        <Set name="MinThreads">5</Set>
+        <Set name="MaxThreads">100</Set>
+        <Set name="MaxIdleTimeMs">30000</Set>
+        <Set name="LowResourcePersistTimeMs">5000</Set>
+      </New>
+    </Arg>
+  </Call>
+
+  <!-- =============================================================== -->
+  <!-- Configure the Contexts                                          -->
+  <!-- =============================================================== -->
+
+  <Call name="addContext">
+    <Arg>/</Arg>   
+
+    <Call name="addServlet">
+      <Arg>Admin</Arg>
+      <Arg>/</Arg>
+      <Arg>org.mortbay.servlet.AdminServlet</Arg>
+    </Call>
+    <Call name="setAttribute">
+      <Arg>org.mortbay.http.HttpServer</Arg>
+      <Arg><Call name="getHttpServer"/></Arg>
+    </Call>
+  </Call>
+
+</Configure>
+
+
+
+

Added: cocoon/branches/butterfly/tools/jetty/conf/main.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/butterfly/tools/jetty/conf/main.xml	Tue Aug  3 08:50:02 2004
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.2//EN" "http://jetty.mortbay.org/configure_1_2.dtd">
+
+<!-- =============================================================== -->
+<!-- Configure the Jetty Server                                      -->
+<!-- =============================================================== -->
+
+<Configure class="org.mortbay.jetty.Server">
+
+  <!-- =============================================================== -->
+  <!-- Configure the Request Listeners                                 -->
+  <!-- =============================================================== -->
+
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+  <!-- Add and configure a HTTP listener to port 8888                  -->
+  <!-- The default port can be changed using: java -Djetty.port=80     -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+  <Call name="addListener">
+    <Arg>
+      <New class="org.mortbay.http.SocketListener">
+        <Set name="Port"><SystemProperty name="jetty.port" default="8888"/></Set>
+        <Set name="MinThreads">5</Set>
+        <Set name="MaxThreads">100</Set>
+        <Set name="MaxIdleTimeMs">30000</Set>
+        <Set name="LowResourcePersistTimeMs">5000</Set>
+      </New>
+    </Arg>
+  </Call>
+
+  <!-- =============================================================== -->
+  <!-- Configure the Contexts                                          -->
+  <!-- =============================================================== -->
+
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+  <!-- Add root context web applications.                              -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+  
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+  <!-- Add a all web application within the webapps directory.         -->
+  <!-- + No virtual host specified                                     -->
+  <!-- + Look in the webapps directory relative to jetty.home or .     -->
+  <!-- + Use the webdefault.xml resource for the defaults descriptor   -->
+  <!-- + Upack the war file                                            -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+  <Call name="addWebApplication">
+    <Arg>/</Arg>
+    <Arg><SystemProperty name="webapp" default="."/></Arg>
+    <Set name="defaultsDescriptor"><SystemProperty name="home" default="."/>/tools/jetty/conf/webdefaults.xml</Set>
+  </Call>
+
+  <!-- =============================================================== -->
+  <!-- Configure the Authentication Realms                             -->
+  <!-- =============================================================== -->
+  <Call name="addRealm">
+    <Arg>
+      <New class="org.mortbay.http.HashUserRealm">
+        <Arg>Quicksilver</Arg>
+        <Arg><SystemProperty name="jetty.home" default="."/>/tools/jetty/conf/quicksilver.realm.properties</Arg>
+      </New>
+    </Arg>
+  </Call>
+  
+  <Call name="addRealm">
+    <Arg>
+      <New class="org.mortbay.http.HashUserRealm">
+        <Arg>PetStore</Arg>
+        <Arg><SystemProperty name="jetty.home" default="."/>/tools/jetty/conf/petstore.realm.properties</Arg>
+      </New>
+    </Arg>
+  </Call>
+
+</Configure>

Added: cocoon/branches/butterfly/tools/jetty/conf/webdefaults.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/butterfly/tools/jetty/conf/webdefaults.xml	Tue Aug  3 08:50:02 2004
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!-- ===================================================================== -->
+<web-app>
+  <description>
+    This file is applied to a Web application before it's own WEB-INF/web.xml file
+  </description>
+
+  <!-- ==================================================================== -->
+  <!-- Context params to control Session Cookies                            -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <!-- UNCOMMENT TO ACTIVATE
+  <context-param>
+    <param-name>org.mortbay.jetty.servlet.SessionDomain</param-name>
+    <param-value>127.0.0.1</param-value>
+  </context-param>
+
+  <context-param>
+    <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
+    <param-value>/</param-value>
+  </context-param>
+
+  <context-param>
+    <param-name>org.mortbay.jetty.servlet.MaxAge</param-name>
+    <param-value>-1</param-value>
+  </context-param>
+  -->
+
+  <!-- ==================================================================== -->
+  <session-config>
+    <session-timeout>30</session-timeout>
+  </session-config>
+
+</web-app>

Added: cocoon/branches/butterfly/tools/jetty/lib/jetty-4.2.19.jar
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/butterfly/tools/jetty/lib/servlet-2.3.jar
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/butterfly/tools/loader/Loader$RepositoryClassLoader.class
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/butterfly/tools/loader/Loader.class
==============================================================================
Binary file. No diff available.

Mime
View raw message