tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject svn commit: r534293 [1/11] - in /tomcat/sandbox/tomcat-lite: ./ bin/ external/ java/ java/org/apache/commons/logging/ java/org/apache/tomcat/lite/ java/org/apache/tomcat/lite/ctxmap/ java/org/apache/tomcat/lite/http/ java/org/apache/tomcat/lite/http11/...
Date Wed, 02 May 2007 02:22:50 GMT
Author: costin
Date: Tue May  1 19:22:45 2007
New Revision: 534293

URL: http://svn.apache.org/viewvc?view=rev&rev=534293
Log:
Updates/fixes/cleanup for the last few months


Added:
    tomcat/sandbox/tomcat-lite/external/
    tomcat/sandbox/tomcat-lite/external/jasper.jar   (with props)
    tomcat/sandbox/tomcat-lite/external/javax.annotation.jar   (with props)
    tomcat/sandbox/tomcat-lite/external/javax.servlet.jar   (with props)
    tomcat/sandbox/tomcat-lite/java/org/apache/commons/logging/SyserrLog.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/Enumerator.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLiteMain.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/WebappFilterMapper.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/WebappServletMapper.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/http11/
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/http11/Http11Buffer.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/http11/Http11Connection.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/http11/Http11NioServlet.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/http11/NioServlet.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/http11/ThreadPoolSimple.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/tomcat-lite-web.xml
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/util/CompressedWriter.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/config/WebXml.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/deploy/WebappContextMapper.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/CopyUtils.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/FileCopyUtils.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/MD5Encoder.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/URLEncoder.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/Webdav2Servlet.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/XMLWriter.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/SingleThreadedProxyServlet.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/log/
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/log/LogFilter.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/log/LogServlet.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/log/RequestInfoFilter.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/session/RandomGenerator.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/threads/
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/DomUtil.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/IntrospectionUtils.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/buf/BBuffer.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/buf/CBuffer.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/buf/MessageReader.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/http/ContentType.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/http/LocaleParser.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/http/MIME2Java.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/http/Range.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/http/RequestUtil.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/res/
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/res/StringManager.java
Removed:
    tomcat/sandbox/tomcat-lite/bin/jam_tomcat.sh
    tomcat/sandbox/tomcat-lite/java/org/apache/commons/logging/DirectJDKLog.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ctxmap/WebappContextMapper.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/http/CoyoteAdapter.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/jmx/JmxListener.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/servlets/RequestInfoFilter.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/util/MessageReader.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/webmap/WebappFilterMapper.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/webmap/WebappServletMapper.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/deploy/ReloadServlet.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/deploy/WebXml.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/CopyUtils.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/DOMWriter.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/Enumerator.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/FileCopyUtils.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/MD5Encoder.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/MIME2Java.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/RandomGenerator.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/Range.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/RequestUtil.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/StringParser.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/URLEncoder.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/XMLWriter.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/buf/B2CConverter.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/buf/C2BConverter.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/buf/DateTool.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/buf/TimeStamp.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/buf/UTF8Decoder.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/loader/Module.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/loader/ModuleClassLoader.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/loader/RepositoryClassLoader.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/loader/package.html
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/net/http11/
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/net/nio/NioEndpoint.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/net/simple/SimpleEndpoint.java
    tomcat/sandbox/tomcat-lite/java/web-embed.xml
    tomcat/sandbox/tomcat-lite/webapps/ROOT/WEB-INF/lib/
    tomcat/sandbox/tomcat-lite/webapps/__x_classpath/
    tomcat/sandbox/tomcat-lite/webapps/__x_classpath_jasper/
    tomcat/sandbox/tomcat-lite/webapps/__x_deploy/
    tomcat/sandbox/tomcat-lite/webapps/__x_engine/
    tomcat/sandbox/tomcat-lite/webapps/__x_protocol/
Modified:
    tomcat/sandbox/tomcat-lite/.classpath
    tomcat/sandbox/tomcat-lite/build.xml
    tomcat/sandbox/tomcat-lite/java/org/apache/commons/logging/LogFactory.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/FilterConfigImpl.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/RequestDispatcherImpl.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletConfigImpl.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletContextImpl.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletInputStreamImpl.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletOutputStreamImpl.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletReaderImpl.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletRequestImpl.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletRequestWrapperImpl.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletResponseImpl.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletResponseIncludeWrapper.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLite.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/util/MappingData.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/util/MessageWriter.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/config/FilterMappingData.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/config/WebAppData.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/deploy/InitServlet.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/deploy/WebAnnotation.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/DefaultServlet.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/Dir2Html.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/WebdavServlet.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/JspProxyServlet.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/sec/DigestAuthServlet.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/session/HttpSessionImpl.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/session/SessionManagerServlet.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/buf/ByteChunk.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/buf/CharChunk.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/buf/MessageBytes.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/buf/UDecoder.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/buf/UEncoder.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/http/Cookies.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/http/Parameters.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/http/ServerCookie.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/util/loader/Repository.java

Modified: tomcat/sandbox/tomcat-lite/.classpath
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/.classpath?view=diff&rev=534293&r1=534292&r2=534293
==============================================================================
--- tomcat/sandbox/tomcat-lite/.classpath (original)
+++ tomcat/sandbox/tomcat-lite/.classpath Tue May  1 19:22:45 2007
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="java"/>
-	<classpathentry kind="lib" path="webapps/__x_deploy/WEB-INF/lib/javax.annotation.jar"/>
+	<classpathentry excluding="org/apache/tomcat/util/net/http11/|org/apache/coyote/|org/apache/tomcat/servlets/deploy/WebAnnotation.java|org/apache/tomcat/servlets/jsp/JspCompileServlet.java" kind="src" path="java"/>
+	<classpathentry kind="src" output="testclasses" path="test"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="lib" path="webapps/__x_classpath_jasper/WEB-INF/lib/jasper.jar"/>
-	<classpathentry kind="lib" path="resources/coyote-api.jar"/>
-	<classpathentry kind="lib" path="resources/javax.servlet.jar"/>
-	<classpathentry kind="lib" path="resources/tomcat-utils.jar"/>
+	<classpathentry kind="lib" path="external/jasper.jar"/>
+	<classpathentry exported="true" kind="lib" path="external/javax.annotation.jar"/>
+	<classpathentry exported="true" kind="lib" path="external/javax.servlet.jar" sourcepath="/ws/tc/tomcat6/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3.8.1"/>
 	<classpathentry kind="output" path="classes"/>
 </classpath>

Modified: tomcat/sandbox/tomcat-lite/build.xml
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/build.xml?view=diff&rev=534293&r1=534292&r2=534293
==============================================================================
--- tomcat/sandbox/tomcat-lite/build.xml (original)
+++ tomcat/sandbox/tomcat-lite/build.xml Tue May  1 19:22:45 2007
@@ -8,185 +8,143 @@
   <property file="../build/build.properties"/>
   <property file="../build/build.properties.default"/>
 
-  <property name="tc.base" location="../.." />
-
   <!-- Source dependencies -->
-  <property name="target.vm"     value="1.5"/>
-  <property name="source.vm"     value="1.5"/>
-
-  <property name="tc6.home"      value="${tc.base}/tomcat6"/>
-  <property name="sandbox.home"  value="${tc.base}/sandbox"/>
-  <property name="tomcat.home"   value="${tc.base}/tomcat6/build"/>
-  <property name="build.home"   value="${tc.base}/build"/>
-
-  <property name="ant.jar"               value="${ant.home}/lib/ant.jar"/>
-  <property name="ant-launcher.jar"      value="${ant.home}/lib/ant-launcher.jar"/>
-
-    <!-- Build Defaults -->
-  <property name="catalina.build"   value="${container.home}/build"/>
-  <property name="jasper.build"     value="${jasper.home}/build"/>
-  <property name="tomcat.build"     value="${basedir}/build"/>
-
-  <property name="tomcat-dbcp.home" value="${base.path}/tomcat-deps" />
-  <property name="tomcat-dbcp.jar"  value="${tomcat-dbcp.home}/naming-factory-dbcp.jar"/>
-
-  <property name="jasper-compiler-jdt.home" value="${base.path}/tomcat-deps" />
-  <property name="jasper-compiler-jdt.jar"
-    value="${jasper-compiler-jdt.home}/jasper-compiler-jdt.jar"/>
+  <property name="target.vm"     value="1.4"/>
+  <property name="source.vm"     value="1.4"/>
 
   <property name="compile.optimize"     value="false"/>
-  <property name="compile.debug"        value="true" />
+  <property name="compile.debug"        value="false" />
   <property name="compile.deprecation"  value="false" />
-  <property name="compile.source"       value="1.5" />
+  <property name="compile.source"       value="1.4" />
 
+  <!-- Used for 'download', to pack the dependent jars -->
+  <property name="tc.base" location="../.." />
+  <property name="tc6.home"      value="${tc.base}/tomcat6"/>
   <property name="tc6.classes" location="${tc6.home}/output/classes"/>
 
   <path id="runtime-deps" >  
-    <pathelement location="${base.path}/tomcat-deps/jasper-compiler-jdt.jar" />
   </path>
-
+  
   <target name="compile" >
-    <mkdir dir="${sandbox.home}/classes" />
-    <javac destdir="${sandbox.home}/classes" source="${source.vm}" 
+    <mkdir dir="classes" />
+    <javac destdir="classes" source="${source.vm}" 
+           target="${target.vm}"
+           includeJavaRuntime="false"
+           deprecation="false" 
+           debug="false"  >
+      <src path="java" />
+      <include name="javax/servlet/**"/>
+      <include name="org/apache/commons/logging/**"/>
+      <include name ="org/apache/tomcat/lite/**" />
+      <include name ="org/apache/tomcat/servlets/config/**" />
+      <include name ="org/apache/tomcat/servlets/deploy/**" />
+      <exclude name="**/WebAnnotation.java"/>
+      <include name ="org/apache/tomcat/servlets/file/**" />
+      <exclude name="**/Webdav2Servlet.java"/>
+      <include name ="org/apache/tomcat/servlets/log/**" />
+      <include name ="org/apache/tomcat/servlets/sec/**" />
+      <include name ="org/apache/tomcat/servlets/session/**" />
+      <include name ="org/apache/tomcat/servlets/util/**" />
+      <include name ="org/apache/tomcat/util/*" />
+      <include name ="org/apache/tomcat/util/buf/**" />
+      <include name ="org/apache/tomcat/util/collections/**" />
+      <include name ="org/apache/tomcat/util/http/**" />
+      <include name ="org/apache/tomcat/util/net/**" />
+      <include name ="org/apache/tomcat/util/res/**" />
+    </javac>
+    
+    <copy todir="classes" >
+      <fileset dir="java" 
+               includes="**/*.properties **/*.xml"/>
+    </copy>
+  </target>
+  
+  <target name="compile-extra" >
+    <mkdir dir="classes" />
+    <javac destdir="classes" source="${source.vm}" 
            target="${target.vm}"
            includeJavaRuntime="false"
            deprecation="false" 
            debug="false"  >
-      <src path="${sandbox.home}/tomcat-lite/java" />
+      <src path="java" />
       <classpath>
         <path refid="runtime-deps" />        
         <pathelement location="${tc6.classes}"/>
       </classpath>
-      <exclude name="org/apache/tomcat/standalone/**"/>
     </javac>
     
-    <copy todir="${sandbox.home}/classes" >
-      <fileset dir="${sandbox.home}/tomcat-lite/java" 
+    <copy todir="classes" >
+      <fileset dir="java" 
                includes="**/*.properties **/*.xml"/>
     </copy>
   </target>
 
-  <target name="clean-compile">
-    <delete dir="${sandbox.home}/classes" includes="**"/>
-    <delete dir="${tc6.classes}" includes="**"/>
+  <target name="clean">
+    <delete dir="classes" includes="**"/>
   </target>
   
-  <target name="tomcat6-deps">
-    <jar destfile="resources/javax.servlet.jar" >
-      <fileset dir="${tc6.classes}" >
-        <include name="javax/servlet/*"/>
-        <include name="javax/servlet/http/*"/>
-      </fileset>
-    </jar>
-    <jar destfile="resources/coyote-api.jar" >
-      <fileset dir="${tc6.classes}" >
-        <include name="org/apache/coyote/*"/>
-        <include name="org/apache/coyote/http11/Constants.class"/>
-        <include name="org/apache/coyote/http11/InputFilter.class"/>
-        <include name="org/apache/coyote/http11/OutputFilter.class"/>
-        <include name="org/apache/coyote/http11/LocalStrings.properties"/>
-        <include name="org/apache/coyote/http11/filters/**"/>
-      </fileset>
-    </jar>
-    <jar destfile="resources/tomcat-utils.jar" >
-      <fileset dir="${tc6.classes}" >
-        <include name="org/apache/tomcat/util/collections/*"/>
-        <include name="org/apache/tomcat/util/http/res/LocalStrings.properties"/>
-        <include name="org/apache/tomcat/util/res/**"/>
-        <include name="org/apache/tomcat/util/*"/>
-        <include name="org/apache/tomcat/util/net/URL*"/>
-        <include name="org/apache/tomcat/util/*"/>
-      </fileset>
-    </jar>
-  </target>
   
   <target name="tomcat-lite.jar" depends="compile,pack_tomcat-lite.jar"/>
   
   <target name="pack_tomcat-lite.jar" >
     <jar destfile="tomcat-lite.jar" manifest="resources/tomcat-lite.MF">
-      <fileset dir="${sandbox.home}/classes" >
-        <include name="org/apache/commons/logging/*.class"/>
-        <include name="org/apache/tomcat/lite/**"/>
-        <include name="org/apache/tomcat/servlets/**"/>
-        <!-- exclude name="org/apache/tomcat/servlets/deploy/**"/ -->
-        <include name="org/apache/tomcat/util/buf/**"/>
-        <include name="org/apache/tomcat/util/loader/**"/>
-        <include name="org/apache/tomcat/util/net/**"/>
+      <fileset dir="classes" >
+        <include name="org/apache/commons/logging/**"/>
+        <include name ="org/apache/tomcat/lite/**" />
+
+        <include name ="org/apache/tomcat/servlets/config/**" />
+        <include name ="org/apache/tomcat/servlets/deploy/**" />
+        <exclude name="**/WebAnnotation.java"/>
+        <include name ="org/apache/tomcat/servlets/file/**" />
+        <exclude name="**/Webdav2Servlet.java"/>
+        <include name ="org/apache/tomcat/servlets/log/**" />
+        <include name ="org/apache/tomcat/servlets/sec/**" />
+        <include name ="org/apache/tomcat/servlets/session/**" />
+        <include name ="org/apache/tomcat/servlets/util/**" />
+        <include name ="org/apache/tomcat/util/*" />
+        <include name ="org/apache/tomcat/util/buf/**" />
+        <include name ="org/apache/tomcat/util/collections/**" />
+        <include name ="org/apache/tomcat/util/http/**" />        
+        <include name ="org/apache/tomcat/util/net/**" />
+        <include name ="org/apache/tomcat/util/res/**" />
       </fileset>
-      <zipfileset src="resources/javax.servlet.jar"/>
-      <zipfileset src="resources/coyote-api.jar"/>
-      <zipfileset src="resources/tomcat-utils.jar"/>
+      
+      <zipfileset src   ="external/javax.servlet.jar"/>
     </jar>
 
-    <jar destfile="webapps/__x_classpath/WEB-INF/lib/jasper.jar" 
-         manifest="resources/jasper.MF">
-      <fileset dir="${tc6.classes}" >
-        <include name="org/apache/jasper/**"/>
-      </fileset>
-    </jar>
-    <mkdir dir="webapps/__x_deploy/WEB-INF/lib"/>
-    <jar destfile="webapps/__x_deploy/WEB-INF/lib/javax.annotation.jar" 
-         manifest="resources/deploy.MF">
-      <fileset dir="${tc6.classes}" >
-        <include name="javax/annotation/**"/>        
-      </fileset>
-    </jar>
+    <!--mkdir dir="webapps/__x_deploy/WEB-INF/lib"/>
     <jar destfile="webapps/__x_deploy/WEB-INF/lib/deploy.jar" 
          manifest="resources/deploy.MF">
-      <fileset dir="${sandbox.home}/classes" >
+      <fileset dir="classes" >
         <include name="org/apache/tomcat/servlets/deploy/**"/>        
       </fileset>
-    </jar>
+    </jar-->
     
   </target>
 
-  <target name="all" depends="tomcat-lite.jar,tomcat-runtime.jar" />
-
-  <!-- Tomcat runtime -->
+  <target name="all" depends="tomcat-lite.jar" />
     
-  <target name="tomcat-runtime.jar"
-    description="Build single jar tomcat lite" 
-    depends="compile,pack_tomcat-runtime.jar">
-  </target>
-  
-  <target name="pack_tomcat-runtime.jar"
-          description="Pack single jar tomcat" >
-    <mkdir dir="runtime" />
-    <jar jarfile="tomcat-runtime.jar" 
-         manifest="resources/runtime.MF">
+  <!-- ============ Download targets for deps ================ -->
+  <target name="download" 
+      description="Prepare the external deps dir, using a tomcat6 build dir. Call this first">
+    <mkdir dir="external"/>
+    <jar destfile="external/javax.annotation.jar">
       <fileset dir="${tc6.classes}" >
-        <exclude name="org/apache/jasper/**"/>
+        <include name="javax/annotation/**"/>        
       </fileset>
-      <fileset dir="${sandbox.home}/classes" >
-        <include name="org/apache/tomcat/standalone/**"/>
+    </jar>
+    <jar destfile="external/javax.servlet.jar" >
+      <fileset dir="${tc6.classes}" >
+        <include name="javax/servlet/*"/>
+        <include name="javax/servlet/http/*"/>
+      </fileset>
+    </jar>
+    <jar destfile="external/jasper.jar" 
+         manifest="resources/jasper.MF">
+      <fileset dir="${tc6.classes}" >
+        <include name="org/apache/jasper/**"/>
       </fileset>
     </jar>
   </target>
 
-
-  <!-- ============ Download targets for deps ================ -->
-
-  <target name="download" >
-  </target>
-
-  <target name="testexist">
-    <echo message="Testing  for ${destfile}"/>
-    <available file="${destfile}" property="exist"/>
-  </target>
-
-  <target name="setproxy"  if="useproxy">
-    <taskdef name="setproxy"
-      classname="org.apache.tools.ant.taskdefs.optional.net.SetProxy" />
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>
-    <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/>
-  </target>
-
-
-  <target name="downloadzip" unless="exist" depends="setproxy,testexist">
-    <get src="${sourcefile}" dest="${base.path}/file.zip" />
-    <mkdir dir="${destdir}" />
-    <unzip src="${base.path}/file.zip" dest="${destdir}"/>
-    <delete file="${base.path}/file.zip"/>
-  </target>
-  
 </project>

Added: tomcat/sandbox/tomcat-lite/external/jasper.jar
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/external/jasper.jar?view=auto&rev=534293
==============================================================================
Binary file - no diff available.

Propchange: tomcat/sandbox/tomcat-lite/external/jasper.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tomcat/sandbox/tomcat-lite/external/javax.annotation.jar
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/external/javax.annotation.jar?view=auto&rev=534293
==============================================================================
Binary file - no diff available.

Propchange: tomcat/sandbox/tomcat-lite/external/javax.annotation.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tomcat/sandbox/tomcat-lite/external/javax.servlet.jar
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/external/javax.servlet.jar?view=auto&rev=534293
==============================================================================
Binary file - no diff available.

Propchange: tomcat/sandbox/tomcat-lite/external/javax.servlet.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: tomcat/sandbox/tomcat-lite/java/org/apache/commons/logging/LogFactory.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/commons/logging/LogFactory.java?view=diff&rev=534293&r1=534292&r2=534293
==============================================================================
--- tomcat/sandbox/tomcat-lite/java/org/apache/commons/logging/LogFactory.java (original)
+++ tomcat/sandbox/tomcat-lite/java/org/apache/commons/logging/LogFactory.java Tue May  1 19:22:45 2007
@@ -166,7 +166,7 @@
      */
     public Log getInstance(String name)
         throws LogConfigurationException {
-        return DirectJDKLog.getInstance(name);
+        return SyserrLog.getInstance(name);
     }
 
 
@@ -178,7 +178,7 @@
      * class loader would prevent garbage collection.
      */
     public void release() {
-        DirectJDKLog.release();
+        SyserrLog.release();
     }
 
     /**

Added: tomcat/sandbox/tomcat-lite/java/org/apache/commons/logging/SyserrLog.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/commons/logging/SyserrLog.java?view=auto&rev=534293
==============================================================================
--- tomcat/sandbox/tomcat-lite/java/org/apache/commons/logging/SyserrLog.java (added)
+++ tomcat/sandbox/tomcat-lite/java/org/apache/commons/logging/SyserrLog.java Tue May  1 19:22:45 2007
@@ -0,0 +1,488 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2004 Costin Manolache
+ * 
+ * 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.
+ */ 
+
+package org.apache.commons.logging;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+
+
+/**
+ * The log is sent to System.err, with a fixed format - same as JdkLoggerFormatter.
+ * 
+ * 
+ * 
+ * @author Costin Manolache
+ */
+public class SyserrLog implements Log {
+    /**
+     * TODO: either weak references or return a new instance, don't keep logs
+     */
+    static Hashtable/*<String, Log >*/ instances = new Hashtable(); 
+    static SimpleLogConfig logConfig=new SimpleLogConfig();
+
+    static {
+        LogFactory.getFactory().setLogConfig(logConfig);
+    }
+    
+    private String name = null;
+    private int currentLevel=SimpleLogConfig.LOG_LEVEL_DEBUG;
+    
+    public final boolean isErrorEnabled() {
+        return ( currentLevel <= SimpleLogConfig.LOG_LEVEL_ERROR);
+    }
+    
+    public final boolean isWarnEnabled() {
+        return ( currentLevel <= SimpleLogConfig.LOG_LEVEL_WARN);
+    }
+    
+    public final boolean isInfoEnabled() {
+        return ( currentLevel <= SimpleLogConfig.LOG_LEVEL_INFO);
+    }
+    
+    public final boolean isDebugEnabled() {
+        return ( currentLevel <= SimpleLogConfig.LOG_LEVEL_DEBUG);
+    }
+    
+    public final boolean isFatalEnabled() {
+        return ( currentLevel <= SimpleLogConfig.LOG_LEVEL_FATAL);
+    }
+    
+    public final boolean isTraceEnabled() {
+        return ( currentLevel <= SimpleLogConfig.LOG_LEVEL_TRACE);
+    }
+    
+    public final void debug(Object message) {
+        if (( currentLevel <= SimpleLogConfig.LOG_LEVEL_DEBUG)) {
+            log(SimpleLogConfig.LOG_LEVEL_DEBUG, message, null);
+        }
+    }
+    
+    public final void debug(Object message, Throwable t) {
+        if (( currentLevel <= SimpleLogConfig.LOG_LEVEL_DEBUG)) {
+            log(SimpleLogConfig.LOG_LEVEL_DEBUG, message, t);
+        }
+    }
+    
+    public final void trace(Object message) {
+        if (( currentLevel <= SimpleLogConfig.LOG_LEVEL_TRACE)) {
+            log(SimpleLogConfig.LOG_LEVEL_TRACE, message, null);
+        }
+    }
+    
+    public final void trace(Object message, Throwable t) {
+        if (( currentLevel <= SimpleLogConfig.LOG_LEVEL_TRACE)) {
+            log(SimpleLogConfig.LOG_LEVEL_TRACE, message, t);
+        }
+    }
+    
+    public final void info(Object message) {
+        if (( currentLevel <= SimpleLogConfig.LOG_LEVEL_INFO)) {
+            log(SimpleLogConfig.LOG_LEVEL_INFO,message,null);
+        }
+    }
+    
+    public final void info(Object message, Throwable t) {        
+        if (( currentLevel <= SimpleLogConfig.LOG_LEVEL_INFO)) {
+            log(SimpleLogConfig.LOG_LEVEL_INFO, message, t);
+        }
+    }
+    
+    public final void warn(Object message) {
+        if (( currentLevel <= SimpleLogConfig.LOG_LEVEL_WARN)) {
+            log(SimpleLogConfig.LOG_LEVEL_WARN, message, null);
+        }
+    }
+    
+    public final void warn(Object message, Throwable t) {
+        if (( currentLevel <= SimpleLogConfig.LOG_LEVEL_WARN)) {
+            log(SimpleLogConfig.LOG_LEVEL_WARN, message, t);
+        }
+    }
+    
+    public final void error(Object message) {
+        if (( currentLevel <= SimpleLogConfig.LOG_LEVEL_ERROR)) {
+            log(SimpleLogConfig.LOG_LEVEL_ERROR, message, null);
+        }
+    }
+    
+    public final void error(Object message, Throwable t) {
+        if (( currentLevel <= SimpleLogConfig.LOG_LEVEL_ERROR)) {
+            log(SimpleLogConfig.LOG_LEVEL_ERROR, message, t);
+        }
+    }
+    
+    public final void fatal(Object message) {
+        if (( currentLevel <= SimpleLogConfig.LOG_LEVEL_FATAL)) {
+            log(SimpleLogConfig.LOG_LEVEL_FATAL, message, null);
+        }
+    }
+    
+    public final void fatal(Object message, Throwable t) {
+        if (( currentLevel <= SimpleLogConfig.LOG_LEVEL_FATAL)) {
+            log(SimpleLogConfig.LOG_LEVEL_FATAL, message, t);
+        }
+    }
+    
+    SyserrLog(String name) {
+        this.name = name;
+    }
+    
+    void setLevel( int lvl ) {
+        this.currentLevel=lvl;
+    }
+    
+    
+    private void log(int level, Object message, Throwable t) {
+        // Use a string buffer for better performance
+        StringBuffer buf = new StringBuffer();
+        
+        buf.append(System.currentTimeMillis());
+        buf.append(" ");
+        
+        // pad to 8 to make it more readable 
+        for( int i=0; i<8-buf.length(); i++ ) { buf.append(" "); }
+        
+        int lastDot=name.indexOf('.');
+        if(  lastDot <= 0 && lastDot < name.length() - 1 ) {
+            name = name.substring(name.lastIndexOf(".") + 1);
+        }
+        
+        // Append the name of the log instance if so configured
+        buf.append(name);
+        
+        // pad to 20 chars 
+        for( int i=0; i<8-buf.length(); i++ ) { buf.append(" "); }
+        
+        //      Append a readable representation of the log level.
+        switch(level) {
+        case SimpleLogConfig.LOG_LEVEL_TRACE: buf.append(" T "); break;
+        case SimpleLogConfig.LOG_LEVEL_DEBUG: buf.append(" D "); break;
+        case SimpleLogConfig.LOG_LEVEL_INFO:  buf.append(" I ");  break;
+        case SimpleLogConfig.LOG_LEVEL_WARN:  buf.append(" W ");  break;
+        case SimpleLogConfig.LOG_LEVEL_ERROR: buf.append(" E "); break;
+        //case SimpleLogConfig.LOG_LEVEL_FATAL: buf.append(" F "); break;
+        }
+        
+        // Append the message
+        buf.append(String.valueOf(message));
+        
+        // Append stack trace if not null
+        if(t != null) {
+            buf.append(" \n");
+            
+            java.io.StringWriter sw= new java.io.StringWriter(1024);
+            java.io.PrintWriter pw= new java.io.PrintWriter(sw);
+            t.printStackTrace(pw);
+            pw.close();
+            buf.append(sw.toString());
+        }
+        
+        // Print to the appropriate destination
+        System.err.println(buf);
+
+    }
+
+    // -------------- Log management ----------------------- 
+    
+
+    /**
+     * This method can be overriden to return a different log implementation.
+     * Applications should use the static getLog() method.
+     */
+    static Log getInstance(String name) throws LogConfigurationException {
+        Log log = (Log) instances.get(name);
+        if (log == null) {
+            synchronized( SyserrLog.class ) {
+                log = (Log) instances.get(name);
+                if( log!=null ) return log;
+                
+                log = new SyserrLog(name);
+                int lvl=logConfig.getLevel(name);
+                ((SyserrLog)log).setLevel( lvl );
+                instances.put(name, log);
+            }
+        }
+        return log;
+    }
+            
+
+    /** Release this log factory.
+     * Should not be called from user code - only by containers.
+     */
+    static void release() {
+        instances.clear();
+    }
+    
+    // All this is needed to support dynamic reconfiguration. 
+    // Without reconfig - there is no need for the callback or to keep
+    // the instances - and this can be a simple thin wrapper
+    
+    static void reset() {
+        // reset all loggers
+        Enumeration en=instances.keys();
+        while(en.hasMoreElements()) {
+            String ln=(String)en.nextElement();
+            SyserrLog log=(SyserrLog)instances.get( ln );
+            int lvl=logConfig.getLevel( ln );
+            log.setLevel(lvl);
+        }
+    }
+    
+    static void levelChange(String name, int level) {
+        SyserrLog log=(SyserrLog)instances.get( name );
+        log.setLevel(level);
+    }
+    
+    
+    static class SimpleLogConfig extends Properties {
+        // values from JDK Level
+        public static final int LOG_LEVEL_TRACE  = 400;
+        public static final int LOG_LEVEL_DEBUG  = 500;
+        public static final int LOG_LEVEL_INFO   = 800;
+        public static final int LOG_LEVEL_WARN   = 900;
+        public static final int LOG_LEVEL_ERROR  = 1000;
+        public static final int LOG_LEVEL_FATAL  = 1000;
+
+        private static String CAT_PREF="log4j.category.";
+        
+        private int defaultLevel=LOG_LEVEL_DEBUG; 
+     
+        public SimpleLogConfig() {
+          init();
+        }
+        /**
+         * Return a configuration attribute.
+         *   
+         */
+        public Object getAttribute(String name) {
+            if( "loglevels".equals(name)) {
+                
+            }
+            return (this.get(name));
+        }
+        
+        
+        /**
+         * Return config properties.
+         */
+        public String[] getAttributeNames() {
+            String results[] = new String[this.size()];
+            Enumeration keys = this.keys();
+            int i=0;
+            while (keys.hasMoreElements()) {
+                results[i++]=(String) keys.nextElement();
+            }
+            return results;
+        }
+        
+        /**
+         * Not used
+         */
+        public void removeAttribute(String name) {
+            this.remove(name);
+        }
+        
+        /**
+         * Set a config parameter. This allow changing properties at run time.
+         * Some log implementations ( log4j, jdk1.4 ) allow reloading of the config
+         * file. However that means you have to edit the file, then wait until reloading
+         * kicks in.
+         * 
+         * Supported names:
+         *  - log4j.category.LOGNAME - change log level for a particular logger.
+         *  - log4j.configuration - load/reload a config file. This can be used
+         *     before the first getLog to specify an alternate config file name, or at 
+         *     any time after that to trigger reloading/reconfiguration.
+         * 
+         */
+        public void setAttribute(String name, Object value) {
+            if (value == null) {
+                this.remove(name);
+            } else {
+                this.put(name, value);
+            }
+            if("log4j.configuration".equals(name)) {
+                this.clear();
+                // reconfigure with the new setting
+                init();
+                
+                SyserrLog.reset();
+            }
+            if( name.startsWith( CAT_PREF)) {
+                name=name.substring(CAT_PREF.length());
+                this.put( name, (String)value);
+                int lvl=getLevel( name );
+                SyserrLog.levelChange( name, lvl );
+            }
+        }
+        
+        public int getLevel( String logName ) {
+            String name=logName;
+            // Set log level from properties
+            String lvl = this.getProperty(CAT_PREF + name);
+            
+            int i = String.valueOf(name).lastIndexOf(".");
+
+            while(null == lvl && i > -1) {
+                name = name.substring(0,i);
+                lvl = this.getProperty(CAT_PREF + name);
+                i = String.valueOf(name).lastIndexOf(".");
+            }
+            
+            if( lvl==null ) return defaultLevel;
+            return getLevelValue( lvl );
+            
+            //((LogImpl)log).setLevel( defaultLevel ); 
+        }
+
+
+        /** Read config file. Called from first getLog(), or when setAttribute()
+         * is called with log4j.config attribute
+         */
+        private void init() {
+            synchronized( SimpleLogConfig.class ) {
+                InputStream is=getConfig();
+                
+                if( is!=null ) {
+                    try {
+                        this.load(is);
+                    } catch( Throwable t ) {
+                        t.printStackTrace();
+                    }
+                }
+                
+                // Get default category:
+                String rootCat=this.getProperty("log4j.rootCategory");
+                if( rootCat != null ) {
+                    int comma=rootCat.indexOf(',');
+                    if( comma >= 0 ) rootCat=rootCat.substring(0, comma);
+                    rootCat=rootCat.trim();
+                    defaultLevel= getLevelValue( rootCat );
+                }
+            }
+        }
+        
+        /** Convert from string to int form of level 
+         * 
+         * @param lvl
+         * @return
+         */
+        private int getLevelValueLog4j( String lvl ) {
+            if("all".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_TRACE;
+            } else if("trace".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_TRACE;
+            } else if("debug".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_DEBUG;
+            } else if("info".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_INFO;
+            } else if("warn".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_WARN;
+            } else if("error".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_ERROR;
+            } else if("fatal".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_FATAL;
+            } else if("off".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_FATAL + 1 ;
+            }
+            return SimpleLogConfig.LOG_LEVEL_WARN;
+        }
+
+        public int getLevelValue( String lvl ) {
+            if("all".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_TRACE;
+            } else if("finer".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_TRACE;
+            } else if("fine".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_DEBUG;
+            } else if("info".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_INFO;
+            } else if("warning".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_WARN;
+            } else if("severe".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_ERROR;
+            } else if("severe".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_FATAL;
+            } else if("off".equalsIgnoreCase(lvl)) {
+                return SimpleLogConfig.LOG_LEVEL_FATAL + 1 ;
+            }
+            return SimpleLogConfig.LOG_LEVEL_WARN;
+        }
+
+
+        /** Locate a config stream:
+         * 
+         *  Uses:
+         *   - logging.configuration system property
+         *   - ./logging.properties file
+         *   - conf/logging.properties
+         *   - logging.properties in classpath
+         * 
+         * @return
+         */
+        public static InputStream getConfig() {
+            String base="logging"; // "log4j"
+            // Initialize:
+            // 1. Find config file name 
+            String confF=System.getProperty(base + ".configuration");
+            if( confF!=null ) {
+                // Check if it is a path
+            } else {
+                confF=base + ".properties";
+            }
+            
+            // URL
+            try {
+                URL url=new URL( confF );
+                InputStream is=url.openStream();
+                if( is!=null ) return is;
+            } catch( Throwable t ) {
+              // t.printStackTrace(); 
+            }
+
+            // 2. Try to get the config from a file ( or conf/ )
+            File f=new File( confF );
+            if( ! f.exists() ) {
+                f=new File( "conf/" + confF );
+            }
+            
+            if( f.exists() ) {
+                try {
+                    return new FileInputStream( f );
+                } catch (FileNotFoundException e) {
+                    // ignore
+                }
+            }
+            
+            // 3. Load it from CLASSPATH
+            InputStream is=SimpleLogConfig.class.getResourceAsStream( confF );
+            
+            //No thread class loader 
+            if( is!= null ) return is;
+            
+            return null;
+        }
+    }
+
+}

Added: tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/Enumerator.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/Enumerator.java?view=auto&rev=534293
==============================================================================
--- tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/Enumerator.java (added)
+++ tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/Enumerator.java Tue May  1 19:22:45 2007
@@ -0,0 +1,173 @@
+/*
+ * 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.
+ */
+
+
+package org.apache.tomcat.lite;
+
+
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.NoSuchElementException;
+
+
+/**
+ * Adapter class that wraps an <code>Enumeration</code> around a Java2
+ * collection classes object <code>Iterator</code> so that existing APIs
+ * returning Enumerations can easily run on top of the new collections.
+ * Constructors are provided to easliy create such wrappers.
+ *
+ * @author Craig R. McClanahan
+ */
+public final class Enumerator implements Enumeration {
+
+
+    // ----------------------------------------------------------- Constructors
+
+
+    /**
+     * Return an Enumeration over the values of the specified Collection.
+     *
+     * @param collection Collection whose values should be enumerated
+     */
+    public Enumerator(Collection collection) {
+
+        this(collection.iterator());
+
+    }
+
+
+    /**
+     * Return an Enumeration over the values of the specified Collection.
+     *
+     * @param collection Collection whose values should be enumerated
+     * @param clone true to clone iterator
+     */
+    public Enumerator(Collection collection, boolean clone) {
+
+        this(collection.iterator(), clone);
+
+    }
+
+
+    /**
+     * Return an Enumeration over the values returned by the
+     * specified Iterator.
+     *
+     * @param iterator Iterator to be wrapped
+     */
+    public Enumerator(Iterator iterator) {
+
+        super();
+        this.iterator = iterator;
+
+    }
+
+
+    /**
+     * Return an Enumeration over the values returned by the
+     * specified Iterator.
+     *
+     * @param iterator Iterator to be wrapped
+     * @param clone true to clone iterator
+     */
+    public Enumerator(Iterator iterator, boolean clone) {
+
+        super();
+        if (!clone) {
+            this.iterator = iterator;
+        } else {
+            List list = new ArrayList();
+            while (iterator.hasNext()) {
+                list.add(iterator.next());
+            }
+            this.iterator = list.iterator();   
+        }
+
+    }
+
+
+    /**
+     * Return an Enumeration over the values of the specified Map.
+     *
+     * @param map Map whose values should be enumerated
+     */
+    public Enumerator(Map map) {
+
+        this(map.values().iterator());
+
+    }
+
+
+    /**
+     * Return an Enumeration over the values of the specified Map.
+     *
+     * @param map Map whose values should be enumerated
+     * @param clone true to clone iterator
+     */
+    public Enumerator(Map map, boolean clone) {
+
+        this(map.values().iterator(), clone);
+
+    }
+
+
+    // ----------------------------------------------------- Instance Variables
+
+
+    /**
+     * The <code>Iterator</code> over which the <code>Enumeration</code>
+     * represented by this class actually operates.
+     */
+    private Iterator iterator = null;
+
+
+    // --------------------------------------------------------- Public Methods
+
+
+    /**
+     * Tests if this enumeration contains more elements.
+     *
+     * @return <code>true</code> if and only if this enumeration object
+     *  contains at least one more element to provide, <code>false</code>
+     *  otherwise
+     */
+    public boolean hasMoreElements() {
+
+        return (iterator.hasNext());
+
+    }
+
+
+    /**
+     * Returns the next element of this enumeration if this enumeration
+     * has at least one more element to provide.
+     *
+     * @return the next element of this enumeration
+     *
+     * @exception NoSuchElementException if no more elements exist
+     */
+    public Object nextElement() throws NoSuchElementException {
+
+        return (iterator.next());
+
+    }
+
+
+}

Modified: tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/FilterConfigImpl.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/FilterConfigImpl.java?view=diff&rev=534293&r1=534292&r2=534293
==============================================================================
--- tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/FilterConfigImpl.java (original)
+++ tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/FilterConfigImpl.java Tue May  1 19:22:45 2007
@@ -28,7 +28,6 @@
 import javax.servlet.ServletException;
 
 import org.apache.tomcat.servlets.config.FilterData;
-import org.apache.tomcat.servlets.util.Enumerator;
 
 
 /** 

Modified: tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/RequestDispatcherImpl.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/RequestDispatcherImpl.java?view=diff&rev=534293&r1=534292&r2=534293
==============================================================================
--- tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/RequestDispatcherImpl.java (original)
+++ tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/RequestDispatcherImpl.java Tue May  1 19:22:45 2007
@@ -35,7 +35,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.tomcat.lite.util.MappingData;
-import org.apache.tomcat.lite.webmap.WebappFilterMapper;
 import org.apache.tomcat.util.buf.CharChunk;
 import org.apache.tomcat.util.buf.MessageBytes;
 import org.apache.tomcat.util.res.StringManager;
@@ -43,18 +42,13 @@
 /**
  *
  */
-final class RequestDispatcherImpl implements RequestDispatcher {
+public final class RequestDispatcherImpl implements RequestDispatcher {
     /**
      * Thread local mapping data. 
      */
     private transient ThreadLocal localMappingData = new ThreadLocal();
 
     /**
-     * Thread local URI message bytes.
-     */
-    private transient ThreadLocal localUriMB = new ThreadLocal();
-
-    /**
      * The request attribute under which the original servlet path is stored
      * on an forwarded dispatcher request.
      */
@@ -325,8 +319,8 @@
         unwrapRequest();
 
         // This is not a real close in order to support error processing
-        if ( log.isDebugEnabled() )
-            log.debug(" Disabling the response for futher output");
+//        if ( log.isDebugEnabled() )
+//            log.debug(" Disabling the response for futher output");
 
         if  (response instanceof ServletResponseImpl) {
             ((ServletResponseImpl) response).flushBuffer();
@@ -438,14 +432,11 @@
         // TODO: recycle RequestDispatcher stack and associated objects
         // instead of this object
         
-        MessageBytes uriMB = (MessageBytes) localUriMB.get();
-        if (uriMB == null) {
-            uriMB = MessageBytes.newInstance();
-            CharChunk uriCC = uriMB.getCharChunk();
-            uriCC.setLimit(-1);
-            localUriMB.set(uriMB);
-        } else {
-            uriMB.recycle();
+        // Retrieve the thread local mapping data
+        MappingData mappingData = (MappingData) localMappingData.get();
+        if (mappingData == null) {
+            mappingData = new MappingData();
+            localMappingData.set(mappingData);
         }
 
         // Get query string
@@ -456,15 +447,10 @@
             pos = path.length();
         }
  
-        // Retrieve the thread local mapping data
-        MappingData mappingData = (MappingData) localMappingData.get();
-        if (mappingData == null) {
-            mappingData = new MappingData();
-            localMappingData.set(mappingData);
-        }
-
         // Map the URI
-        CharChunk uriCC = uriMB.getCharChunk();
+        MessageBytes uriMB = mappingData.localURIBytes;
+        uriMB.recycle();
+        //CharChunk uriCC = uriMB.getCharChunk();
         try {
             /*
              * Ignore any trailing path params (separated by ';') for mapping
@@ -477,9 +463,15 @@
                 semicolon = -1;
             }
             if (ctx.getContextPath().length() > 1 )
-                uriCC.append(ctx.getContextPath());
-            uriCC.append(path, 0, semicolon > 0 ? semicolon : pos);
-            
+                mappingData.charBuffer.append(ctx.getContextPath());
+            mappingData.charBuffer.append(path, 0, 
+                    semicolon > 0 ? semicolon : pos);
+
+            // Wrap the buffer 
+            uriMB.setChars(mappingData.charBuffer.getBuffer(),
+                    mappingData.charBuffer.getOffset(),
+                    mappingData.charBuffer.getLength());
+
             ctx.getMapper().map(uriMB, mappingData);
             
             // at least default wrapper must be returned
@@ -490,7 +482,9 @@
              * RequestDispatcher's requestURI
              */
             if (semicolon > 0) {
-                uriCC.append(path, semicolon, pos - semicolon);
+                // I don't think this will be used in future
+                mappingData.charBuffer.append(path, 
+                        semicolon, pos - semicolon);
             }
         } catch (Exception e) {
             log.error("getRequestDispatcher()", e);

Modified: tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletConfigImpl.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletConfigImpl.java?view=diff&rev=534293&r1=534292&r2=534293
==============================================================================
--- tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletConfigImpl.java (original)
+++ tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletConfigImpl.java Tue May  1 19:22:45 2007
@@ -17,13 +17,10 @@
 
 package org.apache.tomcat.lite;
 
-import java.io.IOException;
 import java.io.PrintStream;
-import java.io.Serializable;
 import java.lang.reflect.Method;
 import java.util.Enumeration;
 import java.util.HashSet;
-import java.util.Map;
 import java.util.Stack;
 
 import javax.servlet.Servlet;
@@ -34,7 +31,6 @@
 import javax.servlet.UnavailableException;
 
 import org.apache.tomcat.servlets.config.ServletData;
-import org.apache.tomcat.servlets.util.Enumerator;
 import org.apache.tomcat.util.IntrospectionUtils;
 
 /**
@@ -311,8 +307,6 @@
         // If not SingleThreadedModel, return the same instance every time
         if (instance != null) {
             countAllocated++;
-            System.err.println("New servet " + instance + " " + 
-                    countAllocated + " " + getServletName());
             return (instance);
         }
         

Modified: tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletContextImpl.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletContextImpl.java?view=diff&rev=534293&r1=534292&r2=534293
==============================================================================
--- tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletContextImpl.java (original)
+++ tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletContextImpl.java Tue May  1 19:22:45 2007
@@ -21,11 +21,13 @@
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
+import java.io.FilenameFilter;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Serializable;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.net.URLClassLoader;
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -35,6 +37,7 @@
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
+import java.util.TreeMap;
 import java.util.Map.Entry;
 
 import javax.servlet.Filter;
@@ -50,21 +53,18 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.tomcat.lite.TomcatLite.ContextConfigData;
 import org.apache.tomcat.lite.util.CharsetMapper;
-import org.apache.tomcat.lite.webmap.WebappFilterMapper;
-import org.apache.tomcat.lite.webmap.WebappServletMapper;
 import org.apache.tomcat.servlets.config.FilterData;
 import org.apache.tomcat.servlets.config.FilterMappingData;
 import org.apache.tomcat.servlets.config.ServletData;
 import org.apache.tomcat.servlets.config.WebAppData;
-import org.apache.tomcat.servlets.deploy.WebXml;
+import org.apache.tomcat.servlets.config.WebXml;
+import org.apache.tomcat.servlets.deploy.InitServlet;
+import org.apache.tomcat.servlets.deploy.InitServlet.ContextConfigData;
 import org.apache.tomcat.servlets.file.WebdavServlet;
 import org.apache.tomcat.servlets.session.SessionManagerServlet;
-import org.apache.tomcat.servlets.util.Enumerator;
-import org.apache.tomcat.servlets.util.RequestUtil;
 import org.apache.tomcat.servlets.util.UrlUtils;
-import org.apache.tomcat.util.loader.Repository;
+import org.apache.tomcat.util.http.RequestUtil;
 import org.apache.tomcat.util.res.StringManager;
 
 
@@ -97,6 +97,8 @@
 
     transient Log log;
 
+    /** Prefix for all internal webapps.
+     */
     public static String CONTAINER_PREFIX = "__x_";
 
     /** 
@@ -166,14 +168,12 @@
 
     transient CharsetMapper charsetMapper = new CharsetMapper();
 
-    transient Repository repository;
+    //transient Repository repository;
     
     transient TomcatLite facade;
 
     private WebAppData webAppData;
 
-    private ContextConfigData contextConfig;
-
     // ------------------------------------------------- ServletContext Methods
     public ServletContextImpl(TomcatLite facade) {
         this.facade = facade;
@@ -194,10 +194,18 @@
         log = LogFactory.getLog("webapp." + path.replace('/', '.'));
     }
     
+    /** The directory where this app is based.
+     * 
+     * @param basePath
+     */
     void setBasePath(String basePath) {
         this.basePath = basePath;        
     }
 
+    /** The directory where this app is based.
+     * 
+     * @param basePath
+     */
     public String getBasePath() {
         return basePath;
     }
@@ -248,6 +256,12 @@
         return servlets;
     }
 
+    /**
+     *  Add a servlet to the context.
+     *  Called from processWebAppData()
+     * 
+     * @param servletConfig
+     */
     public void addServletConfig(ServletConfigImpl servletConfig) {
         servlets.put(servletConfig.getServletName(), servletConfig);
         
@@ -263,10 +277,6 @@
     }
     
 
-    public void setRepository(Repository repo) {
-        repository = repo;
-    }
-    
     private boolean getCrossContext() {
         return true;
     }
@@ -372,7 +382,12 @@
         if ((uri == null) || (!uri.startsWith("/")))
             return (null);
 
-        ServletContextImpl child = facade.getContextMapper().getContext(this, uri);
+        ServletContextImpl child = null;
+        try {
+            child = facade.getContext(this, uri);
+        } catch (IOException e) {
+        } catch (ServletException e) {
+        }
 
         if (child == null)
             return (null);
@@ -512,18 +527,20 @@
     }
 
     ThreadLocal requestDispatcherStack = new ThreadLocal();
+
+    private ClassLoader classLoader;
     
-    private RequestDispatcherImpl getRequestDispatcher() {
-        ArrayList<RequestDispatcherImpl> list = 
-            (ArrayList)requestDispatcherStack.get();
-        if (list == null) {
-            list = new ArrayList();
-            requestDispatcherStack.set(list);
-        }
-        
-        
-        return null;
-    }
+//    private RequestDispatcherImpl getRequestDispatcher() {
+//        ArrayList/*<RequestDispatcherImpl>*/ list = 
+//            (ArrayList)requestDispatcherStack.get();
+//        if (list == null) {
+//            list = new ArrayList();
+//            requestDispatcherStack.set(list);
+//        }
+//        
+//        
+//        return null;
+//    }
 
     public void resetDispatcherStack() {
         
@@ -882,9 +899,27 @@
     }
     public void initServlets() throws ServletException {
         Iterator fI = getServletConfigs().values().iterator();
+        Map/*<Integer, List<ServletConfigImpl>>*/ onStartup = 
+            new TreeMap/*<Integer, List<ServletConfigImpl>>*/();
         while (fI.hasNext()) {
             ServletConfigImpl fc = (ServletConfigImpl)fI.next();
             if (fc.getLoadOnStartup() > 0 ) {
+                Integer i = new Integer(fc.getLoadOnStartup());
+                List/*<ServletConfigImpl>*/ old = (List)onStartup.get(i);
+                if (old == null) {
+                    old = new ArrayList/*<ServletConfigImpl>*/();
+                    onStartup.put(i, old);
+                }
+                old.add(fc);
+            }
+        }
+        Iterator keys = onStartup.keySet().iterator();
+        while (keys.hasNext()) {
+            Integer key = (Integer)keys.next();
+            List/*<ServletConfigImpl>*/ servlets = (List)onStartup.get(key); 
+            Iterator servletsI = servlets.iterator();
+            while (servletsI.hasNext()) {
+                ServletConfigImpl fc = (ServletConfigImpl) servletsI.next();
                 try {
                     fc.loadServlet(); 
                 } catch (Throwable e) {
@@ -910,9 +945,7 @@
     }
 
     public ClassLoader getClassLoader() {
-        if( repository != null ) 
-            return repository.getClassLoader();
-        return this.getClass().getClassLoader();
+        return classLoader;
     }
     
 
@@ -923,19 +956,32 @@
     public void processWebAppData(WebAppData d) throws ServletException {
         this.webAppData = d;
         initDefaults();
-            
-        for(Entry<String, String> k: d.mimeMapping.entrySet()) {
-            addMimeType(k.getKey(), k.getValue());
+        
+        Iterator i1 = d.mimeMapping.entrySet().iterator();
+        while (i1.hasNext()) {
+            Entry k = (Entry)i1.next();
+            addMimeType((String)k.getKey(), (String)k.getValue());
+        }
+        
+        String[] wFiles = (String[])d.welcomeFileList.toArray(new String[0]);
+        if (wFiles.length == 0) {
+            wFiles = new String[] {"index.html" };
         }
+        getMapper().contextMapElement.resources = new File(getBasePath());
+        getMapper().contextMapElement.welcomeResources = wFiles;
         
         if (d.sessionTimeout > 0 )
             getManager().setSessionTimeout(d.sessionTimeout);
         
-        for(FilterData fd: d.filters.values()) {
+        Iterator i2 = d.filters.values().iterator();
+        while (i2.hasNext()) {
+            FilterData fd = (FilterData)i2.next();
             addFilter(fd);
         }
         
-        for(ServletData sd: d.servlets.values()) {
+        Iterator i3 = d.servlets.values().iterator();
+        while (i3.hasNext()) {
+            ServletData sd = (ServletData) i3.next();
             // jsp-file equivalent to JspProxyServlet + arg
             if (sd.servletClass == null) {
                 if (sd.jspFile == null) {
@@ -950,22 +996,26 @@
             addServletConfig(sw);
         }
         
-        for(Entry<String, String> k: d.servletMapping.entrySet()) {
-            ServletConfigImpl wrapper = getServletConfig(k.getValue());
-            addMapping(k.getKey(), wrapper);
+        Iterator i4 = d.servletMapping.entrySet().iterator();
+        while (i4.hasNext()) {
+            Entry/*<String, String>*/ k = (Entry) i4.next();
+            ServletConfigImpl wrapper = getServletConfig((String) k.getValue());
+            addMapping((String) k.getKey(), wrapper);
         }
         
-        for(FilterMappingData k: d.filterMappings) {
+        Iterator i5 = d.filterMappings.iterator();
+        while (i5.hasNext()) {
+            FilterMappingData k = (FilterMappingData) i5.next();  
             String[] disp = new String[k.dispatcher.size()];
             if (k.urlPattern != null) {
                 getFilterMapper().addMapping(k.filterName, 
                                              k.urlPattern, null, 
-                                             k.dispatcher.toArray(disp));
+                                             (String[])k.dispatcher.toArray(disp));
             }
             if (k.servletName != null) {
                 getFilterMapper().addMapping(k.filterName, 
                                              null, k.servletName, 
-                                             k.dispatcher.toArray(disp));
+                                             (String[])k.dispatcher.toArray(disp));
             }
          }
     }
@@ -974,24 +1024,21 @@
         return webAppData;
     }
     
-
+    /**
+     * Called from TomcatLite.init(), required before start.
+     * 
+     * Will initialize defaults and load web.xml unless webAppData is 
+     * already set and recent. No other processing is done except reading
+     * the config - you can add or alter it before start() is called.
+     * 
+     * @throws ServletException
+     */
     public void init() throws ServletException {
         String base = getBasePath();
+        setAttribute(TomcatLite.A_ENGINE, facade);
         
-        Repository ctxRepo = null;
-        // create a class loader
-        if (getContextPath().startsWith("/__x_classpath") ||
-                getContextPath().startsWith("/__x_deploy")) {
-            ctxRepo = getEngine().getRepository();
-        } else {
-            ctxRepo = new Repository();
-            ctxRepo.setParent(facade.getRepository());
-        }
-        ctxRepo.addDir(new File(base + "/WEB-INF/classes"));
-        ctxRepo.addLibs(new File(base + "/WEB-INF/lib"));
-        setRepository(ctxRepo);
-
         if (webAppData != null && webAppData.fileName != null) {
+            // TODO: this should move to deploy - if not set, there is no point
             File f = new File(webAppData.fileName);
             if (f.exists()) {
                 if (f.lastModified() > webAppData.timestamp + 1000) {
@@ -1007,12 +1054,66 @@
             // Add default mappings.
             initDefaults();
             readWebXml(base);
-            if (contextConfig != null) {
-                contextConfig.webXml = webAppData;
+        }
+    }
+    
+    public ArrayList getClasspath(File directory, File classesDir) {
+        ArrayList res = new ArrayList();
+        if (classesDir.isDirectory() && classesDir.exists() &&
+                classesDir.canRead()) {
+            try {
+                URL url = classesDir.toURL();
+                res.add(url);
+            } catch (MalformedURLException e) {
             }
         }
-        // TODO: read a simpler version of web.xml
+        if (!directory.isDirectory() || !directory.exists()
+                || !directory.canRead()) {
+            return res;
+        }
+        
+        File[] jars = directory.listFiles(new FilenameFilter() {
+            public boolean accept(File dir, String name) {
+              return name.endsWith(".jar");
+            }
+          });
+        
+        for (int j = 0; j < jars.length; j++) {
+            try {
+                URL url = jars[j].toURL();
+                res.add(url);
+            } catch (MalformedURLException e) {
+            }
+        }
+        return res;
+    }
 
+
+    public void start() throws ServletException {
+        String base = getBasePath();
+        
+        setAttribute(TomcatLite.A_ENGINE, facade);
+        
+        ArrayList urls = getClasspath(new File(base + "/WEB-INF/lib"),
+                new File(base + "/WEB-INF/classes"));
+        URL[] urlsA = new URL[urls.size()];
+        urls.toArray(urlsA);
+
+        URLClassLoader parentLoader = 
+            getEngine().getContextParentLoader();
+
+        // create a class loader.
+        // TODO: reimplement special 'deploy' dirs
+
+        /*
+          Repository ctxRepo = new Repository();
+          ctxRepo.setParentClassLoader(parentLoader);
+          ctxRepo.addURL(urlsA);
+          repository = ctxRepo;
+        */
+        
+        classLoader = new URLClassLoader(urlsA, parentLoader);
+        
         // JMX should know about us ( TODO: is it too early ? )
         facade.notifyAdd(this);
 
@@ -1068,8 +1169,16 @@
         f.mkdirs();
         fileS.data.initParams.put("scratchdir",  f.getAbsolutePath());    
         addServletConfig(fileS);
+        
+        
     }
 
+    public void readWebXml(InputStream is) throws ServletException {
+        WebXml webXml = new WebXml();
+        webXml.readWebXml(is);
+        processWebAppData(webXml.getWebAppData());
+    }
+    
     private void readWebXml(String base) throws ServletException {
         WebXml webXml = new WebXml();
         webXml.readWebXml(base);
@@ -1099,10 +1208,6 @@
         }
     }
 
-    public void setContextConfigData(ContextConfigData ctxD) {
-        this.contextConfig = ctxD;
-    }
-
     public TomcatLite getEngine() {
         return facade;
     }
@@ -1115,7 +1220,7 @@
             return null;
         }
 
-        return getConfig().errorPageCode.get(Integer.toString(status));
+        return (String)getConfig().errorPageCode.get(Integer.toString(status));
     }
 
     public void handleStatusPage(ServletRequestImpl req, 
@@ -1170,6 +1275,10 @@
            dispatchError(req, res, errorPage);
        } else {
            log("Unhandled error", t);
+           if (t instanceof ServletException && 
+                   ((ServletException)t).getRootCause() != null) {
+               log("RootCause:", ((ServletException)t).getRootCause());
+           }
            if (res.getStatus() < 500) {
                res.setStatus(500);
            }
@@ -1201,7 +1310,7 @@
        Class clazz = exception.getClass();
        String name = clazz.getName();
        while (!Object.class.equals(clazz)) {
-           String page = getConfig().errorPageException.get(name);
+           String page = (String)getConfig().errorPageException.get(name);
            if (page != null)
                return (page);
            clazz = clazz.getSuperclass();

Modified: tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletInputStreamImpl.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletInputStreamImpl.java?view=diff&rev=534293&r1=534292&r2=534293
==============================================================================
--- tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletInputStreamImpl.java (original)
+++ tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletInputStreamImpl.java Tue May  1 19:22:45 2007
@@ -21,16 +21,16 @@
 
 import javax.servlet.ServletInputStream;
 
-import org.apache.tomcat.lite.util.MessageReader;
+import org.apache.tomcat.util.buf.MessageReader;
 
 /**
  * This class handles reading bytes.
  * 
  * @author Remy Maucherat
  * @author Jean-Francois Arcand
+ * @author Costin Manolache
  */
-public class ServletInputStreamImpl
-    extends ServletInputStream {
+public class ServletInputStreamImpl extends ServletInputStream {
 
 
     // ----------------------------------------------------- Instance Variables
@@ -42,35 +42,32 @@
     // ----------------------------------------------------------- Constructors
 
 
-    protected ServletInputStreamImpl(MessageReader ib) {
+    public ServletInputStreamImpl(MessageReader ib) {
         this.ib = ib;
     }
 
+    // --------------------------------------------- ServletInputStream Methods
 
-    // -------------------------------------------------------- Package Methods
-
-
-    /**
-     * Clear facade.
-     */
-    void clear() {
-        ib = null;
+    public long skip(long n)
+        throws IOException {
+        return ib.skip(n);
     }
-
-
-    // --------------------------------------------------------- Public Methods
-
-
-    /**
-     * Prevent cloning the facade.
-     */
-    protected Object clone()
-        throws CloneNotSupportedException {
-        throw new CloneNotSupportedException();
+    
+    public void mark(int readAheadLimit)
+    {
+        try {
+            ib.mark(readAheadLimit);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
     }
 
 
-    // --------------------------------------------- ServletInputStream Methods
+    public void reset()
+        throws IOException {
+        ib.reset();
+    }
+    
 
 
     public int read()
@@ -97,7 +94,6 @@
     public int readLine(byte[] b, int off, int len) throws IOException {
         return super.readLine(b, off, len);
     }
-
 
     /** 
      * Close the stream

Modified: tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletOutputStreamImpl.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletOutputStreamImpl.java?view=diff&rev=534293&r1=534292&r2=534293
==============================================================================
--- tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletOutputStreamImpl.java (original)
+++ tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletOutputStreamImpl.java Tue May  1 19:22:45 2007
@@ -42,7 +42,7 @@
     // ----------------------------------------------------------- Constructors
 
 
-    protected ServletOutputStreamImpl(MessageWriter ob) {
+    public ServletOutputStreamImpl(MessageWriter ob) {
         this.ob = ob;
     }
 

Modified: tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletReaderImpl.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletReaderImpl.java?view=diff&rev=534293&r1=534292&r2=534293
==============================================================================
--- tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletReaderImpl.java (original)
+++ tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletReaderImpl.java Tue May  1 19:22:45 2007
@@ -20,7 +20,7 @@
 import java.io.BufferedReader;
 import java.io.IOException;
 
-import org.apache.tomcat.lite.util.MessageReader;
+import org.apache.tomcat.util.buf.MessageReader;
 
 
 /**
@@ -55,34 +55,7 @@
         super(ib, 1);
         this.ib = ib;
     }
-
-
-    // --------------------------------------------------------- Public Methods
-
-
-    /**
-     * Prevent cloning the facade.
-     */
-    protected Object clone()
-        throws CloneNotSupportedException {
-        throw new CloneNotSupportedException();
-    }
-
-
-    // -------------------------------------------------------- Package Methods
-
-
-    /**
-     * Clear facade.
-     */
-    void clear() {
-        ib = null;
-    }
-
-
-    // --------------------------------------------------------- Reader Methods
-
-
+    
     public void close()
         throws IOException {
         ib.close();
@@ -204,6 +177,4 @@
         return result;
 
     }
-
-
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message