[pkg-java] r6107 - in trunk/tomcat5.5: . build connectors connectors/ajp/proxy connectors/coyote connectors/coyote/src/java/org/apache/coyote/tomcat4 connectors/doc connectors/http11 connectors/http11/src/java/org/apache/coyote/http11 connectors/http11/src/test connectors/jk connectors/jk/conf connectors/jk/java/org/apache/ajp/tomcat4 connectors/jk/java/org/apache/coyote/ajp connectors/jk/java/org/apache/jk connectors/jk/java/org/apache/jk/common connectors/jk/java/org/apache/jk/core connectors/jk/jkant connectors/jk/jkstatus connectors/jk/jkstatus/conf connectors/jk/jkstatus/example connectors/jk/jkstatus/src/share/org/apache/jk/status connectors/jk/jkstatus/test connectors/jk/jkstatus/test/conf connectors/jk/jkstatus/test/src/share/org/apache/jk/status connectors/jk/native connectors/jk/native/apache-1.3 connectors/jk/native/apache-2.0 connectors/jk/native/common connectors/jk/native/docs/api connectors/jk/native/iis connectors/jk/native/iis/installer connectors/jk/native/iis/installer/conf connectors/jk/native/jni connectors/jk/native/netscape connectors/jk/native/nt_service connectors/jk/native/scripts/build connectors/jk/native/scripts/build/unix connectors/jk/support connectors/jk/tools connectors/jk/tools/reports connectors/jk/xdocs connectors/jk/xdocs/ajp connectors/jk/xdocs/generic_howto connectors/jk/xdocs/jk2 connectors/jk/xdocs/miscellaneous connectors/jk/xdocs/news connectors/jk/xdocs/reference connectors/jk/xdocs/webserver_howto connectors/jni connectors/jni/examples/org/apache/tomcat/jni connectors/jni/java/org/apache/tomcat connectors/jni/native connectors/jni/native/build connectors/jni/native/os/win32 connectors/jni/native/src connectors/juli connectors/juli/src/conf connectors/juli/src/java/org/apache/juli connectors/procrun connectors/util connectors/util/java/org/apache/tomcat/util/buf connectors/util/java/org/apache/tomcat/util/buf/res connectors/util/java/org/apache/tomcat/util/collections connectors/util/java/org/apache/tomcat/util/digester connectors/util/java/org/apache/tomcat/util/http connectors/util/java/org/apache/tomcat/util/http/res connectors/util/java/org/apache/tomcat/util/net connectors/util/java/org/apache/tomcat/util/net/jsse connectors/util/java/org/apache/tomcat/util/net/jsse/res connectors/util/java/org/apache/tomcat/util/net/res connectors/util/java/org/apache/tomcat/util/threads/res connectors/util/loader connectors/util/loader/org/apache/tomcat/util/loader container container/catalina container/catalina/etc container/catalina/src/bin container/catalina/src/conf container/catalina/src/share/org/apache/catalina container/catalina/src/share/org/apache/catalina/ant container/catalina/src/share/org/apache/catalina/ant/jmx container/catalina/src/share/org/apache/catalina/authenticator container/catalina/src/share/org/apache/catalina/connector container/catalina/src/share/org/apache/catalina/core container/catalina/src/share/org/apache/catalina/deploy container/catalina/src/share/org/apache/catalina/loader container/catalina/src/share/org/apache/catalina/mbeans container/catalina/src/share/org/apache/catalina/realm container/catalina/src/share/org/apache/catalina/security container/catalina/src/share/org/apache/catalina/servlets container/catalina/src/share/org/apache/catalina/session container/catalina/src/share/org/apache/catalina/ssi container/catalina/src/share/org/apache/catalina/startup container/catalina/src/share/org/apache/catalina/users container/catalina/src/share/org/apache/catalina/util container/catalina/src/share/org/apache/catalina/valves container/catalina/src/share/org/apache/naming container/catalina/src/share/org/apache/naming/factory container/catalina/src/share/org/apache/naming/java container/catalina/src/share/org/apache/naming/resources container/catalina/src/temp container/modules/cluster/src/share/org/apache/catalina/cluster/deploy container/modules/cluster/src/share/org/apache/catalina/cluster/mcast container/modules/cluster/src/share/org/apache/catalina/cluster/session container/modules/cluster/src/share/org/apache/catalina/cluster/tcp container/webapps/admin container/webapps/balancer/WEB-INF/classes/org/apache/webapp/balancer/rules container/webapps/docs container/webapps/docs/appdev container/webapps/docs/config container/webapps/jmxremote container/webapps/manager/WEB-INF/classes/org/apache/catalina/manager debian jasper jasper/src/share/org/apache/jasper/compiler jasper/src/share/org/apache/jasper/xmlparser servletapi/jsr152/src/share/dtd servletapi/jsr154/src/share/dtd servletapi/jsr154/src/share/javax/servlet servletapi/jsr154/src/share/javax/servlet/http

mkoch at alioth.debian.org mkoch at alioth.debian.org
Sun Apr 6 12:38:07 UTC 2008


Author: mkoch
Date: 2008-04-06 12:38:06 +0000 (Sun, 06 Apr 2008)
New Revision: 6107

Added:
   trunk/tomcat5.5/connectors/jk/HOWTO-RELEASE.txt
   trunk/tomcat5.5/connectors/jk/native/BUILDING.txt
   trunk/tomcat5.5/connectors/jk/native/README.txt
   trunk/tomcat5.5/connectors/jk/native/TODO.txt
   trunk/tomcat5.5/connectors/jni/CHANGELOG.txt
Removed:
   trunk/tomcat5.5/connectors/TomcatUTF8.war
   trunk/tomcat5.5/connectors/doc/install_tomcat41.html
   trunk/tomcat5.5/connectors/jk/HOWTO-RELEASE
   trunk/tomcat5.5/connectors/jk/native/BUILDING
   trunk/tomcat5.5/connectors/jk/native/README
   trunk/tomcat5.5/connectors/jk/native/TODO
   trunk/tomcat5.5/connectors/patch.txt
   trunk/tomcat5.5/connectors/testdata.rtf
   trunk/tomcat5.5/container/etc/
Modified:
   trunk/tomcat5.5/build.xml
   trunk/tomcat5.5/build/LICENSE
   trunk/tomcat5.5/build/NOTICE
   trunk/tomcat5.5/build/RUNNING.txt
   trunk/tomcat5.5/build/build.properties.default
   trunk/tomcat5.5/build/build.xml
   trunk/tomcat5.5/build/sign.bat
   trunk/tomcat5.5/build/tomcat.nsi
   trunk/tomcat5.5/connectors/.classpath
   trunk/tomcat5.5/connectors/.project
   trunk/tomcat5.5/connectors/README.txt
   trunk/tomcat5.5/connectors/RELEASE-NOTES.txt
   trunk/tomcat5.5/connectors/ajp/proxy/Makefile.in
   trunk/tomcat5.5/connectors/build.xml
   trunk/tomcat5.5/connectors/coyote/build.xml
   trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings.properties
   trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_es.properties
   trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_fr.properties
   trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_ja.properties
   trunk/tomcat5.5/connectors/doc/install_tomcat33.html
   trunk/tomcat5.5/connectors/doc/install_tomcat40.html
   trunk/tomcat5.5/connectors/http11/build.xml
   trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java
   trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java
   trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings.properties
   trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings_es.properties
   trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings_fr.properties
   trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings_ja.properties
   trunk/tomcat5.5/connectors/http11/src/test/test.bat
   trunk/tomcat5.5/connectors/jk/BUILD.txt
   trunk/tomcat5.5/connectors/jk/README.txt
   trunk/tomcat5.5/connectors/jk/build.xml
   trunk/tomcat5.5/connectors/jk/conf/jk2.properties
   trunk/tomcat5.5/connectors/jk/conf/jkconf.ant.xml
   trunk/tomcat5.5/connectors/jk/conf/uriworkermap.properties
   trunk/tomcat5.5/connectors/jk/conf/workers.properties
   trunk/tomcat5.5/connectors/jk/conf/workers.properties.minimal
   trunk/tomcat5.5/connectors/jk/conf/workers2.properties
   trunk/tomcat5.5/connectors/jk/conf/workers2.properties.minimal
   trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings.properties
   trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings_es.properties
   trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings_fr.properties
   trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings_ja.properties
   trunk/tomcat5.5/connectors/jk/java/org/apache/coyote/ajp/LocalStrings.properties
   trunk/tomcat5.5/connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java
   trunk/tomcat5.5/connectors/jk/java/org/apache/jk/core/MsgContext.java
   trunk/tomcat5.5/connectors/jk/java/org/apache/jk/core/package.html
   trunk/tomcat5.5/connectors/jk/java/org/apache/jk/mbeans-descriptors.xml
   trunk/tomcat5.5/connectors/jk/jkant/ant.tasks
   trunk/tomcat5.5/connectors/jk/jkant/buildJakarta.xml
   trunk/tomcat5.5/connectors/jk/jkstatus/build.xml
   trunk/tomcat5.5/connectors/jk/jkstatus/conf/jkstatus-tasks.xml
   trunk/tomcat5.5/connectors/jk/jkstatus/example/jkstatus.properties.default
   trunk/tomcat5.5/connectors/jk/jkstatus/example/jkstatus.xml
   trunk/tomcat5.5/connectors/jk/jkstatus/example/show.txt
   trunk/tomcat5.5/connectors/jk/jkstatus/example/show.xml
   trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/JkStatusUpdateLoadbalancerTask.java
   trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/JkStatusUpdateTask.java
   trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/LocalStrings.properties
   trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/antlib.xml
   trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/jkstatus.tasks
   trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/mbeans-descriptors.xml
   trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/package.html
   trunk/tomcat5.5/connectors/jk/jkstatus/test/build.xml
   trunk/tomcat5.5/connectors/jk/jkstatus/test/conf/jkstatus.xml
   trunk/tomcat5.5/connectors/jk/jkstatus/test/conf/log4j.xml
   trunk/tomcat5.5/connectors/jk/jkstatus/test/src/share/org/apache/jk/status/JkStatusParserTest.java
   trunk/tomcat5.5/connectors/jk/native/CHANGES.txt
   trunk/tomcat5.5/connectors/jk/native/Makefile.am
   trunk/tomcat5.5/connectors/jk/native/STATUS.txt
   trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.apxs.in
   trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.in
   trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.netware
   trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.tmpl
   trunk/tomcat5.5/connectors/jk/native/apache-1.3/NWGNUmakefile
   trunk/tomcat5.5/connectors/jk/native/apache-1.3/NWGNUmakefile.mak
   trunk/tomcat5.5/connectors/jk/native/apache-1.3/mod_jk.c
   trunk/tomcat5.5/connectors/jk/native/apache-2.0/Makefile.apxs.in
   trunk/tomcat5.5/connectors/jk/native/apache-2.0/Makefile.in
   trunk/tomcat5.5/connectors/jk/native/apache-2.0/NWGNUmakefile
   trunk/tomcat5.5/connectors/jk/native/apache-2.0/mod_jk.c
   trunk/tomcat5.5/connectors/jk/native/build.xml
   trunk/tomcat5.5/connectors/jk/native/buildconf.sh
   trunk/tomcat5.5/connectors/jk/native/common/Makefile.in
   trunk/tomcat5.5/connectors/jk/native/common/ap_snprintf.h
   trunk/tomcat5.5/connectors/jk/native/common/jk_ajp12_worker.c
   trunk/tomcat5.5/connectors/jk/native/common/jk_ajp13_worker.c
   trunk/tomcat5.5/connectors/jk/native/common/jk_ajp14_worker.c
   trunk/tomcat5.5/connectors/jk/native/common/jk_ajp_common.c
   trunk/tomcat5.5/connectors/jk/native/common/jk_ajp_common.h
   trunk/tomcat5.5/connectors/jk/native/common/jk_connect.c
   trunk/tomcat5.5/connectors/jk/native/common/jk_connect.h
   trunk/tomcat5.5/connectors/jk/native/common/jk_global.h
   trunk/tomcat5.5/connectors/jk/native/common/jk_jni_worker.c
   trunk/tomcat5.5/connectors/jk/native/common/jk_lb_worker.c
   trunk/tomcat5.5/connectors/jk/native/common/jk_lb_worker.h
   trunk/tomcat5.5/connectors/jk/native/common/jk_logger.h
   trunk/tomcat5.5/connectors/jk/native/common/jk_map.c
   trunk/tomcat5.5/connectors/jk/native/common/jk_map.h
   trunk/tomcat5.5/connectors/jk/native/common/jk_service.h
   trunk/tomcat5.5/connectors/jk/native/common/jk_shm.c
   trunk/tomcat5.5/connectors/jk/native/common/jk_shm.h
   trunk/tomcat5.5/connectors/jk/native/common/jk_status.c
   trunk/tomcat5.5/connectors/jk/native/common/jk_uri_worker_map.c
   trunk/tomcat5.5/connectors/jk/native/common/jk_uri_worker_map.h
   trunk/tomcat5.5/connectors/jk/native/common/jk_util.c
   trunk/tomcat5.5/connectors/jk/native/common/jk_util.h
   trunk/tomcat5.5/connectors/jk/native/common/jk_version.h
   trunk/tomcat5.5/connectors/jk/native/common/jk_worker.c
   trunk/tomcat5.5/connectors/jk/native/common/list.mk.in
   trunk/tomcat5.5/connectors/jk/native/common/portable.h
   trunk/tomcat5.5/connectors/jk/native/common/portable.h.sample
   trunk/tomcat5.5/connectors/jk/native/configure.in
   trunk/tomcat5.5/connectors/jk/native/docs/api/README.txt
   trunk/tomcat5.5/connectors/jk/native/iis/Makefile.ia64
   trunk/tomcat5.5/connectors/jk/native/iis/Makefile.x86
   trunk/tomcat5.5/connectors/jk/native/iis/installer/conf/rewrite.properties
   trunk/tomcat5.5/connectors/jk/native/iis/installer/conf/uriworkermap.properties
   trunk/tomcat5.5/connectors/jk/native/iis/installer/conf/workers.properties.minimal
   trunk/tomcat5.5/connectors/jk/native/iis/installer/iisfilter.vbs
   trunk/tomcat5.5/connectors/jk/native/iis/installer/isapi-redirector-win32-msi.ism
   trunk/tomcat5.5/connectors/jk/native/iis/isapi_install.vbs
   trunk/tomcat5.5/connectors/jk/native/iis/isapi_redirect.rc
   trunk/tomcat5.5/connectors/jk/native/iis/jk_isapi_plugin.c
   trunk/tomcat5.5/connectors/jk/native/jni/Makefile.in
   trunk/tomcat5.5/connectors/jk/native/jni/Makefile.linux
   trunk/tomcat5.5/connectors/jk/native/jni/Makefile.netware
   trunk/tomcat5.5/connectors/jk/native/jni/Makefile.solaris
   trunk/tomcat5.5/connectors/jk/native/netscape/Makefile.linux
   trunk/tomcat5.5/connectors/jk/native/netscape/Makefile.netware
   trunk/tomcat5.5/connectors/jk/native/netscape/Makefile.solaris
   trunk/tomcat5.5/connectors/jk/native/netscape/README
   trunk/tomcat5.5/connectors/jk/native/netscape/jk_nsapi_plugin.c
   trunk/tomcat5.5/connectors/jk/native/nt_service/jk_nt_service.c
   trunk/tomcat5.5/connectors/jk/native/scripts/build/config_vars.mk
   trunk/tomcat5.5/connectors/jk/native/scripts/build/rules.mk
   trunk/tomcat5.5/connectors/jk/native/scripts/build/unix/dummy
   trunk/tomcat5.5/connectors/jk/support/apache.m4
   trunk/tomcat5.5/connectors/jk/support/get_ver.awk
   trunk/tomcat5.5/connectors/jk/support/os_apache.m4
   trunk/tomcat5.5/connectors/jk/tools/jkrelease.sh
   trunk/tomcat5.5/connectors/jk/tools/lineends.pl
   trunk/tomcat5.5/connectors/jk/tools/reports/README.txt
   trunk/tomcat5.5/connectors/jk/xdocs/ajp/project.xml
   trunk/tomcat5.5/connectors/jk/xdocs/build.xml
   trunk/tomcat5.5/connectors/jk/xdocs/generic_howto/project.xml
   trunk/tomcat5.5/connectors/jk/xdocs/generic_howto/timeouts.xml
   trunk/tomcat5.5/connectors/jk/xdocs/generic_howto/workers.xml
   trunk/tomcat5.5/connectors/jk/xdocs/index.xml
   trunk/tomcat5.5/connectors/jk/xdocs/jk2/davhowto.xml
   trunk/tomcat5.5/connectors/jk/xdocs/miscellaneous/changelog.xml
   trunk/tomcat5.5/connectors/jk/xdocs/miscellaneous/project.xml
   trunk/tomcat5.5/connectors/jk/xdocs/news/20041100.xml
   trunk/tomcat5.5/connectors/jk/xdocs/news/20050101.xml
   trunk/tomcat5.5/connectors/jk/xdocs/news/20060101.xml
   trunk/tomcat5.5/connectors/jk/xdocs/news/20070301.xml
   trunk/tomcat5.5/connectors/jk/xdocs/news/project.xml
   trunk/tomcat5.5/connectors/jk/xdocs/project.xml
   trunk/tomcat5.5/connectors/jk/xdocs/reference/apache.xml
   trunk/tomcat5.5/connectors/jk/xdocs/reference/iis.xml
   trunk/tomcat5.5/connectors/jk/xdocs/reference/project.xml
   trunk/tomcat5.5/connectors/jk/xdocs/reference/status.xml
   trunk/tomcat5.5/connectors/jk/xdocs/reference/uriworkermap.xml
   trunk/tomcat5.5/connectors/jk/xdocs/reference/workers.xml
   trunk/tomcat5.5/connectors/jk/xdocs/style.css
   trunk/tomcat5.5/connectors/jk/xdocs/style.xsl
   trunk/tomcat5.5/connectors/jk/xdocs/webserver_howto/apache.xml
   trunk/tomcat5.5/connectors/jk/xdocs/webserver_howto/project.xml
   trunk/tomcat5.5/connectors/jni/README.txt
   trunk/tomcat5.5/connectors/jni/build.xml
   trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/Echo.properties
   trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/Local.properties
   trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/LocalServer.java
   trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/SSL.properties
   trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/SSLServer.java
   trunk/tomcat5.5/connectors/jni/java/org/apache/tomcat/apr.properties
   trunk/tomcat5.5/connectors/jni/jnirelease.sh
   trunk/tomcat5.5/connectors/jni/native/build/tcnative.m4
   trunk/tomcat5.5/connectors/jni/native/configure.in
   trunk/tomcat5.5/connectors/jni/native/os/win32/libtcnative.rc
   trunk/tomcat5.5/connectors/jni/native/src/sslcontext.c
   trunk/tomcat5.5/connectors/jni/native/src/sslnetwork.c
   trunk/tomcat5.5/connectors/juli/build.xml
   trunk/tomcat5.5/connectors/juli/src/conf/logging.properties
   trunk/tomcat5.5/connectors/juli/src/java/org/apache/juli/ClassLoaderLogManager.java
   trunk/tomcat5.5/connectors/procrun/README.txt
   trunk/tomcat5.5/connectors/util/README.txt
   trunk/tomcat5.5/connectors/util/build.xml
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/B2CConverter.java
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/CharChunk.java
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/package.html
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings_es.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings_fr.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings_ja.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/collections/package.html
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/digester/package.html
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/Cookies.java
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/ServerCookie.java
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/package.html
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/res/LocalStrings.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/res/LocalStrings_es.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/res/LocalStrings_fr.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/SSLSupport.java
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings_es.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings_fr.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings_ja.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings_es.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings_fr.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings_ja.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings_es.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings_fr.properties
   trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings_ja.properties
   trunk/tomcat5.5/connectors/util/loader/loader.properties
   trunk/tomcat5.5/connectors/util/loader/org/apache/tomcat/util/loader/package.html
   trunk/tomcat5.5/container/.classpath
   trunk/tomcat5.5/container/.project
   trunk/tomcat5.5/container/Tomcat5.5.launch
   trunk/tomcat5.5/container/build.xml
   trunk/tomcat5.5/container/catalina/build.xml
   trunk/tomcat5.5/container/catalina/etc/bootstrap.MF
   trunk/tomcat5.5/container/catalina/src/bin/catalina.bat
   trunk/tomcat5.5/container/catalina/src/bin/catalina.sh
   trunk/tomcat5.5/container/catalina/src/bin/service.bat
   trunk/tomcat5.5/container/catalina/src/conf/catalina.policy
   trunk/tomcat5.5/container/catalina/src/conf/catalina.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/antlib.xml
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/catalina.tasks
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/jmx/antlib.xml
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/jmx/jmxaccessor.tasks
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/jmx/package.html
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/package.html
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings_es.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings_fr.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings_ja.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/mbeans-descriptors.xml
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/package.html
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/CoyoteAdapter.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/InputBuffer.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings_es.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings_fr.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings_ja.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/Request.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/Response.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/mbeans-descriptors.xml
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings_es.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings_fr.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings_ja.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/StandardContext.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/deploy/mbeans-descriptors.xml
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/deploy/package.html
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocaStrings_fr.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocalStrings.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocalStrings_es.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocalStrings_ja.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/mbeans-descriptors.xml
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/mbeans-descriptors.xml
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/JAASRealm.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings_es.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings_fr.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings_ja.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/mbeans-descriptors.xml
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/package.html
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings_es.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings_fr.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings_ja.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings_es.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings_fr.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings_ja.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/package.html
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings_es.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings_fr.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings_ja.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/ManagerBase.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/StandardManager.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/mbeans-descriptors.xml
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/package.html
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ssi/package.html
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/Authenticators.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/HostConfig.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings_es.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings_fr.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings_ja.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/catalina.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/mbeans-descriptors.xml
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings_es.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings_fr.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings_ja.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/CharsetMapperDefault.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings_es.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings_fr.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings_ja.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/ServerInfo.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/ExtendedAccessLogValve.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/JDBCAccessLogValve.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings_es.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings_fr.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings_ja.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/mbeans-descriptors.xml
   trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/package.html
   trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings_es.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings_fr.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings_ja.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/factory/Constants.java
   trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/factory/package.html
   trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/java/package.html
   trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/package.html
   trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings_es.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings_fr.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings_ja.properties
   trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/package.html
   trunk/tomcat5.5/container/catalina/src/temp/README.txt
   trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/deploy/FarmWarDeployer.java
   trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java
   trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java
   trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml
   trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java
   trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties
   trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationValve.java
   trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/mbeans-descriptors.xml
   trunk/tomcat5.5/container/webapps/admin/build.xml
   trunk/tomcat5.5/container/webapps/balancer/WEB-INF/classes/org/apache/webapp/balancer/rules/package.html
   trunk/tomcat5.5/container/webapps/docs/appdev/build.xml.txt
   trunk/tomcat5.5/container/webapps/docs/changelog.xml
   trunk/tomcat5.5/container/webapps/docs/config/context.xml
   trunk/tomcat5.5/container/webapps/docs/config/valve.xml
   trunk/tomcat5.5/container/webapps/docs/logging.xml
   trunk/tomcat5.5/container/webapps/docs/virtual-hosting-howto.xml
   trunk/tomcat5.5/container/webapps/jmxremote/README
   trunk/tomcat5.5/container/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java
   trunk/tomcat5.5/container/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/LocalStrings.properties
   trunk/tomcat5.5/debian/changelog
   trunk/tomcat5.5/jasper/.classpath
   trunk/tomcat5.5/jasper/.project
   trunk/tomcat5.5/jasper/src/share/org/apache/jasper/compiler/DefaultErrorHandler.java
   trunk/tomcat5.5/jasper/src/share/org/apache/jasper/compiler/ErrorDispatcher.java
   trunk/tomcat5.5/jasper/src/share/org/apache/jasper/compiler/Generator.java
   trunk/tomcat5.5/jasper/src/share/org/apache/jasper/xmlparser/ParserUtils.java
   trunk/tomcat5.5/servletapi/jsr152/src/share/dtd/jsp_2_0.xsd
   trunk/tomcat5.5/servletapi/jsr152/src/share/dtd/web-jsptaglibrary_2_0.xsd
   trunk/tomcat5.5/servletapi/jsr154/src/share/dtd/j2ee_web_services_1_1.xsd
   trunk/tomcat5.5/servletapi/jsr154/src/share/dtd/j2ee_web_services_client_1_1.xsd
   trunk/tomcat5.5/servletapi/jsr154/src/share/javax/servlet/http/package.html
   trunk/tomcat5.5/servletapi/jsr154/src/share/javax/servlet/package.html
Log:
New upstream release

Modified: trunk/tomcat5.5/build/LICENSE
===================================================================
--- trunk/tomcat5.5/build/LICENSE	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/build/LICENSE	2008-04-06 12:38:06 UTC (rev 6107)
@@ -199,3 +199,562 @@
    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.
+
+
+APACHE TOMCAT SUBCOMPONENTS: 
+
+Apache Tomcat includes a number of subcomponents with separate copyright notices
+and license terms. Your use of the source code for the these subcomponents is
+subject to the terms and conditions of the following licenses. 
+
+
+For the jmx.jar component:
+
+/* ====================================================================
+ * The MX4J License, Version 1.0
+ *
+ * Copyright (c) 2001 MX4J.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        MX4J project (http://mx4j.sourceforge.net)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "MX4J" and "mx4j" must not be used to endorse or promote
+ *    products derived from this software without prior written
+ *    permission. For written permission, please contact biorn_steedom at users.sourceforge.net
+ *
+ * 5. Products derived from this software may not be called "MX4J",
+ *    nor may "MX4J" appear in their name, without prior written
+ *    permission of Simone Bordet.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL CARLOS QUIROZ OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of MX4J.  For more information on
+ * MX4J, please see
+ * <http://mx4j.sourceforge.net>.
+ */
+
+
+For the jasper-jdt.jar component:
+
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
+LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are
+distributed by that particular Contributor. A Contribution 'originates' from a
+Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor's behalf. Contributions do not include additions to
+the Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii) are not
+derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents" mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free copyright license to
+reproduce, prepare derivative works of, publicly display, publicly perform,
+distribute and sublicense the Contribution of such Contributor, if any, and such
+derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
+Patents to make, use, sell, offer to sell, import and otherwise transfer the
+Contribution of such Contributor, if any, in source code and object code form.
+This patent license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor, such
+addition of the Contribution causes such combination to be covered by the
+Licensed Patents. The patent license shall not apply to any other combinations
+which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to
+its Contributions set forth herein, no assurances are provided by any
+Contributor that the Program does not infringe the patent or other intellectual
+property rights of any other entity. Each Contributor disclaims any liability to
+Recipient for claims brought by any other entity based on infringement of
+intellectual property rights or otherwise. As a condition to exercising the
+rights and licenses granted hereunder, each Recipient hereby assumes sole
+responsibility to secure any other intellectual property rights needed, if any.
+For example, if a third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient's responsibility to acquire that license
+before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its
+own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title and
+non-infringement, and implied warranties or conditions of merchantability and
+fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for
+damages, including direct, indirect, special, incidental and consequential
+damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by
+that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor,
+and informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the
+Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may
+participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
+Recipient is solely responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its exercise of
+rights under this Agreement , including but not limited to the risks and costs
+of program errors, compliance with applicable laws, damage to or loss of data,
+programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that the Program itself
+(excluding combinations of the Program with other software or hardware)
+infringes such Recipient's patent(s), then such Recipient's rights granted under
+Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue and
+survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation
+may assign the responsibility to serve as the Agreement Steward to a suitable
+separate entity. Each new version of the Agreement will be given a
+distinguishing version number. The Program (including Contributions) may always
+be distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is published,
+Contributor may elect to distribute the Program (including its Contributions)
+under the new version. Except as expressly stated in Sections 2(a) and 2(b)
+above, Recipient receives no rights or licenses to the intellectual property of
+any Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted under
+this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial in
+any resulting litigation.
+
+
+For the Windows Installer component:
+
+    * All NSIS source code, plug-ins, documentation, examples, header files and
+       graphics, with the exception of the compression modules and where
+       otherwise noted, are licensed under the zlib/libpng license.
+    * The zlib compression module for NSIS is licensed under the zlib/libpng
+       license.
+    * The bzip2 compression module for NSIS is licensed under the bzip2 license.
+    * The lzma compression module for NSIS is licensed under the Common Public
+       License version 1.0. 
+
+zlib/libpng license
+
+This software is provided 'as-is', without any express or implied warranty. In
+no event will the authors be held liable for any damages arising from the use of
+this software.
+
+Permission is granted to anyone to use this software for any purpose, including
+commercial applications, and to alter it and redistribute it freely, subject to
+the following restrictions:
+
+   1. The origin of this software must not be misrepresented; you must not claim
+       that you wrote the original software. If you use this software in a
+       product, an acknowledgment in the product documentation would be
+       appreciated but is not required.
+   2. Altered source versions must be plainly marked as such, and must not be
+       misrepresented as being the original software.
+   3. This notice may not be removed or altered from any source distribution. 
+
+bzip2 license
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimer.
+   2. The origin of this software must not be misrepresented; you must not claim
+       that you wrote the original software. If you use this software in a
+       product, an acknowledgment in the product documentation would be
+       appreciated but is not required.
+   3. Altered source versions must be plainly marked as such, and must not be
+       misrepresented as being the original software.
+   4. The name of the author may not be used to endorse or promote products
+       derived from this software without specific prior written permission. 
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+OF SUCH DAMAGE.
+
+Julian Seward, Cambridge, UK.
+
+jseward at acm.org
+Common Public License version 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
+LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and b) in the case of each subsequent
+Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are
+distributed by that particular Contributor. A Contribution 'originates' from a
+Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor's behalf. Contributions do not include additions to
+the Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii) are not
+derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free copyright license to
+reproduce, prepare derivative works of, publicly display, publicly perform,
+distribute and sublicense the Contribution of such Contributor, if any, and such
+derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
+Patents to make, use, sell, offer to sell, import and otherwise transfer the
+Contribution of such Contributor, if any, in source code and object code form.
+This patent license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor, such
+addition of the Contribution causes such combination to be covered by the
+Licensed Patents. The patent license shall not apply to any other combinations
+which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to
+its Contributions set forth herein, no assurances are provided by any
+Contributor that the Program does not infringe the patent or other intellectual
+property rights of any other entity. Each Contributor disclaims any liability to
+Recipient for claims brought by any other entity based on infringement of
+intellectual property rights or otherwise. As a condition to exercising the
+rights and licenses granted hereunder, each Recipient hereby assumes sole
+responsibility to secure any other intellectual property rights needed, if any.
+For example, if a third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient's responsibility to acquire that license
+before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its
+own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title and
+non-infringement, and implied warranties or conditions of merchantability and
+fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for
+damages, including direct, indirect, special, incidental and consequential
+damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by
+that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor,
+and informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the
+Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor to
+control, and cooperate with the Commercial Contributor in, the defense and any
+related settlement negotiations. The Indemnified Contributor may participate in
+any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
+Recipient is solely responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its exercise of
+rights under this Agreement, including but not limited to the risks and costs of
+program errors, compliance with applicable laws, damage to or loss of data,
+programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against a Contributor with respect to
+a patent applicable to software (including a cross-claim or counterclaim in a
+lawsuit), then any patent licenses granted by that Contributor to such Recipient
+under this Agreement shall terminate as of the date such litigation is filed. In
+addition, if Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or hardware)
+infringes such Recipient's patent(s), then such Recipient's rights granted under
+Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue and
+survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
+as the Agreement Steward to a suitable separate entity. Each new version of the
+Agreement will be given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the Agreement
+under which it was received. In addition, after a new version of the Agreement
+is published, Contributor may elect to distribute the Program (including its
+Contributions) under the new version. Except as expressly stated in Sections
+2(a) and 2(b) above, Recipient receives no rights or licenses to the
+intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial in
+any resulting litigation.
+
+Special exception for LZMA compression module
+
+Igor Pavlov and Amir Szekely, the authors of the LZMA compression module for
+NSIS, expressly permit you to statically or dynamically link your code (or bind
+by name) to the files from the LZMA compression module for NSIS without
+subjecting your linked code to the terms of the Common Public license version
+1.0. Any modifications or additions to files from the LZMA compression module
+for NSIS, however, are subject to the terms of the Common Public License version
+1.0.

Modified: trunk/tomcat5.5/build/NOTICE
===================================================================
--- trunk/tomcat5.5/build/NOTICE	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/build/NOTICE	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,6 @@
+Apache Tomcat
+Copyright 1999-2007 The Apache Software Foundation
+
 This product includes software developed by
 The Apache Software Foundation (http://www.apache.org/).
 

Modified: trunk/tomcat5.5/build/RUNNING.txt
===================================================================
--- trunk/tomcat5.5/build/RUNNING.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/build/RUNNING.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -13,7 +13,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
-$Id: RUNNING.txt 567301 2007-08-18 17:26:53Z markt $
+$Id: RUNNING.txt 609438 2008-01-06 22:14:28Z markt $
 
                  ============================================
                  Running The Tomcat 5.5 Servlet/JSP Container
@@ -128,6 +128,8 @@
 calculate all relative references for files in the following directories based
 on the value of $CATALINA_BASE instead of $CATALINA_HOME:
 
+* bin  - Only setenv.sh (*nix) and setenv.bat (windows)
+
 * conf - Server configuration files (including server.xml)
 
 * logs - Log and output files

Modified: trunk/tomcat5.5/build/build.properties.default
===================================================================
--- trunk/tomcat5.5/build/build.properties.default	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/build/build.properties.default	2008-04-06 12:38:06 UTC (rev 6107)
@@ -6,22 +6,25 @@
 # modules that Tomcat depends on.  Copy this file to "build.properties"
 # in the top-level source directory, and customize it as needed.
 #
-# $Id: build.properties.default 569562 2007-08-24 22:59:19Z fhanik $
+# $Id: build.properties.default 616017 2008-01-28 20:16:58Z fhanik $
 # -----------------------------------------------------------------------------
 
 # ----- Vesion Control Flags -----
 version.major=5
 version.minor=5
-version.build=25
+version.build=26
 version.patch=0
 #Set the pretty version name
-version=5.5.25
+version=5.5.26
 
 # ----- Compile Control Flags -----
 compile.debug=on
 compile.deprecation=off
 compile.optimize=off
+compile.source=1.4
+compile.target=1.4
 
+
 # ----- Build Control Flags
 
 #Build all components
@@ -45,14 +48,14 @@
 #base.path=C:/path/to/the/repository
 #base.path=/usr/local
 
-# ----- Jakarta files base location -----
-base-jakarta.loc=http://archive.apache.org/dist/jakarta
+# ----- Commons files base location -----
+base-commons.loc=http://archive.apache.org/dist/commons
 
 # ----- Logging files base location -----
 base-logging.loc=http://archive.apache.org/dist/logging
 
-# ----- XML files base location -----
-base-xml.loc=http://archive.apache.org/dist/xml
+# ----- Xerces files base location -----
+base-xerces.loc=http://archive.apache.org/dist/xerces
 
 # ----- Struts files base location -----
 base-struts.loc=http://archive.apache.org/dist/struts
@@ -63,7 +66,7 @@
 #base-sf.loc=http://internap.dl.sourceforge.net/sourceforge
 
 # ----- Additional Tomcat files base location -----
-base-tomcat.loc=http://archive.apache.org/dist/tomcat
+base-tomcat.loc=http://tomcat.apache.org/dev/dist
 
 # --------------------------------------------------
 #                REQUIRED LIBRARIES
@@ -74,73 +77,72 @@
 commons-beanutils.home=${base.path}/commons-beanutils-1.7.0
 commons-beanutils.lib=${commons-beanutils.home}
 commons-beanutils.jar=${commons-beanutils.lib}/commons-beanutils.jar
-commons-beanutils.loc=${base-jakarta.loc}/commons/beanutils/binaries/commons-beanutils-1.7.0.tar.gz
+commons-beanutils.loc=${base-commons.loc}/beanutils/binaries/commons-beanutils-1.7.0.tar.gz
 
 
 # ----- Commons Launcher, version 0.9 or later -----
-commons-launcher.home=${base.path}/commons-launcher-0.9
+commons-launcher.home=${base.path}/commons-launcher
 commons-launcher.lib=${commons-launcher.home}
 commons-launcher.bin=${commons-launcher.home}/bin
 commons-launcher.jar=${commons-launcher.bin}/commons-launcher.jar
 commons-launcher.bootstrap.class=${commons-launcher.bin}/LauncherBootstrap.class
-commons-launcher.loc=${base-jakarta.loc}/commons/launcher/binaries/launcher-0.9.tar.gz
+commons-launcher.loc=${base-commons.loc}/launcher/binaries/commons-launcher-1.1.tar.gz
 
 
 # ----- Commons Daemon, version 1.0-Alpha or later -----
 commons-daemon.home=${base.path}/commons-daemon-1.0.1
 commons-daemon.lib=${commons-daemon.home}
 commons-daemon.jar=${commons-daemon.lib}/commons-daemon.jar
-commons-daemon.loc=${base-jakarta.loc}/commons/daemon/binaries/commons-daemon-1.0.1.tar.gz
+commons-daemon.loc=${base-commons.loc}/daemon/binaries/commons-daemon-1.0.1.tar.gz
 commons-daemon.jsvc.tar.gz=${commons-daemon.lib}/bin/jsvc.tar.gz
 
 
 # ----- Commons Digester, version 1.4 or later -----
-commons-digester.home=${base.path}/commons-digester-1.7
+commons-digester.home=${base.path}/commons-digester-1.8
 commons-digester.lib=${commons-digester.home}
-commons-digester.jar=${commons-digester.lib}/commons-digester-1.7.jar
-commons-digester.loc=${base-jakarta.loc}/commons/digester/binaries/commons-digester-1.7.tar.gz
+commons-digester.jar=${commons-digester.lib}/commons-digester-1.8.jar
+commons-digester.loc=${base-commons.loc}/digester/binaries/commons-digester-1.8.tar.gz
 
 
 # ----- Commons Expression Language (EL), version 1.0 or later -----
 commons-el.home=${base.path}/commons-el-1.0
 commons-el.lib=${commons-el.home}
 commons-el.jar=${commons-el.lib}/commons-el.jar
-commons-el.loc=${base-jakarta.loc}/commons/el/binaries/commons-el-1.0.tar.gz
+commons-el.loc=${base-commons.loc}/el/binaries/commons-el-1.0.tar.gz
 
 
 # ----- Commons Logging, version 1.0.1 or later -----
-commons-logging.home=${base.path}/commons-logging-1.0.4
+commons-logging.home=${base.path}/commons-logging-1.1.1
 commons-logging.lib=${commons-logging.home}
-commons-logging-api.jar=${commons-logging.lib}/commons-logging-api.jar
-commons-logging.jar=${commons-logging.lib}/commons-logging.jar
-commons-logging.loc=${base-jakarta.loc}/commons/logging/binaries/commons-logging-1.0.4.tar.gz
+commons-logging-api.jar=${commons-logging.lib}/commons-logging-api-1.1.1.jar
+commons-logging.jar=${commons-logging.lib}/commons-logging-1.1.1.jar
+commons-logging.loc=${base-commons.loc}/logging/binaries/commons-logging-1.1.1-bin.tar.gz
 
 
 # ----- Commons Modeler, version 2.0 or later -----
 commons-modeler.home=${base.path}/commons-modeler-2.0.1
 commons-modeler.lib=${commons-modeler.home}
 commons-modeler.jar=${commons-modeler.lib}/commons-modeler-2.0.1.jar
-commons-modeler.loc=${base-jakarta.loc}/commons/modeler/binaries/commons-modeler-2.0.1.tar.gz
+commons-modeler.loc=${base-commons.loc}/modeler/binaries/commons-modeler-2.0.1.tar.gz
 
 # ----- Xerces XML Parser, version 2.8.0 -----
-xerces.home=${base.path}/xerces-2_8_0
+xerces.home=${base.path}/xerces-2_9_1
 xerces.lib=${xerces.home}
 xercesImpl.jar=${xerces.lib}/xercesImpl.jar
 xml-apis.jar=${xerces.lib}/xml-apis.jar
-xerces.loc=${base-xml.loc}/xerces-j/binaries/Xerces-J-bin.2.8.0.tar.gz
+xerces.loc=${base-xerces.loc}/j/binaries/Xerces-J-bin.2.9.1.tar.gz
 
 
-# ----- Eclipse JDT, version 3.1.2 or later -----
+# ----- Eclipse JDT, version 3.3.1 or later -----
 jdt.home=${base.path}/eclipse/plugins
 jdt.lib=${jdt.home}
-jdt.jar=${jdt.lib}/org.eclipse.jdt.core_3.1.2.jar
-jdt.loc=http://archive.eclipse.org/eclipse/downloads/drops/R-3.1.2-200601181600/eclipse-JDT-3.1.2.zip
+jdt.jar=${jdt.lib}/org.eclipse.jdt.core_3.3.1.v_780_R33x.jar
+jdt.loc=http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.3.1-200709211145/eclipse-JDT-3.3.1.zip
 
-
 # ----- Tomcat native library -----
-tomcat-native.home=${base.path}/tomcat-native-current
+tomcat-native.home=${base.path}/tomcat-native-1.1.12
 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
-tomcat-native.loc=${base-tomcat.loc}/tomcat-connectors/native/tomcat-native-current.tar.gz
+tomcat-native.loc=${base-tomcat.loc}/tomcat-connectors/native/tomcat-native-1.1.12-src.tar.gz
 
 
 # --------------------------------------------------
@@ -151,49 +153,42 @@
 # ----- Commons DBCP, version 1.1 or later -----
 commons-dbcp.version=1.2.2
 commons-dbcp.home=${base.path}/commons-dbcp-1.2.2-src
-commons-dbcp-src.loc=${base-jakarta.loc}/commons/dbcp/source/commons-dbcp-1.2.2-src.tar.gz
+commons-dbcp-src.loc=${base-commons.loc}/dbcp/source/commons-dbcp-1.2.2-src.tar.gz
 
 
-# ----- Commons HttpClient, version 2.0 or later -----
-commons-httpclient.home=${base.path}/commons-httpclient-2.0
-commons-httpclient.lib=${commons-httpclient.home}
-commons-httpclient.jar=${commons-httpclient.lib}/commons-httpclient-2.0.jar
-commons-httpclient.loc=${base-jakarta.loc}/commons/httpclient/binary/commons-httpclient-2.0.tar.gz
-
-
 # ----- Commons Pool, version 1.1 or later -----
-commons-pool.home=${base.path}/commons-pool-1.3-src
-commons-pool-src.loc=${base-jakarta.loc}/commons/pool/source/commons-pool-1.3-src.tar.gz
+commons-pool.home=${base.path}/commons-pool-1.4-src
+commons-pool-src.loc=${base-commons.loc}/pool/source/commons-pool-1.4-src.tar.gz
 
 
 # ----- Commons Collections, version 2.0 or later -----
-commons-collections.home=${base.path}/commons-collections-3.1
+commons-collections.home=${base.path}/commons-collections-3.2
 commons-collections.lib=${commons-collections.home}
-commons-collections.jar=${commons-collections.lib}/commons-collections-3.1.jar
-commons-collections.loc=${base-jakarta.loc}/commons/collections/binaries/commons-collections-3.1.tar.gz
-commons-collections-src.loc=${base-jakarta.loc}/commons/collections/source/commons-collections-3.1-src.tar.gz
+commons-collections.jar=${commons-collections.lib}/commons-collections-3.2.jar
+commons-collections.loc=${base-commons.loc}/collections/binaries/commons-collections-3.2.tar.gz
+commons-collections-src.loc=${base-commons.loc}/collections/source/commons-collections-3.2-src.tar.gz
 
 
 # ----- Commons FileUpload, version 1.0-20030531 or later -----
-commons-fileupload.home=${base.path}/commons-fileupload-1.0
-commons-fileupload.lib=${commons-fileupload.home}
-commons-fileupload.jar=${commons-fileupload.lib}/commons-fileupload-1.0.jar
-commons-fileupload.loc=${base-jakarta.loc}/commons/fileupload/binaries/commons-fileupload-1.0.tar.gz
+commons-fileupload.home=${base.path}/commons-fileupload-1.2
+commons-fileupload.lib=${commons-fileupload.home}/lib
+commons-fileupload.jar=${commons-fileupload.lib}/commons-fileupload-1.2.jar
+commons-fileupload.loc=${base-commons.loc}/fileupload/binaries/commons-fileupload-1.2-bin.tar.gz
 
 # ----- Java Management Extensions (JMX), JMX RI 1.2.1 or later or MX4J 2.0.1 or later -----
-jmx.home=${base.path}/mx4j-3.0.1
+jmx.home=${base.path}/mx4j-3.0.2
 jmx.lib=${jmx.home}/lib
 jmx.jar=${jmx.lib}/mx4j.jar
 jmx-tools.jar=${jmx.lib}/mx4j-tools.jar
 jmx-remote.jar=${jmx.lib}/mx4j-remote.jar
-jmx.loc=${base-sf.loc}/mx4j/mx4j-3.0.1.tar.gz
+jmx.loc=${base-sf.loc}/mx4j/mx4j-3.0.2.tar.gz
 
 
 # ----- JUnit Unit Test Suite, version 3.7 or later -----
-junit.home=${base.path}/junit3.8.1
+junit.home=${base.path}/junit3.8.2
 junit.lib=${junit.home}
 junit.jar=${junit.lib}/junit.jar
-junit.loc=${base-sf.loc}/junit/junit3.8.1.zip
+junit.loc=${base-sf.loc}/junit/junit3.8.2.zip
 
 
 # ----- Rhino ------
@@ -202,19 +197,19 @@
 rhino.loc=http://ftp.mozilla.org/pub/mozilla.org/js/rhino1_6R2.zip
 
 # ----- NSIS, version 2.0 or later -----
-nsis.home=${base.path}/nsis-2.0
+nsis.home=${base.path}/nsis-2.34
 nsis.exe=${nsis.home}/makensis.exe
 nsis.installoptions.dll=${nsis.home}/Plugins/InstallOptions.dll
 nsis.nsexec.dll=${nsis.home}/Plugins/nsExec.dll
-nsis.nsisdl.dll=${nsis.home}/Plugins/nsisdl.dll
-nsis.loc=${base-sf.loc}/nsis/nsis20.exe
+nsis.nsisdl.dll=${nsis.home}/Plugins/NSISdl.dll
+nsis.loc=${base-sf.loc}/nsis/nsis-2.34-setup.exe
 
 
 # ----- Struts, version 1.2.4 or later -----
-struts.home=${base.path}/struts-1.2.7
+struts.home=${base.path}/struts-1.2.9-bin
 struts.lib=${struts.home}/lib
 struts.jar=${struts.lib}/struts.jar
-struts.loc=${base-struts.loc}/binaries/struts-1.2.7.tar.gz
+struts.loc=${base-struts.loc}/binaries/struts-1.2.9-bin.tar.gz
 
 
 # --------------------------------------------------
@@ -223,7 +218,7 @@
 
 
 # ----- Java Activation Framework (JAF), version 1.0.1 or later -----
-activation.home=${base.path}/jaf-1.0.2
+activation.home=${base.path}/jaf-1.1.1
 activation.lib=${activation.home}
 activation.jar=${activation.lib}/activation.jar
 
@@ -235,17 +230,17 @@
 jsse.jar=${jsse.lib}/jsse.jar
 
 # ----- Java Transaction API (JTA), version 1.0.1a or later -----
-jta.home=${base.path}/jta-1_0_1b
+jta.home=${base.path}/jta-1_1
 jta.lib=${jta.home}
 jta.jar=${jta.lib}/jta.jar
 
 # ----- Java Mail, version 1.2 or later -----
-mail.home=${base.path}/javamail-1.3.3_01
+mail.home=${base.path}/javamail-1.4.1
 mail.lib=${mail.home}
 mail.jar=${mail.lib}/mail.jar
 
 # ----- PureTLS Extension, version 0.9 or later -----
-puretls.home=${base.path}/puretls-0.9b4
+puretls.home=${base.path}/puretls-0.9b5
 puretls.lib=${puretls.home}/build
 puretls.jar=${puretls.lib}/puretls.jar
 

Modified: trunk/tomcat5.5/build/build.xml
===================================================================
--- trunk/tomcat5.5/build/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/build/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -176,11 +176,12 @@
     <copy todir="${tomcat.build}/bin" file="${commons-daemon.jsvc.tar.gz}"
             failonerror="false" />
 
-<!--    <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz"
-            file="${tomcat-native.tar.gz}" />-->
+    <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz"
+            file="${tomcat-native.tar.gz}" />
 
     <!-- <copy todir="${tomcat.build}/common/lib" file="${ant.jar}"/>
     <copy todir="${tomcat.build}/common/lib" file="${ant-launcher.jar}"/> -->
+    <copy todir="${tomcat.build}/common/lib" file="${jasper-compiler-jdt.jar}"/>
   </target>
 
   <!-- ====================== Build all components =================== -->
@@ -292,8 +293,6 @@
     <ant dir="${jtc.home}/jk/jkstatus" target="dist">
       <property name="catalina.build" value="${tomcat.build}"/>
       <property name="jtc.home" value="${jtc.home}"/>
-      <property name="jk.build" value="${tomcat.build}/tmp/tomcat-jkstatus-ant/build"/>
-      <property name="jk.dist" value="${tomcat.build}/tmp/tomcat-jkstatus-ant/dist"/>
     </ant>
 
   	<!-- jkstatus ant API -->
@@ -301,7 +300,6 @@
     <ant dir="${jtc.home}/jk/jkstatus" target="copy">
       <property name="catalina.build" value="${tomcat.build}"/>
       <property name="jtc.home" value="${jtc.home}"/>
-      <property name="jk.dist" value="${tomcat.build}/tmp/tomcat-jkstatus-ant/dist"/>
     </ant>
 
   </target>
@@ -673,6 +671,29 @@
 
     <!-- <antcall target="build-commons-modeler" /> -->
     <!-- <antcall target="build-commons-daemon"  /> -->
+
+    <!--<antcall target="downloadgz">
+      <param name="sourcefile" value="${commons-collections-src.loc}"/>
+      <param name="destfile" value="${tomcat-dbcp.jar}" />
+    </antcall>
+    -->
+    <antcall target="downloadgz">
+      <param name="sourcefile" value="${commons-pool-src.loc}"/>
+      <param name="destfile" value="${tomcat-dbcp.jar}" />
+    </antcall>
+    <antcall target="downloadgz">
+      <param name="sourcefile" value="${commons-dbcp-src.loc}"/>
+      <param name="destfile" value="${tomcat-dbcp.jar}" />
+    </antcall>
+
+    <antcall target="build-tomcat-dbcp" />
+
+    <antcall target="downloadzip">
+      <param name="sourcefile" value="${jdt.loc}"/>
+      <param name="destfile" value="${jdt.jar}"/>
+      <param name="destdir" value="${base.path}"/>
+    </antcall>
+    <antcall target="build-jasper-compiler-jdt" />
   </target>
 
   <target name="build-tomcat-dbcp">
@@ -1877,12 +1898,7 @@
           description="Download binary packages" >
     <mkdir dir="${base.path}" />
 
-    <!-- commons-digester needs ../LICENSE -->
-    <!-- That is ugly XXX needs a review -->
-    <copy file="LICENSE" tofile="../LICENSE"/>
-    <copy file="LICENSE" tofile="${base.path}/LICENSE"/>
-
-    <!-- Downdown any sub package or tools needed. -->
+    <!-- Download any sub package or tools needed. -->
     <antcall target="downloadgz">
       <param name="sourcefile" value="${commons-beanutils.loc}"/>
       <param name="destfile" value="${commons-beanutils.jar}"/>
@@ -1894,6 +1910,11 @@
     </antcall>
 
     <antcall target="downloadgz">
+      <param name="sourcefile" value="${commons-digester.loc}"/>
+      <param name="destfile" value="${commons-digester.jar}"/>
+    </antcall>
+
+    <antcall target="downloadgz"> 
       <param name="sourcefile" value="${commons-el.loc}"/>
       <param name="destfile" value="${commons-el.jar}"/>
     </antcall>
@@ -1909,11 +1930,6 @@
     </antcall>
 
     <antcall target="downloadgz">
-      <param name="sourcefile" value="${commons-digester.loc}"/>
-      <param name="destfile" value="${commons-digester.jar}"/>
-    </antcall>
-
-    <antcall target="downloadgz">
       <param name="sourcefile" value="${commons-fileupload.loc}"/>
       <param name="destfile" value="${commons-fileupload.jar}"/>
     </antcall>
@@ -1940,25 +1956,13 @@
       <param name="destfile" value="${commons-launcher.jar}"/>
     </antcall>
 
-    <!--
-    <antcall target="downloadgz">
-      <param name="sourcefile" value="${commons-pool.loc}"/>
-      <param name="destfile" value="${commons-pool.jar}"/>
+    <antcall target="downloadfile">
+      <param name="sourcefile" value="${nsis.loc}"/>
+      <param name="destfile" value="${nsis.exe}"/>
+      <param name="destdir" value="${nsis.home}"/>
     </antcall>
 
     <antcall target="downloadgz">
-      <param name="sourcefile" value="${commons-dbcp.loc}"/>
-      <param name="destfile" value="${commons-dbcp.jar}"/>
-      <param name="destdir" value="${base.path}"/>
-    </antcall>
-    -->
-
-    <antcall target="downloadgz">
-      <param name="sourcefile" value="${commons-httpclient.loc}"/>
-      <param name="destfile" value="${commons-httpclient.jar}"/>
-    </antcall>
-
-    <antcall target="downloadgz">
       <param name="sourcefile" value="${struts.loc}"/>
       <param name="destfile" value="${struts.jar}"/>
     </antcall>
@@ -1968,6 +1972,12 @@
       <param name="destfile" value="${commons-daemon.jar}"/>
     </antcall>
 
+    <antcall target="downloadfile">
+      <param name="sourcefile" value="${tomcat-native.loc}"/>
+      <param name="destfile" value="${tomcat-native.tar.gz}"/>
+      <param name="destdir" value="${tomcat-native.home}"/>
+    </antcall>
+
     <!-- Build the dependencies that are not yet released -->
     <antcall target="build-depends"/>
 
@@ -1990,8 +2000,6 @@
   <target name="testexist">
     <echo message="Testing  for ${destfile}"/>
     <available file="${destfile}" property="exist"/>
-    <fail unless="exist"
-          message="Required file not found, and downloading disabled" />
   </target>
 
   <target name="downloadgz" unless="exist" depends="setproxy,testexist">

Modified: trunk/tomcat5.5/build/sign.bat
===================================================================
--- trunk/tomcat5.5/build/sign.bat	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/build/sign.bat	2008-04-06 12:38:06 UTC (rev 6107)
@@ -22,7 +22,18 @@
 rem todo - make one for unix as well, and avoid signing the .md5 files
 
 @echo off
-FOR /R %cd%\release\v5.5.19 %%i in (*.*) do (
+set VERSION=v5.5.25
+FOR /R %cd%\release\%VERSION% %%i in (*.tar.gz) do (
   echo Signing %%i
   echo %1|gpg --passphrase-fd 0 -a -b %%i 
 )
+
+FOR /R %cd%\release\%VERSION% %%i in (*.exe) do (
+  echo Signing %%i
+  echo %1|gpg --passphrase-fd 0 -a -b %%i 
+)
+
+FOR /R %cd%\release\%VERSION% %%i in (*.zip) do (
+  echo Signing %%i
+  echo %1|gpg --passphrase-fd 0 -a -b %%i 
+)

Modified: trunk/tomcat5.5/build/tomcat.nsi
===================================================================
--- trunk/tomcat5.5/build/tomcat.nsi	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/build/tomcat.nsi	2008-04-06 12:38:06 UTC (rev 6107)
@@ -14,7 +14,7 @@
 ; limitations under the License.
 
 ; Tomcat script for Nullsoft Installer
-; $Id: tomcat.nsi 567301 2007-08-18 17:26:53Z markt $
+; $Id: tomcat.nsi 613225 2008-01-18 19:00:00Z markt $
 
   ;Compression options
   CRCCheck on
@@ -146,7 +146,7 @@
   File /nonfatal /r temp
   SetOutPath $INSTDIR\bin
   File bin\bootstrap.jar
-  File bin\commons-logging-api.jar
+  File bin\commons-logging-api-1.1.1.jar
   File bin\tomcat-juli.jar
   File bin\*.exe
   SetOutPath $INSTDIR\conf

Modified: trunk/tomcat5.5/build.xml
===================================================================
--- trunk/tomcat5.5/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -64,7 +64,7 @@
    description="Builds all components">
 
     <ant dir="${tomcat.home}" target="download" />
-    <ant dir="${tomcat.home}" target="dist" />
+    <ant dir="${tomcat.home}" target="deploy" />
 
   </target>
 

Modified: trunk/tomcat5.5/connectors/.classpath
===================================================================
--- trunk/tomcat5.5/connectors/.classpath	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/.classpath	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,6 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <classpath>
 	<classpathentry excluding="org/apache/coyote/tomcat3/|org/apache/coyote/tomcat4/" kind="src" path="coyote/src/java"/>
+	<classpathentry excluding="org/apache/ajp/tomcat33/|org/apache/ajp/tomcat4/|org/apache/jk/config/" kind="src" path="jk/java"/>
 	<classpathentry kind="src" path="http11/src/java"/>
 	<classpathentry kind="src" path="jni/examples"/>
 	<classpathentry kind="src" path="jni/java"/>
@@ -8,10 +25,8 @@
 	<classpathentry excluding="org/apache/tomcat/util/net/puretls/" kind="src" path="util/java"/>
 	<classpathentry kind="src" path="util/loader"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-logging-1.0.4/commons-logging-api.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/mx4j-3.0.1/lib/mx4j.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-modeler-1.1/commons-modeler.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-collections-3.1/commons-collections-3.1.jar"/>
 	<classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
+	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-logging-1.1.1/commons-logging-1.1.1.jar"/>
+	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-modeler-2.0.1/commons-modeler-2.0.1.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

Modified: trunk/tomcat5.5/connectors/.project
===================================================================
--- trunk/tomcat5.5/connectors/.project	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/.project	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <projectDescription>
 	<name>connectors</name>
 	<comment></comment>

Modified: trunk/tomcat5.5/connectors/README.txt
===================================================================
--- trunk/tomcat5.5/connectors/README.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/README.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
 Tomcat Connector 
 
 This package contains only the tomcat connector:

Modified: trunk/tomcat5.5/connectors/RELEASE-NOTES.txt
===================================================================
--- trunk/tomcat5.5/connectors/RELEASE-NOTES.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/RELEASE-NOTES.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,19 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+
                      Tomcat Connectors Version @VERSION@
                             Release Notes
 

Deleted: trunk/tomcat5.5/connectors/TomcatUTF8.war
===================================================================
(Binary files differ)

Modified: trunk/tomcat5.5/connectors/ajp/proxy/Makefile.in
===================================================================
--- trunk/tomcat5.5/connectors/ajp/proxy/Makefile.in	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/ajp/proxy/Makefile.in	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # a modules Makefile has no explicit targets -- they will be defined by
 # whatever modules are enabled. just grab special.mk to deal with this.
 include $(top_srcdir)/build/special.mk

Modified: trunk/tomcat5.5/connectors/build.xml
===================================================================
--- trunk/tomcat5.5/connectors/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="Jtc" default="dist" basedir=".">
 
 <!-- ========== Initialize Properties ===================================== -->

Modified: trunk/tomcat5.5/connectors/coyote/build.xml
===================================================================
--- trunk/tomcat5.5/connectors/coyote/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/coyote/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="Coyote" default="compile" basedir=".">
 
 
@@ -3,5 +20,5 @@
 <!--
         "Coyote" connector framework for Jakarta Tomcat
-        $Id: build.xml 301006 2005-07-30 11:39:50Z markt $
+        $Id: build.xml 572115 2007-09-02 19:22:38Z markt $
 -->
 

Modified: trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+
 #
 # CoyoteConnector
 #

Modified: trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+
 #
 # CoyoteConnector
 #

Modified: trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+
 #
 # CoyoteConnector
 #

Modified: trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+
 #
 # CoyoteConnector
 #

Modified: trunk/tomcat5.5/connectors/doc/install_tomcat33.html
===================================================================
--- trunk/tomcat5.5/connectors/doc/install_tomcat33.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/doc/install_tomcat33.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <html>
 <head>
 <title>Installing tomcat-connector in tomcat3.3</title>

Modified: trunk/tomcat5.5/connectors/doc/install_tomcat40.html
===================================================================
--- trunk/tomcat5.5/connectors/doc/install_tomcat40.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/doc/install_tomcat40.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <html>
 <head>
 <title>Installing tomcat-connector in tomcat4.0</title>

Deleted: trunk/tomcat5.5/connectors/doc/install_tomcat41.html
===================================================================
--- trunk/tomcat5.5/connectors/doc/install_tomcat41.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/doc/install_tomcat41.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,20 +0,0 @@
-<html>
-<head>
-<title>Installing tomcat-connector in tomcat4.1</title>
-</head>
-<body>
-<h2>Installing tomcat-connector in tomcat4.1</h2>
-<ul>
-<li>get the new connector ( I'll post the URL soon )</li>
-<li>move mx4j-jmx.jar from server/lib to common/lib. This is not required, but allows you to use JMX. If you run
- tomcat in a sandbox - you can replace mx4j-jmx with jmxri-1.2, which has policy-based security.</li>
-<li>in server/lib, replace tomcat-util.jar, tomcat-jk2.jar, tomcat-coyote.jar and tomcat-http11.jar with the new
- versions.</li>
-<li>copy tomcat4-coyote.jar to server/lib. This is a new file containing the coyote adapter for tomcat4, used to
- be in tomcat-coyote.jar</li>
-<li>remove bin/tomcat-jni.jar ( it is an odd file that causes several
-problems - if you use in-process tomcat we'll provide a different
-mechanism )</li>
-</ul>
-</body>
-</html>

Modified: trunk/tomcat5.5/connectors/http11/build.xml
===================================================================
--- trunk/tomcat5.5/connectors/http11/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/http11/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="Coyote" default="compile" basedir=".">
 
 
@@ -3,5 +20,5 @@
 <!--
         "Coyote" connector framework for Jakarta Tomcat
-        $Id: build.xml 504390 2007-02-07 00:47:18Z markt $
+        $Id: build.xml 572117 2007-09-02 19:24:01Z markt $
 -->
 

Modified: trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -608,8 +608,8 @@
                     processor.setMaxKeepAliveRequests(proto.maxKeepAliveRequests);
                     processor.setTimeout(proto.timeout);
                     processor.setDisableUploadTimeout(proto.disableUploadTimeout);
+                    processor.setCompressionMinSize(proto.compressionMinSize);
                     processor.setCompression(proto.compression);
-                    processor.setCompressionMinSize(proto.compressionMinSize);
                     processor.setNoCompressionUserAgents(proto.noCompressionUserAgents);
                     processor.setCompressableMimeTypes(proto.compressableMimeTypes);
                     processor.setRestrictedUserAgents(proto.restrictedUserAgents);

Modified: trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java
===================================================================
--- trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -623,8 +623,8 @@
             processor.setMaxKeepAliveRequests( proto.maxKeepAliveRequests );
             processor.setTimeout( proto.timeout );
             processor.setDisableUploadTimeout( proto.disableUploadTimeout );
+            processor.setCompressionMinSize( proto.compressionMinSize);
             processor.setCompression( proto.compression );
-            processor.setCompressionMinSize( proto.compressionMinSize);
             processor.setNoCompressionUserAgents( proto.noCompressionUserAgents);
             processor.setCompressableMimeTypes( proto.compressableMimeTypes);
             processor.setRestrictedUserAgents( proto.restrictedUserAgents);

Modified: trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,20 @@
-# $Id: LocalStrings.properties 414658 2006-06-15 19:21:24Z yoavs $
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+# $Id: LocalStrings.properties 572117 2007-09-02 19:24:01Z markt $
+
 # language 
 
 # package org.apache.coyote.http11

Modified: trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,20 @@
-# $Id: LocalStrings_es.properties 299220 2004-02-24 08:50:56Z hgomez $
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+# $Id: LocalStrings_es.properties 572117 2007-09-02 19:24:01Z markt $
+
 # language es
 
 # package org.apache.coyote.http11

Modified: trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,20 @@
-# $Id: LocalStrings_fr.properties 299220 2004-02-24 08:50:56Z hgomez $
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+# $Id: LocalStrings_fr.properties 572117 2007-09-02 19:24:01Z markt $
+
 # language fr
 
 # package org.apache.coyote.http11

Modified: trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/http11/src/java/org/apache/coyote/http11/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,20 @@
-# $Id: LocalStrings_ja.properties 299758 2004-08-30 17:29:47Z amyroh $
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+# $Id: LocalStrings_ja.properties 572117 2007-09-02 19:24:01Z markt $
+
 # language ja
 
 # package org.apache.coyote.http11

Modified: trunk/tomcat5.5/connectors/http11/src/test/test.bat
===================================================================
--- trunk/tomcat5.5/connectors/http11/src/test/test.bat	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/http11/src/test/test.bat	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
+ at echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements.  See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License.  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.
 
 
+
 java -cp .;../../../lib/commons-logging.jar;../lib/tomcat-util.jar;../lib/tomcat-coyote.jar;../lib/tomcat-http11.jar org.apache.coyote.http11.FileTester tests/test1.txt tests/test1.out
 

Modified: trunk/tomcat5.5/connectors/jk/BUILD.txt
===================================================================
--- trunk/tomcat5.5/connectors/jk/BUILD.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/BUILD.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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 a source release of the mod_jk 1.2 web server connector for
 Tomcat. Only the web server connector source is included.  The Tomcat
 side of the connector is available with the normal Tomcat distribution.
@@ -3,5 +18,5 @@
 
 Documentation for how to build mod_jk 1.2 from source and configure
-it for your webserver is located in the native/BUILDING file in this
+it for your webserver is located in the native/BUILDING.txt file in this
 source distribution.
 

Deleted: trunk/tomcat5.5/connectors/jk/HOWTO-RELEASE
===================================================================
--- trunk/tomcat5.5/connectors/jk/HOWTO-RELEASE	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/HOWTO-RELEASE	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,165 +0,0 @@
-		How to do a mod_jk 1.2 release
-
-Check out a clean copy of tomcat/connectors from subversion to
-make sure you don't have any lingering configure or build files.
-This will make sure that the source distribution created is clean.
-
-We assume, that you check out to a directory tomcat-connectors.
-
-If you haven't already, add your public PGP key to
-tomcat-connectors/KEYS.
-
-Update version numbers as needed
---------------------------------
-
-Do a find for all the docs which include the previous version string
-and replace it with the new version.  These are the docs I found which
-had to be updated:
-
-xdocs/index.xml
-xdocs/news/<THISYEAR0101>.xml
-native/STATUS.txt
-
-Update the JK_VERISRELEASE define in jk/native/common/jk_version.h, here is
-a svn diff that shows what I changed:
-
-Index: native/common/jk_version.h
-===================================================================
---- native/common/jk_version.h  (revision 417260)
-+++ native/common/jk_version.h  (working copy)
-@@ -32,7 +32,7 @@
- #define JK_VERBETA      0
- #define JK_BETASTRING   "0"
- /* set JK_VERISRELEASE to 1 when release (do not forget to commit!) */
--#define JK_VERISRELEASE 0
-+#define JK_VERISRELEASE 1
- #define JK_VERRC        0
- #define JK_RCSTRING     "0"
-
-After updating revision numbers, commit your changes to subversion.
-
-Tag and branch tomcat-connectors in subversion
-----------------------------------------------
-
-Use the pattern below for branching and tagging the tomcat-connectors directory.
-
-TAG=JK_{MAJOR_REVISION}_{MINOR_REVISION}_{RELEASE}
-
-svn copy \
-   https://svn.apache.org/repos/asf/tomcat/connectors/trunk/ \
-   https://svn.apache.org/repos/asf/tomcat/connectors/tags/jk1.2.x/TAG/
-
-Here is an example for mod_jk 1.2.16
-
-svn copy \
-   https://svn.apache.org/repos/asf/tomcat/connectors/trunk/ \
-   https://svn.apache.org/repos/asf/tomcat/connectors/tags/jk1.2.x/JK_1_2_16/
-
-Build the mod_jk 1.2 documentation
-----------------------------------
-
-cd tomcat-connectors/jk/xdocs
-ant
-
-
-Check the documentation carefully (produced in tomcat-connectors/jk/build/docs)
-and copy it to people.apache.org:/x1/www/tomcat.apache.org/connectors-doc
-
-Create the new source distribution
-----------------------------------
-
-A tool named jkrelease.sh in tomcat-connectors/jk/tools creates
-a release tarball and a zip including signature files.
-
-Upload source distribution and documentation to www.apache.org
--------------------------------------------------------------------
-First update the KEYS on the server if you have added a new pgp key.
-
-scp tomcat-connectors/KEYS to the
-/www/www.apache.org/dist/tomcat/tomcat-connectors
-directory on the www.apache.org server.
-
-scp tomcat-connectors-jk-1.2.16-src.tar.gz* to 
-/www/www.apache.org/dist/tomcat/tomcat-connectors/jk/source
-scp tomcat-connectors-jk-1.2.16-src.zip* to   
-/www/www.apache.org/dist/tomcat/tomcat-connectors/jk/source
-
-ssh to www.apache.org and cd to the
-/www/www.apache.org/dist/tomcat/tomcat-connectors/jk directory.
-
-Remove the symlinks for current and replace them with a soft link
-to the new source distribution files.
-
-ln -s source/tomcat-connectors-jk-1.2.16-src.tar.gz tomcat-connectors-jk-src-current.tar.gz
-ln -s source/tomcat-connectors-jk-1.2.16-src.tar.gz.asc tomcat-connectors-jk-src-current.tar.gz.asc
-ln -s source/tomcat-connectors-jk-1.2.16-src.tar.zip tomcat-connectors-jk-src-current.zip
-ln -s source/tomcat-connectors-jk-1.2.16-src.zip.asc tomcat-connectors-jk-src-current.zip.asc
-
-Make sure the group write bit is set on all files and directories
-in the jk directory.
-
-chmod -R g+w /www/www.apache.org/dist/tomcat/tomcat-connectors/jk/
-
-Build binaries and upload distributions to www.apache.org
---------------------------------------------------------------
-
-Build mod_jk for a specific web server and OS.  Package it as appropriate for
-the OS and sign the archive using PGP. Please include the ASF License, the
-generated docs, and the tools.  Please name the distribuiton as follows:
-
-tomcat-connectors-jk-{version}-{os-version-cpu}-{web server-version}.(tar.gz|zip)
-
-scp the binary distribution and pgp signature file to the appropriate binaries/{os} directory.
-
-Make sure the group write bit is on for all files you upload.
-
-Update source for next version
-------------------------------
-
-native/STATUS.txt: Add status "in development" for new version.
-native/configure.in: Update variable VERSION.
-native/common/jk_version.h: Update variables JK_VERMAJOR, JK_VERMINOR, JK_VERFIX,
-                            JK_VERSTRING, and JK_VERISRELEASE.
-native/common/portable.h.sample: Update VERSION define.
-native/iis/isapi_redirect.rc: Update JK_VERSION_STR, FILEVERSION, and PRODUCTVERSION
-native/iis/installer/isapi-redirector-win32-msi.ism: Update ProductVersion.
-xdocs/miscellaneous/changelog.xml: Start a new section for the new version.
-
-Remove old release distributions from www.apache.org
-----------------------------------------------------
-
-Verify that the old versions of the source and binary distributions are
-available at /www/archive.apache.org/dist/tomcat/tomcat-connector/jk .
-Copy old source distributions and binaries as needed, then remove the
-old source and binary distributions.
-
-Arrange the downloads_tomcat-connectors.cgi
--------------------------------------------
-
-Check tomcat-site out:
-svn co https://svn.apache.org/repos/asf/tomcat/site site-tomcat
-
-
-Arrange the file: xdocs/downloads/downloads.xml
-
-Use ant to regenerate the corresponding html file:
-docs/site/downloads/downloads_tomcat-connectors.html
-
-Commit it after checking carefully the changes.
-
-Connect to people.apache.org and update the tomcat.apache.org site image,
-the site tomcat.apache.org should reflect the change after a while.
-cd /x2/www/tomcat.apache.org/site/downloads
-svn update downloads_tomcat-connectors.html
-
-Announcements
--------------
-
-The release distribution directories are mirrored so that the
-releases can be downloaded from multiple sites.  Please wait
-24 hours before sending out the announcement so that the mirrors
-get a chance to get the new release distributions.
-
-Send an email announcement to users at tomcat.apache.org,
-dev at tomcat.apache.org, and announce at apache.org.
-

Added: trunk/tomcat5.5/connectors/jk/HOWTO-RELEASE.txt
===================================================================
--- trunk/tomcat5.5/connectors/jk/HOWTO-RELEASE.txt	                        (rev 0)
+++ trunk/tomcat5.5/connectors/jk/HOWTO-RELEASE.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -0,0 +1,180 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+		How to do a mod_jk 1.2 release
+
+Check out a clean copy of tomcat/connectors from subversion to
+make sure you don't have any lingering configure or build files.
+This will make sure that the source distribution created is clean.
+
+We assume, that you check out to a directory tomcat-connectors.
+
+If you haven't already, add your public PGP key to
+tomcat-connectors/KEYS.
+
+Update version numbers as needed
+--------------------------------
+
+Do a find for all the docs which include the previous version string
+and replace it with the new version.  These are the docs I found which
+had to be updated:
+
+xdocs/index.xml
+xdocs/news/<THISYEAR0101>.xml
+native/STATUS.txt
+
+Update the JK_VERISRELEASE define in jk/native/common/jk_version.h, here is
+a svn diff that shows what I changed:
+
+Index: native/common/jk_version.h
+===================================================================
+--- native/common/jk_version.h  (revision 417260)
++++ native/common/jk_version.h  (working copy)
+@@ -32,7 +32,7 @@
+ #define JK_VERBETA      0
+ #define JK_BETASTRING   "0"
+ /* set JK_VERISRELEASE to 1 when release (do not forget to commit!) */
+-#define JK_VERISRELEASE 0
++#define JK_VERISRELEASE 1
+ #define JK_VERRC        0
+ #define JK_RCSTRING     "0"
+
+After updating revision numbers, commit your changes to subversion.
+
+Tag and branch tomcat-connectors in subversion
+----------------------------------------------
+
+Use the pattern below for branching and tagging the tomcat-connectors directory.
+
+TAG=JK_{MAJOR_REVISION}_{MINOR_REVISION}_{RELEASE}
+
+svn copy \
+   https://svn.apache.org/repos/asf/tomcat/connectors/trunk/ \
+   https://svn.apache.org/repos/asf/tomcat/connectors/tags/jk1.2.x/TAG/
+
+Here is an example for mod_jk 1.2.16
+
+svn copy \
+   https://svn.apache.org/repos/asf/tomcat/connectors/trunk/ \
+   https://svn.apache.org/repos/asf/tomcat/connectors/tags/jk1.2.x/JK_1_2_16/
+
+Build the mod_jk 1.2 documentation
+----------------------------------
+
+cd tomcat-connectors/jk/xdocs
+ant
+
+
+Check the documentation carefully (produced in tomcat-connectors/jk/build/docs)
+and copy it to people.apache.org:/x1/www/tomcat.apache.org/connectors-doc
+
+Create the new source distribution
+----------------------------------
+
+A tool named jkrelease.sh in tomcat-connectors/jk/tools creates
+a release tarball and a zip including signature files.
+
+Upload source distribution and documentation to www.apache.org
+-------------------------------------------------------------------
+First update the KEYS on the server if you have added a new pgp key.
+
+scp tomcat-connectors/KEYS to the
+/www/www.apache.org/dist/tomcat/tomcat-connectors
+directory on the www.apache.org server.
+
+scp tomcat-connectors-jk-1.2.16-src.tar.gz* to 
+/www/www.apache.org/dist/tomcat/tomcat-connectors/jk/source
+scp tomcat-connectors-jk-1.2.16-src.zip* to   
+/www/www.apache.org/dist/tomcat/tomcat-connectors/jk/source
+
+ssh to www.apache.org and cd to the
+/www/www.apache.org/dist/tomcat/tomcat-connectors/jk directory.
+
+Remove the symlinks for current and replace them with a soft link
+to the new source distribution files.
+
+ln -s source/tomcat-connectors-jk-1.2.16-src.tar.gz tomcat-connectors-jk-src-current.tar.gz
+ln -s source/tomcat-connectors-jk-1.2.16-src.tar.gz.asc tomcat-connectors-jk-src-current.tar.gz.asc
+ln -s source/tomcat-connectors-jk-1.2.16-src.tar.zip tomcat-connectors-jk-src-current.zip
+ln -s source/tomcat-connectors-jk-1.2.16-src.zip.asc tomcat-connectors-jk-src-current.zip.asc
+
+Make sure the group write bit is set on all files and directories
+in the jk directory.
+
+chmod -R g+w /www/www.apache.org/dist/tomcat/tomcat-connectors/jk/
+
+Build binaries and upload distributions to www.apache.org
+--------------------------------------------------------------
+
+Build mod_jk for a specific web server and OS.  Package it as appropriate for
+the OS and sign the archive using PGP. Please include the ASF License, the
+generated docs, and the tools.  Please name the distribuiton as follows:
+
+tomcat-connectors-jk-{version}-{os-version-cpu}-{web server-version}.(tar.gz|zip)
+
+scp the binary distribution and pgp signature file to the appropriate binaries/{os} directory.
+
+Make sure the group write bit is on for all files you upload.
+
+Update source for next version
+------------------------------
+
+native/STATUS.txt: Add status "in development" for new version.
+native/configure.in: Update variable VERSION.
+native/common/jk_version.h: Update variables JK_VERMAJOR, JK_VERMINOR, JK_VERFIX,
+                            JK_VERSTRING, and JK_VERISRELEASE.
+native/common/portable.h.sample: Update VERSION define.
+native/iis/isapi_redirect.rc: Update JK_VERSION_STR, FILEVERSION, and PRODUCTVERSION
+native/iis/installer/isapi-redirector-win32-msi.ism: Update ProductVersion.
+xdocs/miscellaneous/changelog.xml: Start a new section for the new version.
+
+Remove old release distributions from www.apache.org
+----------------------------------------------------
+
+Verify that the old versions of the source and binary distributions are
+available at /www/archive.apache.org/dist/tomcat/tomcat-connector/jk .
+Copy old source distributions and binaries as needed, then remove the
+old source and binary distributions.
+
+Arrange the downloads_tomcat-connectors.cgi
+-------------------------------------------
+
+Check tomcat-site out:
+svn co https://svn.apache.org/repos/asf/tomcat/site site-tomcat
+
+
+Arrange the file: xdocs/downloads/downloads.xml
+
+Use ant to regenerate the corresponding html file:
+docs/site/downloads/downloads_tomcat-connectors.html
+
+Commit it after checking carefully the changes.
+
+Connect to people.apache.org and update the tomcat.apache.org site image,
+the site tomcat.apache.org should reflect the change after a while.
+cd /x2/www/tomcat.apache.org/site/downloads
+svn update downloads_tomcat-connectors.html
+
+Announcements
+-------------
+
+The release distribution directories are mirrored so that the
+releases can be downloaded from multiple sites.  Please wait
+24 hours before sending out the announcement so that the mirrors
+get a chance to get the new release distributions.
+
+Send an email announcement to users at tomcat.apache.org,
+dev at tomcat.apache.org, and announce at apache.org.
+

Modified: trunk/tomcat5.5/connectors/jk/README.txt
===================================================================
--- trunk/tomcat5.5/connectors/jk/README.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/README.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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 directory contains both the native and java-side code for
 ajp connectors.
 

Modified: trunk/tomcat5.5/connectors/jk/build.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="jk" default="build-main" basedir=".">
   
     <!-- We'll build jk for 3.3 or 4.0 ( depending on what you have installed ).

Modified: trunk/tomcat5.5/connectors/jk/conf/jk2.properties
===================================================================
--- trunk/tomcat5.5/connectors/jk/conf/jk2.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/conf/jk2.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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 FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
 ## WHEN YOU EDIT THE FILE.
 

Modified: trunk/tomcat5.5/connectors/jk/conf/jkconf.ant.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/conf/jkconf.ant.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/conf/jkconf.ant.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="jkconf" default="main" basedir=".">
 
     <target name="init-3x" if="33.detect">

Modified: trunk/tomcat5.5/connectors/jk/conf/uriworkermap.properties
===================================================================
--- trunk/tomcat5.5/connectors/jk/conf/uriworkermap.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/conf/uriworkermap.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # uriworkermap.properties - IIS
 #
 # This file provides sample mappings for example wlb

Modified: trunk/tomcat5.5/connectors/jk/conf/workers.properties
===================================================================
--- trunk/tomcat5.5/connectors/jk/conf/workers.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/conf/workers.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # workers.properties -
 #
 # This file provides jk derived plugins with the needed information to

Modified: trunk/tomcat5.5/connectors/jk/conf/workers.properties.minimal
===================================================================
--- trunk/tomcat5.5/connectors/jk/conf/workers.properties.minimal	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/conf/workers.properties.minimal	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # workers.properties.minimal -
 #
 # This file provides minimal jk configuration properties needed to

Modified: trunk/tomcat5.5/connectors/jk/conf/workers2.properties
===================================================================
--- trunk/tomcat5.5/connectors/jk/conf/workers2.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/conf/workers2.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 [logger]
 level=DEBUG
 

Modified: trunk/tomcat5.5/connectors/jk/conf/workers2.properties.minimal
===================================================================
--- trunk/tomcat5.5/connectors/jk/conf/workers2.properties.minimal	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/conf/workers2.properties.minimal	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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 minimal JK2 connector configuration file.
 # 
 

Modified: trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,20 @@
-# $Id: LocalStrings.properties 295282 2001-05-12 05:52:38Z seguin $
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+# $Id: LocalStrings.properties 572120 2007-09-02 19:32:11Z markt $
+
 # language
 
 # package org.apache.jk.ajp.tomcat4;

Modified: trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,20 @@
-# $Id: LocalStrings_es.properties 299218 2004-02-24 08:48:44Z hgomez $
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+# $Id: LocalStrings_es.properties 572120 2007-09-02 19:32:11Z markt $
+
 # language es
 
 # package org.apache.jk.ajp.tomcat4;

Modified: trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,20 @@
-# $Id: LocalStrings_fr.properties 299218 2004-02-24 08:48:44Z hgomez $
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+# $Id: LocalStrings_fr.properties 572120 2007-09-02 19:32:11Z markt $
+
 # language fr
 
 # package org.apache.jk.ajp.tomcat4;

Modified: trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/java/org/apache/ajp/tomcat4/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,20 @@
-# $Id: LocalStrings_ja.properties 298858 2003-09-02 14:11:53Z remm $
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+# $Id: LocalStrings_ja.properties 572120 2007-09-02 19:32:11Z markt $
+
 # language ja
 
 # package org.apache.jk.ajp.tomcat4;

Modified: trunk/tomcat5.5/connectors/jk/java/org/apache/coyote/ajp/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/connectors/jk/java/org/apache/coyote/ajp/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/java/org/apache/coyote/ajp/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,20 @@
-# $Id: LocalStrings.properties 301021 2005-08-01 10:00:59Z remm $
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+# $Id: LocalStrings.properties 572120 2007-09-02 19:32:11Z markt $
+
 # language 
 
 # package org.apache.coyote.ajp

Modified: trunk/tomcat5.5/connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java
===================================================================
--- trunk/tomcat5.5/connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -36,6 +36,7 @@
 import java.net.ServerSocket;
 import java.net.Socket;
 import java.net.SocketException;
+import java.net.SocketTimeoutException;
 
 import javax.management.ListenerNotFoundException;
 import javax.management.MBeanNotificationInfo;
@@ -882,6 +883,8 @@
 
         synchronized void  process(SelectionKey sk) {
             if(!sk.isValid()) {
+                SocketInputStream sis = (SocketInputStream)ep.getNote(isNote);
+                sis.closeIt();
                 return;
             }
             if(sk.isReadable()) {
@@ -959,15 +962,11 @@
                         Iterator it = sels.iterator();
                         while(it.hasNext()) {
                             SelectionKey sk = (SelectionKey)it.next();
-                            if(sk.isValid()) {
-                                if(sk.isAcceptable()) {
-                                    acceptConnections();
-                                } else {
-                                    SocketConnection sc = (SocketConnection)sk.attachment();
-                                    sc.process(sk);
-                                }
+                            if(sk.isAcceptable()) {
+                                acceptConnections();
                             } else {
-                                sk.cancel();
+                                SocketConnection sc = (SocketConnection)sk.attachment();
+                                sc.process(sk);
                             }
                             it.remove();
                         }
@@ -1081,8 +1080,7 @@
                     nr = -1; // Can't handle this yet
                 }
                 if(nr < 0) {
-                    isClosed = true;
-                    notify();
+                    closeIt();
                     return false;
                 } else if(nr == 0) {
                     if(!nioIsBroken) {
@@ -1093,6 +1091,12 @@
             return true;
         }
 
+        synchronized void closeIt() {
+            isClosed = true;
+            if(blocking)
+                notify();
+        }
+
         public int read(byte [] data) throws IOException {
             return read(data, 0, data.length);
         }
@@ -1132,7 +1136,9 @@
                 if(fill(len) < 0) {
                     isClosed = true;
                 } 
-            }
+            } else if(!isClosed) {
+		throw new SocketTimeoutException("Read request timed out");
+	    }
         }
     }
 

Modified: trunk/tomcat5.5/connectors/jk/java/org/apache/jk/core/MsgContext.java
===================================================================
--- trunk/tomcat5.5/connectors/jk/java/org/apache/jk/core/MsgContext.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/java/org/apache/jk/core/MsgContext.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -276,12 +276,15 @@
             
         } else if( actionCode==ActionCode.ACTION_CLIENT_FLUSH ) {
             if( log.isDebugEnabled() ) log.debug("CLIENT_FLUSH " );
+            Response res = (Response)param;
+            if(!res.isCommitted()) {
+		action(ActionCode.ACTION_COMMIT, res);
+	    }
             try {
                 source.flush( null, this );
             } catch(IOException iex) {
                 // This is logged elsewhere, so debug only here
                 log.debug("Error during flush",iex);
-                Response res = (Response)param;
                 res.setErrorException(iex);
                 setStatus(JK_STATUS_ERROR);
             }

Modified: trunk/tomcat5.5/connectors/jk/java/org/apache/jk/core/package.html
===================================================================
--- trunk/tomcat5.5/connectors/jk/java/org/apache/jk/core/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/java/org/apache/jk/core/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>

Modified: trunk/tomcat5.5/connectors/jk/java/org/apache/jk/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/java/org/apache/jk/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/java/org/apache/jk/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!DOCTYPE mbeans-descriptors PUBLIC
  "-//Apache Software Foundation//DTD Model MBeans Configuration File"
  "http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd">

Modified: trunk/tomcat5.5/connectors/jk/jkant/ant.tasks
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkant/ant.tasks	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkant/ant.tasks	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 so=org.apache.jk.ant.SoTask
 libtoolCompile=org.apache.jk.ant.compilers.LibtoolCompiler
 ccCompile=org.apache.jk.ant.compilers.CcCompiler

Modified: trunk/tomcat5.5/connectors/jk/jkant/buildJakarta.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkant/buildJakarta.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkant/buildJakarta.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!-- EXPERIMENTAL - JUST AN EXAMPLE ON HOW TO USE GCJ TASK -->
 <!-- MAY REQUIRE SMALL/TRIVIAL MODIFICATION IN SOURCES -->
 <!-- REQUIRES GCJ FROM CVS - 3.0.1 DOESN'T WORK -->

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/build.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="JkStatus" default="dist" basedir=".">
 
 

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/conf/jkstatus-tasks.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/conf/jkstatus-tasks.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/conf/jkstatus-tasks.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
+<!--
   XML file for importing apache jk status ant tasks.
   <import file="${jkstatus.home}/lib/jkstatus-tasks.xml"/>
 -->

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/example/jkstatus.properties.default
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/example/jkstatus.properties.default	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/example/jkstatus.properties.default	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 jkstatus.host=localhost
 jkstatus.port=2090
 jkstatus.username=manager

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/example/jkstatus.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/example/jkstatus.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/example/jkstatus.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!-- @author Peter Rossbach -->
 
 <project name="status" 

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/example/show.txt
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/example/show.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/example/show.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
 How to use the show example:
 ant -f show.xml
 Configure mod_jk (httpd.conf and workers.properties):

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/example/show.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/example/show.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/example/show.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
+
 <project name="modjk-status" 
          xmlns:jk="urn:org-apache-jk-status"
          default="status" basedir=".">

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/JkStatusUpdateLoadbalancerTask.java
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/JkStatusUpdateLoadbalancerTask.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/JkStatusUpdateLoadbalancerTask.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -28,7 +28,7 @@
  * 
  * 
  * @author Peter Rossbach
- * @version $Revision: 550273 $
+ * @version $Revision: 611693 $
  * @since mod_jk 1.2.20
  */
 public class JkStatusUpdateLoadbalancerTask extends AbstractJkStatusTask {
@@ -216,7 +216,7 @@
 	/**
      * Create JkStatus worker update link
      * <ul>
-     * </b>http://localhost/jkstatus?cmd=update&mime=txt&w=loadbalancer&lm=1&ll=1&lr=2&lt=60&ls=true&lf=false&lx=0
+     * </b>http://localhost/jkstatus?cmd=update&mime=txt&w=loadbalancer&vlm=1&vll=1&vlr=2&vlt=60&vls=true&vlf=false&vlx=0
      * <br/>
      *
      * 
@@ -224,23 +224,23 @@
      * <br/>
      * <ul>
      * <li><b>w:<b/> name loadbalancer</li>
-     * <li><b>lm:<b/> method (lb strategy)</li>
-     * <li><b>ll:<b/> lock</li>
-     * <li><b>lr:<b/> retries</li>
-     * <li><b>lt:<b/> recover wait timeout</li>
-     * <li><b>ls:<b/> sticky session</li>
-     * <li><b>lf:<b/> force sticky session</li>
-     * <li><b>lx:<b/> max reply timeouts</li>
+     * <li><b>vlm:<b/> method (lb strategy)</li>
+     * <li><b>vll:<b/> lock</li>
+     * <li><b>vlr:<b/> retries</li>
+     * <li><b>vlt:<b/> recover wait timeout</li>
+     * <li><b>vls:<b/> sticky session</li>
+     * <li><b>vlf:<b/> force sticky session</li>
+     * <li><b>vlx:<b/> max reply timeouts</li>
      * </ul>
      * <ul>
-     * <li>lm=1 or Requests</li>
-     * <li>lm=2 or Traffic</li>
-     * <li>lm=3 or Busyness</li>
-     * <li>lm=4 or Sessions</li>
+     * <li>vlm=0 or Requests</li>
+     * <li>vlm=1 or Traffic</li>
+     * <li>vlm=2 or Busyness</li>
+     * <li>vlm=3 or Sessions</li>
      * </ul>
      * <ul>
-     * <li>ll=1 or Optimistic</li>
-     * <li>ll=2 or Pessimistic</li>
+     * <li>vll=0 or Optimistic</li>
+     * <li>vll=1 or Pessimistic</li>
      * </ul>
      * 
      * @return create jkstatus update worker link
@@ -253,39 +253,39 @@
             sb.append("&w=");
             sb.append(URLEncoder.encode(loadbalancer, getCharset()));
             if (stickySession != null) { 
-				sb.append("&ls=");
+				sb.append("&vls=");
 				sb.append(stickySession);
 			}
             if (forceStickySession != null) { 
- 				sb.append("&lf=");
+ 				sb.append("&vlf=");
  				sb.append(forceStickySession);
  			}
 			if (retries >= 0) {
-				sb.append("&lr=");
+				sb.append("&vlr=");
 				sb.append(retries);
 			}
 			if (recoverWaitTime >= 0) {
-				sb.append("&lt=");
+				sb.append("&vlt=");
 				sb.append(recoverWaitTime);
 			}
-			if (method == null && methodCode > 0 && methodCode < 5) {
-				sb.append("&lm=");
+			if (method == null && methodCode >= 0 && methodCode < 4) {
+				sb.append("&vlm=");
 				sb.append(methodCode);
 			}
             if (method != null) { 
- 				sb.append("&lm=");
+ 				sb.append("&vlm=");
  				sb.append(method);
  			}
-			if (lock == null && lockCode > 0 && lockCode < 3) {
-				sb.append("&ll=");
+			if (lock == null && lockCode >= 0 && lockCode < 2) {
+				sb.append("&vll=");
 				sb.append(lockCode);
 			}
             if (lock != null) { 
- 				sb.append("&ll=");
+ 				sb.append("&vll=");
  				sb.append(lock);
  			}
 			if (maxReplyTimeouts >= 0) {
-				sb.append("&lx=");
+				sb.append("&vlx=");
 				sb.append(maxReplyTimeouts);
 			}
             

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/JkStatusUpdateTask.java
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/JkStatusUpdateTask.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/JkStatusUpdateTask.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -29,7 +29,7 @@
  * 
  * 
  * @author Peter Rossbach
- * @version $Revision: 485242 $
+ * @version $Revision: 611693 $
  * @since 5.5.10
  * @deprecated
  */
@@ -282,9 +282,9 @@
     
     /**
      * <ul>
-     * <li>1 active</li>
-     * <li>2 disabled</li>
-     * <li>3 stopped</li>
+     * <li>0 active</li>
+     * <li>1 disabled</li>
+     * <li>2 stopped</li>
      * </ul>
      * @param workerActivation The workerActivation to set.
      * 
@@ -356,14 +356,14 @@
      * Create JkStatus link
      * <ul>
      * <li><b>load balance example:
-     * </b>http://localhost/jkstatus?cmd=update&mime=txt&w=lb&lf=false&ls=true</li>
+     * </b>http://localhost/jkstatus?cmd=update&mime=txt&w=lb&vlf=false&vls=true</li>
      * <li><b>worker example:
-     * </b>http://localhost/jkstatus?cmd=update&mime=txt&w=node1&wn=node01&l=lb&wf=1&wa=1&wx=0
+     * </b>http://localhost/jkstatus?cmd=update&mime=txt&w=lb&sw=node1&vwn=node01&vwf=1&vwa=2&vwx=0
      * <br/>
      * <ul>
-     * <li>wa=1 active</li>
-     * <li>wa=2 disabled</li>
-     * <li>wa=3 stopped</li>
+     * <li>vwa=0 active</li>
+     * <li>vwa=1 disabled</li>
+     * <li>vwa=2 stopped</li>
      * </ul>
      * </li>
      * </ul>
@@ -372,23 +372,23 @@
      * <br/>
      * <ul>
      * <li><b>w:<b/> name lb worker</li>
-     * <li><b>lr:<b/> Number of Retries</li>
-     * <li><b>lt:<b/> recover wait time</li>
-     * <li><b>lf:<b/> Force Sticky Session</li>
-     * <li><b>ls:<b/> Sticky session</li>
+     * <li><b>vlr:<b/> Number of Retries</li>
+     * <li><b>vlt:<b/> recover wait time</li>
+     * <li><b>vlf:<b/> Force Sticky Session</li>
+     * <li><b>vls:<b/> Sticky session</li>
      * </ul>
      * 
      * <br/>Tcp worker parameter:
      * <br/>
      * <ul>
-     * <li><b>w:<b/> name tcp worker node</li>
-     * <li><b>l:<b/> name loadbalancer</li>
-     * <li><b>wf:<b/> load factor</li>
-     * <li><b>wn:<b/> jvm route</li>
-     * <li><b>wx:<b/> distance</li>
-     * <li><b>wa:<b/> activation state</li>
-     * <li><b>wr:<b/> redirect route</li>
-     * <li><b>wd:<b/> cluster domain</li>
+     * <li><b>w:<b/> name worker</li>
+     * <li><b>sw:<b/> name lb sub worker</li>
+     * <li><b>vwf:<b/> load factor</li>
+     * <li><b>vwn:<b/> jvm route</li>
+     * <li><b>vwx:<b/> distance</li>
+     * <li><b>vwa:<b/> activation state</li>
+     * <li><b>vwr:<b/> redirect route</li>
+     * <li><b>vwd:<b/> cluster domain</li>
      * <li><b>ws:<b/> stopped deprecated 1.2.16</li>
      * <li><b>wd:<b/> disabled deprecated 1.2.16</li>
      * </ul>
@@ -401,63 +401,64 @@
         try {
             sb.append("?cmd=update&mime=txt");
             sb.append("&w=");
-            sb.append(URLEncoder.encode(worker, getCharset()));
 
             if (isLBMode) {
-                //http://localhost/jkstatus?cmd=update&mime=txt&w=lb&lf=false&ls=true
+                sb.append(URLEncoder.encode(worker, getCharset()));
+                //http://localhost/jkstatus?cmd=update&mime=txt&w=lb&vlf=false&vls=true
                 if ((lbRetries != null)) { // > 0
-                    sb.append("&lr=");
+                    sb.append("&vlr=");
                     sb.append(lbRetries);
                 }
                 if ((lbRecovertime != null)) { // > 59
-                    sb.append("&lt=");
+                    sb.append("&vlt=");
                     sb.append(lbRecovertime);
                 }
                 if ((lbStickySession != null)) {
-                    sb.append("&ls=");
+                    sb.append("&vls=");
                     sb.append(lbStickySession);
                 }
                 if ((lbForceSession != null)) {
-                    sb.append("&lf=");
+                    sb.append("&vlf=");
                     sb.append(lbForceSession);
                 }
             } else {
-                //http://localhost/status?cmd=update&mime=txt&w=node1&l=lb&wf=1&wd=false&ws=false
+                //http://localhost/status?cmd=update&mime=txt&sw=node1&w=lb&vwf=1&wd=false&ws=false
                 if (workerLb != null) { // must be configured
-                    sb.append("&l=");
                     sb.append(URLEncoder.encode(workerLb, getCharset()));
                 }
+                sb.append("&sw=");
+                sb.append(URLEncoder.encode(worker, getCharset()));
                 if (workerLoadFactor != null) { // >= 1
-                    sb.append("&wf=");
+                    sb.append("&vwf=");
                     sb.append(workerLoadFactor);
                 }
                 if (workerJvmRoute != null) {
-                    sb.append("&wn=");
+                    sb.append("&vwn=");
                     sb.append(URLEncoder.encode(workerJvmRoute, getCharset()));
                 } 
                 if (workerDisabled != null) {
-                    sb.append("&wd=");
+                    sb.append("&vwd=");
                     sb.append(workerDisabled);
                 }
                 if (workerStopped != null) {
-                    sb.append("&ws=");
+                    sb.append("&vws=");
                     sb.append(workerStopped);
                 }
-                if (workerActivation > 0 && workerActivation < 4) {
-                    sb.append("&wa=");
+                if (workerActivation >= 0 && workerActivation < 3) {
+                    sb.append("&vwa=");
                     sb.append(workerActivation);
                 } 
                 if (workerDistance >= 0) {
-                    sb.append("&wx=");
+                    sb.append("&vwx=");
                     sb.append(workerDistance);
                 }
                 if (workerRedirect != null) { // other worker conrecte lb's
-                    sb.append("&wr=");
+                    sb.append("&vwr=");
                     sb.append(URLEncoder.encode(workerRedirect,
                             getCharset()));
                 }
                 if (workerClusterDomain != null) {
-                    sb.append("&wc=");
+                    sb.append("&vwc=");
                     sb.append(URLEncoder.encode(workerClusterDomain,
                             getCharset()));
                 }

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -0,0 +1,15 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/antlib.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/antlib.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/antlib.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <antlib>
   <typedef
         name="updateworker"

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/jkstatus.tasks
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/jkstatus.tasks	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/jkstatus.tasks	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # Apache mod_jk jk status tasks
 jkUpdateWorker=org.apache.jk.status.JkStatusUpdateWorkerTask
 jkUpdateLoadbalancer=org.apache.jk.status.JkStatusUpdateLoadbalancerTask

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <mbeans-descriptors>
 
 <!--

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/package.html
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/src/share/org/apache/jk/status/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <body>
 
 <p>This package contains a set of <code>Task</code> implementations for

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/test/build.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/test/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/test/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!-- @author Peter Rossbach -->
 <project name="JkStatusTestcases" basedir="." default="test">
 	<property file="../../../../build/build.properties" />

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/test/conf/jkstatus.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/test/conf/jkstatus.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/test/conf/jkstatus.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <jk:status xmlns:jk="http://jakarta.apache.org">
   <jk:server name="localhost" port="80" software="Apache/2.0.54 (Win32) mod_ssl/2.0.54 OpenSSL/0.9.7g mod_jk/1.2.15" version="1.2.15" />
   <jk:balancers>

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/test/conf/log4j.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/test/conf/log4j.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/test/conf/log4j.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,11 +1,27 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <!-- ===================================================================== -->
 <!-- -->
 <!-- Log4j Configuration -->
 <!-- -->
 <!-- ===================================================================== -->
-<!-- $Id: log4j.xml 447115 2006-09-17 19:09:34Z pero $ -->
+<!-- $Id: log4j.xml 572120 2007-09-02 19:32:11Z markt $ -->
 <!--
 | For more configuration infromation and examples see the Jakarta Log4j
 | owebsite: http://jakarta.apache.org/log4j

Modified: trunk/tomcat5.5/connectors/jk/jkstatus/test/src/share/org/apache/jk/status/JkStatusParserTest.java
===================================================================
--- trunk/tomcat5.5/connectors/jk/jkstatus/test/src/share/org/apache/jk/status/JkStatusParserTest.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/jkstatus/test/src/share/org/apache/jk/status/JkStatusParserTest.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,18 +1,19 @@
-/*
- *  Copyright 1999-2004, 2006 The Apache Software Foundation
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
  *
- *  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
  *
- *      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.
+ * 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.jk.status;
 
 import java.io.IOException;

Deleted: trunk/tomcat5.5/connectors/jk/native/BUILDING
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/BUILDING	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/BUILDING	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,157 +0,0 @@
- 
-  Building from the subversion tree: (for developers only).
-  -----------------------------------
-  When using a subversion tree buildconf.sh must be run before configure.
-  The today version of buildconf.sh build the following files:
-  libtool files in scripts/build/unix (should copy them?).
-  Makefile.in from Makefile.am
-  aclocal.m4 from different m4 files located in the local machine.
-  configure from configure.in and aclocal.m4.
-  If you see error message from automake, don't care about them.
-
-
-  Building using configure
-  ------------------------
- 
-  It is possible to use autoconf for configuration and installation.
-  To create tomcat-connectors's autoconf script, you will need libtool
-  1.5.2 or higher, and autoconf 2.59 or newer.
-  Those tools will not be required if you are just
-  using a package downloaded from apache.org, they are only required for
-  developers.
- 
-  To configure tomcat-connectors run the following commands.
- 
-  ./buildconf.sh  (not required unless you are a developer)
-  ./configure [autoconf arguments] [tomcat-connectors arguments]
-  make
-
-  It is possible to set CFLAGS and LDFLAGS to add some platform specifics:
-  LDFLAGS=-lc \
-  ./configure -with-apxs=/home2/local/apache/bin/apxs
-
-  
-  Build for both Apache 1.3 and 2.0
-  ---------------------------------
-
-  If you want to build mod_jk for Apache 1.3 and 2.0, you should :
-
-  use configure and indicate Apache 1.3 apxs location (--with-apxs)
-  use make
-  copy the mod_jk binary to the apache modules location
-
-  make clean (to remove all previously compiled modules)
-  use configure and indicate Apache 2.0 apxs location,
-  then make.
-
-  ./configure --with-apxs=/usr/sbin/apxs
-  make
-  cp ./apache-1.3/mod_jk.so /usr/lib/apache
-  make clean
-  ./configure --with-apxs=/usr/sbin/apxs2
-  make 
-  cp ./apache-2.0/mod_jk.so /usr/lib/apache2
-   
-
-  Examples
-  --------
-
-  Apache2.0, JNI support:
-
-  ./configure --with-apxs=/opt/apache2/bin/apxs --with-java-home=${JAVA_HOME} --with-java-platform=2 -enable-jni
-
-  Apache 1.3, no JNI support:
-
-  ./configure --with-apxs=/usr/sbin/apxs 
-
-  tomcat-connectors arguments
-  -----------------------------------
-  JVM related parameters:
-  --with-java-home=DIR
-  DIR is the  patch to the JDK root directory. Something like: /opt/java/jdk12
-  --with-os-type[=SUBDIR] 
-  SUBDIR is the os-type subdirectory, normaly configure should guess it
-  correctly.
-  --with-arch-type[=SUBDIR]
-  SUBDIR is the arch subdirectory, normaly configure should guess it correctly. 
-  --with-java-platform=VAL
-  VAL is the Java platform 1 is 1.1.x and 2 is 1.2.x. It is guessed correctly.
-  
-  Apache related parameters:
-  --with-apxs[=FILE]
-  FILE is the location of the apxs tool. Default is finding apxs in PATH.
-  It builds a shared Apache module. It detects automaticly the Apache version.
-  (2.0 and 1.3)
-* --with-apache=DIR
-  DIR is the path where apache sources are located.
-  The apache sources should have been configured before configuring mod_jk.
-  DIR is something like: /home/apache/apache_1.3.19
-  It builds a static Apache module.
-  --enable-EAPI
-  This parameter is needed when using Apache-1.3 and mod_ssl, otherwise you
-  will get the error message: "this module might crash under EAPI!" when
-  loading libjk.so in httpd.
-
-  JNI support:
-  --enable-jni
-  Build the jni_connect.so and the JNI worker.
-
-* Static build need more tests, and we strongly recommand dynamic build
-  using DSO/APXS.
-
-
-  Installation
-  ------------
-
-  The mod_jk binary will be in :
-
-  ./apache-1.3/mod_jk.so if you select to build mod_jk for apache 1.3
-
-  ./apache-2.0/mod_jk.so if you select to build mod_jk for apache 2.0
-
-
-
-  Building for Netscape/iPlanet/SunONE WebServer
-  ----------------------------------------------
-  make clean (to remove all previously compiled modules)
-  use configure and indicate that you will be building the
-  netscape nsapi redirector, then make the redirector plugin:
-
-  ./configure --enable-netscape
-  cd netscape
-  make -f Makefile.solaris
-
-  This assumes that SUITSPOT_HOME is defined and points to
-  your SunONE install path (eg: /opt/SUNWwbsvr/plugins)
-  and that JAVA_HOME is defined (eg: /opt/SUNWwbsvr/bin/https/jdk).
-
-  Misc notes 
-  ----------
-
-  HP-UX build notes :
-
-  If you plan to use GCC on HP-UX to build mod_jk, be sure to 
-  have -DHPUX11GCC defined (usually by setting CLAGS before configure)
-
-  Reports are that the stripped down cc version that ships with
-  HP-UX won't be able to works, you should habe the HP add-on ANSI C 
-  Compiler package.
-
-  A good repository for HP-UX gnu tools is :
-
-  http://gatekeep.cs.utah.edu/
-
-
-  Solaris build notes :
-
-  the build should works with the GNU gcc compiler, on both
-  SPARC and x86 architecture systems.
-
-  A good repository for Solaris gnu tools is :
-
-  http://www.sunfreeware.com/
-
-  Be carefull when mixing native compiler and gnu compiler, and
-  ensure that apache and mod_jk will be compiled and linked with
-  the same tools (ie full Solaris or full GNU)
-

Added: trunk/tomcat5.5/connectors/jk/native/BUILDING.txt
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/BUILDING.txt	                        (rev 0)
+++ trunk/tomcat5.5/connectors/jk/native/BUILDING.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -0,0 +1,172 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+ 
+  Building from the subversion tree: (for developers only).
+  -----------------------------------
+  When using a subversion tree buildconf.sh must be run before configure.
+  The today version of buildconf.sh build the following files:
+  libtool files in scripts/build/unix (should copy them?).
+  Makefile.in from Makefile.am
+  aclocal.m4 from different m4 files located in the local machine.
+  configure from configure.in and aclocal.m4.
+  If you see error message from automake, don't care about them.
+
+
+  Building using configure
+  ------------------------
+ 
+  It is possible to use autoconf for configuration and installation.
+  To create tomcat-connectors's autoconf script, you will need libtool
+  1.5.2 or higher, and autoconf 2.59 or newer.
+  Those tools will not be required if you are just
+  using a package downloaded from apache.org, they are only required for
+  developers.
+ 
+  To configure tomcat-connectors run the following commands.
+ 
+  ./buildconf.sh  (not required unless you are a developer)
+  ./configure [autoconf arguments] [tomcat-connectors arguments]
+  make
+
+  It is possible to set CFLAGS and LDFLAGS to add some platform specifics:
+  LDFLAGS=-lc \
+  ./configure -with-apxs=/home2/local/apache/bin/apxs
+
+  
+  Build for both Apache 1.3 and 2.0
+  ---------------------------------
+
+  If you want to build mod_jk for Apache 1.3 and 2.0, you should :
+
+  use configure and indicate Apache 1.3 apxs location (--with-apxs)
+  use make
+  copy the mod_jk binary to the apache modules location
+
+  make clean (to remove all previously compiled modules)
+  use configure and indicate Apache 2.0 apxs location,
+  then make.
+
+  ./configure --with-apxs=/usr/sbin/apxs
+  make
+  cp ./apache-1.3/mod_jk.so /usr/lib/apache
+  make clean
+  ./configure --with-apxs=/usr/sbin/apxs2
+  make 
+  cp ./apache-2.0/mod_jk.so /usr/lib/apache2
+   
+
+  Examples
+  --------
+
+  Apache2.0, JNI support:
+
+  ./configure --with-apxs=/opt/apache2/bin/apxs --with-java-home=${JAVA_HOME} --with-java-platform=2 -enable-jni
+
+  Apache 1.3, no JNI support:
+
+  ./configure --with-apxs=/usr/sbin/apxs 
+
+  tomcat-connectors arguments
+  -----------------------------------
+  JVM related parameters:
+  --with-java-home=DIR
+  DIR is the  patch to the JDK root directory. Something like: /opt/java/jdk12
+  --with-os-type[=SUBDIR] 
+  SUBDIR is the os-type subdirectory, normaly configure should guess it
+  correctly.
+  --with-arch-type[=SUBDIR]
+  SUBDIR is the arch subdirectory, normaly configure should guess it correctly. 
+  --with-java-platform=VAL
+  VAL is the Java platform 1 is 1.1.x and 2 is 1.2.x. It is guessed correctly.
+  
+  Apache related parameters:
+  --with-apxs[=FILE]
+  FILE is the location of the apxs tool. Default is finding apxs in PATH.
+  It builds a shared Apache module. It detects automaticly the Apache version.
+  (2.0 and 1.3)
+* --with-apache=DIR
+  DIR is the path where apache sources are located.
+  The apache sources should have been configured before configuring mod_jk.
+  DIR is something like: /home/apache/apache_1.3.19
+  It builds a static Apache module.
+  --enable-EAPI
+  This parameter is needed when using Apache-1.3 and mod_ssl, otherwise you
+  will get the error message: "this module might crash under EAPI!" when
+  loading libjk.so in httpd.
+
+  JNI support:
+  --enable-jni
+  Build the jni_connect.so and the JNI worker.
+
+* Static build need more tests, and we strongly recommand dynamic build
+  using DSO/APXS.
+
+
+  Installation
+  ------------
+
+  The mod_jk binary will be in :
+
+  ./apache-1.3/mod_jk.so if you select to build mod_jk for apache 1.3
+
+  ./apache-2.0/mod_jk.so if you select to build mod_jk for apache 2.0
+
+
+
+  Building for Netscape/iPlanet/SunONE WebServer
+  ----------------------------------------------
+  make clean (to remove all previously compiled modules)
+  use configure and indicate that you will be building the
+  netscape nsapi redirector, then make the redirector plugin:
+
+  ./configure --enable-netscape
+  cd netscape
+  make -f Makefile.solaris
+
+  This assumes that SUITSPOT_HOME is defined and points to
+  your SunONE install path (eg: /opt/SUNWwbsvr/plugins)
+  and that JAVA_HOME is defined (eg: /opt/SUNWwbsvr/bin/https/jdk).
+
+  Misc notes 
+  ----------
+
+  HP-UX build notes :
+
+  If you plan to use GCC on HP-UX to build mod_jk, be sure to 
+  have -DHPUX11GCC defined (usually by setting CLAGS before configure)
+
+  Reports are that the stripped down cc version that ships with
+  HP-UX won't be able to works, you should habe the HP add-on ANSI C 
+  Compiler package.
+
+  A good repository for HP-UX gnu tools is :
+
+  http://gatekeep.cs.utah.edu/
+
+
+  Solaris build notes :
+
+  the build should works with the GNU gcc compiler, on both
+  SPARC and x86 architecture systems.
+
+  A good repository for Solaris gnu tools is :
+
+  http://www.sunfreeware.com/
+
+  Be carefull when mixing native compiler and gnu compiler, and
+  ensure that apache and mod_jk will be compiled and linked with
+  the same tools (ie full Solaris or full GNU)
+

Modified: trunk/tomcat5.5/connectors/jk/native/CHANGES.txt
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/CHANGES.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/CHANGES.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,20 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
 TOMCAT CONNECTORS (JK) CHANGELOG:           -*-text-*-
-Last modified at [$Date: 2006-06-28 17:56:49 -0600 (Wed, 28 Jun 2006) $]
+Last modified at [$Date: 2007-09-02 13:32:11 -0600 (Sun, 02 Sep 2007) $]
 PLEASE DON'T WRITE IN THIS FILE BUT IN ../xdocs/changelog.xml AND USE ../tools/jkrelease.sh
 TO BUILD THE TEXT VERSION.
 

Modified: trunk/tomcat5.5/connectors/jk/native/Makefile.am
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/Makefile.am	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/Makefile.am	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+#
 # Tell automake what it should do
 AUTOMAKE_OPTIONS = foreign
 MAINTAINERCLEANFILES=config.cache config.status config.log \

Deleted: trunk/tomcat5.5/connectors/jk/native/README
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/README	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/README	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,30 +0,0 @@
-README for tomcat-connector
-
-$Id: README 417906 2006-06-28 23:56:49Z rjung $
-
-Please see doc/mod_jk-howto.html for more verbose instructions
-
-* What is tomcat-connector ?
-
-tomcat-connector is a new project to release web-servers connector
-for the Tomcat servlet engine.
-
-This project didn't start from null since it reuse the latest code from
-mod_jk for the native parts and tomcat 3.3 for the java side of the 
-force.
-
-From mod_jk we gain :
-
-* A connector (plugin) for many Web Server, including
-  Apache HTTP Server, Netscape/IPLanet NES and Microsoft IIS
-  It also support JNI (and seems to used at least by IBM under 
-  AS/400 for Apache/WebSphere connectivity).
-  
-* Fault-tolerance and load-balancing. mod_jk use the concept of 
-  workers which handle a particular request, and a special worker
-  , the lb worker, is a group (cluster ?) of physical workers.
-
-* Direct access to Tomcat 3.2/3.3/4.0/4.1 servlet engine via ajp13
-  protocol. 
-
-* OK, then how do I build web-connector ? Just take a look at BUILDING

Added: trunk/tomcat5.5/connectors/jk/native/README.txt
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/README.txt	                        (rev 0)
+++ trunk/tomcat5.5/connectors/jk/native/README.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -0,0 +1,45 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+README for tomcat-connector
+
+$Id: README.txt 572120 2007-09-02 19:32:11Z markt $
+
+Please see doc/mod_jk-howto.html for more verbose instructions
+
+* What is tomcat-connector ?
+
+tomcat-connector is a new project to release web-servers connector
+for the Tomcat servlet engine.
+
+This project didn't start from null since it reuse the latest code from
+mod_jk for the native parts and tomcat 3.3 for the java side of the 
+force.
+
+From mod_jk we gain :
+
+* A connector (plugin) for many Web Server, including
+  Apache HTTP Server, Netscape/IPLanet NES and Microsoft IIS
+  It also support JNI (and seems to used at least by IBM under 
+  AS/400 for Apache/WebSphere connectivity).
+  
+* Fault-tolerance and load-balancing. mod_jk use the concept of 
+  workers which handle a particular request, and a special worker
+  , the lb worker, is a group (cluster ?) of physical workers.
+
+* Direct access to Tomcat 3.2/3.3/4.0/4.1 servlet engine via ajp13
+  protocol. 
+
+* OK, then how do I build web-connector ? Just take a look at BUILDING.txt

Modified: trunk/tomcat5.5/connectors/jk/native/STATUS.txt
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/STATUS.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/STATUS.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,8 +1,25 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
 TOMCAT CONNECTORS (JK) STATUS:			-*-text-*-
-Last modified at [$Date: 2007-08-07 02:41:26 -0600 (Tue, 07 Aug 2007) $]
+Last modified at [$Date: 2007-12-21 12:07:51 -0700 (Fri, 21 Dec 2007) $]
 
 Release:
 
+    1.2.27  : in development
+    1.2.26  : released December 21, 2007
     1.2.25  : released August 7, 2007
     1.2.24  : released July 27, 2007, withdrawn August 2, 2007
     1.2.23  : released May 18, 2007

Deleted: trunk/tomcat5.5/connectors/jk/native/TODO
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/TODO	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/TODO	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,221 +0,0 @@
-TODO for tomcat-connectors
-
-$Id: TODO 417587 2006-06-27 21:05:40Z rjung $
-
-1) Optimize "distance"
-======================
-
-Sorting the list of balanced workers by distance would be nice, but:
-How to combine the sorting with the offset implementation (especially
-useful for strategy BUSYNESS under low load).
-
-2) Reduce number of string comparisons in most_suitable
-========================================================
-
-a) redirect/domains
-
-It would be easy to improve the redirect string b an integer, giving the
-index of the worker in the lb. Then lb would not need to search for the redirect worker.
-
-The same way, one could add a list with indizes to workers in the same domain.
-Whenever domain names are managed (init and status worker update) one would
-scan the worker list and update the index list.
-
-Finally one could have a list of workers, whose domain is the same as the redirect
-attribute of the worker, because that's also something we consider.
-
-What I'm not sure about, even in the existing code, is the locking between updates
-by the status worker and the process local information about the workers,
-especially in the case, when status updates a redirect or domain attribute.
-
-I would like to keep these attributes and the new index arrays process local,
-and the processes should find out about changes made by status to shm (redirect/domain)
-and then rebuild their data. No need to get these on every request from the shm,
-only the check for up-to-date should be made.
-
-b) exact matches for jvmRoutes
-
-Could we use hashes instead of string comparisons all the time?
-I'm not sure, if a good enough hash takes longer than a string comparison though.
-
-3) Optimization of JK_WORKER_USABLE
-====================================
-
-We use that one quite a lot. Since it is now a combination of four
-ANDs of negated values, we could also do
-
-#define JK_WORKER_USABLE(w)   (!((w)->in_error_state || ($w)->is_stopped || (w)->is_disabled || (w)->is_busy))
-
-I think it we should consider combining the flags into an additional
-is_usable (makes checks easier, but of course we would have to set it
-every time we change one of the four other flags). But in terms of
-performance that happens rarely.
-
-4) Code separation between factory, validate and init in lb
-============================================================
-
-The factory contains:
-
-        private_data->worker.retries = JK_RETRIES;
-        private_data->s->recover_wait_time = WAIT_BEFORE_RECOVER;
-
-I think, this should move to validate() or init().
-It might even be obsolete, because in init, we already have:
-
-    pThis->retries = jk_get_worker_retries(props, p->s->name,
-    p->s->retries = pThis->retries;
-    p->s->recover_wait_time = jk_get_worker_recover_timeout(props, p->s->name, WAIT_BEFORE_RECOVER);
-    if (p->s->recover_wait_time < WAIT_BEFORE_RECOVER)
-        p->s->recover_wait_time = WAIT_BEFORE_RECOVER;
-
-Then: In validate there is
-
-                p->lb_workers[i].s->error_time = 0;
-
-So shouldn't there also be
-
-                p->lb_workers[i].s->maintain_time = time(NULL);
-
-5) Refactor Logging
-====================
-
-a) Use the same code files for the request logging functions in Apache 1.3 and 2.0.
-
-b) Use the same code files for piped logging in Apache 1.3 and 2.0.
-
-6) ajpget
-==========
-
-Combine ajplib and Apache ab to an ajp13 commandline client ajpget.
-
-7) Manage lb method and locking via jk_status
-=============================================
-
-It's not yet contained in the shm.
-
-8) Parsing workers.properties
-=============================
-
-Parsing of workers.properties aditionally to just looking up attributes
-would help users to detect syntax errors in the file. At the moment
-no information will be logged, e.g. when attributes contain typos.
-
-9) Persisting workers.properties
-================================
-
-Make workers.properties persist from inside status worker.
-
-10) Reduce number of uses of time(NULL)
-=======================================
-
-We use time(NULL) a lot. Since it only has resolution of a second,
-I'm asking myself, if we could update the actual time in only a few
-places and get time out of some variables when needed. The same does
-not hold true for millisecond time, but in several cases we use the time,
-it's not very critical, that it is exact. These cases are related to:
-
-Some of this is already been done, the remaining parts are:
-
-- last_access for usage against timeout value that is ~minutes
-- error_time for usage against retry timeout that is ~minutes
-- uri_worker_map checked for usage against JK_URIMAP_RELOAD=1 minute
-
-So I think, it would suffice to set an actual time at the beginning of
-the request/response cycle (used by everything before the request is being
-sent over the socket) and maybe after the response shows up/ an error occurs
-(for everything else, if there is).
-
-For which cases would it be OK, to use the time before sending to TC:
-- uri_worker_map "checked" (uri map lookup starts early)
-- setting/testing last_access in
-  - jk_ajp_common.c:ajp_connect_to_endpoint()
-  - jk_ajp_common.c:ajp_get_endpoint()
-  - jk_ajp_common.c:ajp_maintain()
-
-What about the others:
-- setting last_access in init should use the actual time in
-  jk_ajp_common.c:ajp_create_endpoint_cache()
-
-- setting last_access again after the service could also use the 
-  actual time in jk_ajp_common.c:ajp_done()
-- setting error_time should better use the actual time
-  jk_lb_worker.c service(): rec->s->error_time = time(NULL);
-
-The last two cases could again use the same time, which then would be needed
-to be generated at the end or directly after service.
-
-11) Access/Modification Time in shm
-===================================
-
-a) [Discussion] What will this generally be used for? At the moment,
-only jk_status "uses" it, but it only sets the values, it never asks for them.
-
-b) [Improvement, minor] jk_shm_set_workers_time() implicitly calls
-jk_shm_sync_access_time(), but jk_status does:
-
-            jk_shm_set_workers_time(time(NULL));
-            /* Since we updated the config no need to reload
-             * on the next request
-             */
-            jk_shm_sync_access_time();
-
-two times. So depending on the idea of the functionality of these calls,
-either set_workers_time and sync_access_time should be independently,
-or the second call in jk_status coulkd be removed.
-
-12) "Destroy" functionality
-===========================
-
-[Hint] Destroy on a worker never seems to free shm,
-but I think that was already a flaw without shm.
-
-13) Locks against shm
-=====================
-
-It might be an intersting experiment to implement an improved locking structure.
-It looks like one would need in fact different types of locks.
-In shm we have as read/write information:
-
-Changed only by status worker:
-- redirect, domain, lb_factor, sticky_session, sticky_session_force,
-  recover_wait_time, retries, status (is_disabled, is_stopped).
-
-These changes need some kind of reconfiguration in the threads after
-change and before the next request/response. Since changes are rare,
-here we would be better of, with a simple detect change and copy from
-shm to process procedure. status updates the data in shm and after that
-the time stamp on the shh. Each process checks the time stamp before
-doing a request, and when the time stamp changed it does a writer CS
-lock and updates it's local copy. All threads always do a reader CS
-lock when doing a request/response cycle. Reader CS locks are concurrent,
-writers are exclusive. So readers are not allowed, when the config data is being updated.
-
-Changed by the threads themselves (and via reset by the status worker):
-- counters needed by routing decisions (lb_value, readed, transferred, busy)
-- timers needed by maintenance functions (error_time, servic_time/maintain_time)
-- status is_busy, in_error_state
-- uncritical data with no influence on routing decisions (max_busy, elected, errors,
-  in_recovering)
-
-Here again we could improve by using reader/writer locks. I have a
-tendency for the PESSIMISTIC side of locking, but I think we could
-shrink the code blocks that should be locked. At the monent they are
-pretty big (most of get_most_suitable_worker).
-
-Read-only: name and id.
-
-By the way: at several places we don't check for errors on getting the lock.
-
-14) What I didn't yet check
-===========================
-
-a) Correctness of is_busy handling
-
-b) Correctness of the reset values after reset by status worker
-
-c) What would be the exact behaviour, if shm does not work (memory case).
-   Will this be a critical failure, or will we only experience a
-   degradation in routing decisions.
-
-d) How complete is mod_proxy_ajp/mod_proxy_balancer.
-   Port changes from mod_jk to them.

Added: trunk/tomcat5.5/connectors/jk/native/TODO.txt
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/TODO.txt	                        (rev 0)
+++ trunk/tomcat5.5/connectors/jk/native/TODO.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -0,0 +1,236 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+TODO for tomcat-connectors
+
+$Id: TODO.txt 572120 2007-09-02 19:32:11Z markt $
+
+1) Optimize "distance"
+======================
+
+Sorting the list of balanced workers by distance would be nice, but:
+How to combine the sorting with the offset implementation (especially
+useful for strategy BUSYNESS under low load).
+
+2) Reduce number of string comparisons in most_suitable
+========================================================
+
+a) redirect/domains
+
+It would be easy to improve the redirect string b an integer, giving the
+index of the worker in the lb. Then lb would not need to search for the redirect worker.
+
+The same way, one could add a list with indizes to workers in the same domain.
+Whenever domain names are managed (init and status worker update) one would
+scan the worker list and update the index list.
+
+Finally one could have a list of workers, whose domain is the same as the redirect
+attribute of the worker, because that's also something we consider.
+
+What I'm not sure about, even in the existing code, is the locking between updates
+by the status worker and the process local information about the workers,
+especially in the case, when status updates a redirect or domain attribute.
+
+I would like to keep these attributes and the new index arrays process local,
+and the processes should find out about changes made by status to shm (redirect/domain)
+and then rebuild their data. No need to get these on every request from the shm,
+only the check for up-to-date should be made.
+
+b) exact matches for jvmRoutes
+
+Could we use hashes instead of string comparisons all the time?
+I'm not sure, if a good enough hash takes longer than a string comparison though.
+
+3) Optimization of JK_WORKER_USABLE
+====================================
+
+We use that one quite a lot. Since it is now a combination of four
+ANDs of negated values, we could also do
+
+#define JK_WORKER_USABLE(w)   (!((w)->in_error_state || ($w)->is_stopped || (w)->is_disabled || (w)->is_busy))
+
+I think it we should consider combining the flags into an additional
+is_usable (makes checks easier, but of course we would have to set it
+every time we change one of the four other flags). But in terms of
+performance that happens rarely.
+
+4) Code separation between factory, validate and init in lb
+============================================================
+
+The factory contains:
+
+        private_data->worker.retries = JK_RETRIES;
+        private_data->s->recover_wait_time = WAIT_BEFORE_RECOVER;
+
+I think, this should move to validate() or init().
+It might even be obsolete, because in init, we already have:
+
+    pThis->retries = jk_get_worker_retries(props, p->s->name,
+    p->s->retries = pThis->retries;
+    p->s->recover_wait_time = jk_get_worker_recover_timeout(props, p->s->name, WAIT_BEFORE_RECOVER);
+    if (p->s->recover_wait_time < WAIT_BEFORE_RECOVER)
+        p->s->recover_wait_time = WAIT_BEFORE_RECOVER;
+
+Then: In validate there is
+
+                p->lb_workers[i].s->error_time = 0;
+
+So shouldn't there also be
+
+                p->lb_workers[i].s->maintain_time = time(NULL);
+
+5) Refactor Logging
+====================
+
+a) Use the same code files for the request logging functions in Apache 1.3 and 2.0.
+
+b) Use the same code files for piped logging in Apache 1.3 and 2.0.
+
+6) ajpget
+==========
+
+Combine ajplib and Apache ab to an ajp13 commandline client ajpget.
+
+7) Manage lb method and locking via jk_status
+=============================================
+
+It's not yet contained in the shm.
+
+8) Parsing workers.properties
+=============================
+
+Parsing of workers.properties aditionally to just looking up attributes
+would help users to detect syntax errors in the file. At the moment
+no information will be logged, e.g. when attributes contain typos.
+
+9) Persisting workers.properties
+================================
+
+Make workers.properties persist from inside status worker.
+
+10) Reduce number of uses of time(NULL)
+=======================================
+
+We use time(NULL) a lot. Since it only has resolution of a second,
+I'm asking myself, if we could update the actual time in only a few
+places and get time out of some variables when needed. The same does
+not hold true for millisecond time, but in several cases we use the time,
+it's not very critical, that it is exact. These cases are related to:
+
+Some of this is already been done, the remaining parts are:
+
+- last_access for usage against timeout value that is ~minutes
+- error_time for usage against retry timeout that is ~minutes
+- uri_worker_map checked for usage against JK_URIMAP_RELOAD=1 minute
+
+So I think, it would suffice to set an actual time at the beginning of
+the request/response cycle (used by everything before the request is being
+sent over the socket) and maybe after the response shows up/ an error occurs
+(for everything else, if there is).
+
+For which cases would it be OK, to use the time before sending to TC:
+- uri_worker_map "checked" (uri map lookup starts early)
+- setting/testing last_access in
+  - jk_ajp_common.c:ajp_connect_to_endpoint()
+  - jk_ajp_common.c:ajp_get_endpoint()
+  - jk_ajp_common.c:ajp_maintain()
+
+What about the others:
+- setting last_access in init should use the actual time in
+  jk_ajp_common.c:ajp_create_endpoint_cache()
+
+- setting last_access again after the service could also use the 
+  actual time in jk_ajp_common.c:ajp_done()
+- setting error_time should better use the actual time
+  jk_lb_worker.c service(): rec->s->error_time = time(NULL);
+
+The last two cases could again use the same time, which then would be needed
+to be generated at the end or directly after service.
+
+11) Access/Modification Time in shm
+===================================
+
+a) [Discussion] What will this generally be used for? At the moment,
+only jk_status "uses" it, but it only sets the values, it never asks for them.
+
+b) [Improvement, minor] jk_shm_set_workers_time() implicitly calls
+jk_shm_sync_access_time(), but jk_status does:
+
+            jk_shm_set_workers_time(time(NULL));
+            /* Since we updated the config no need to reload
+             * on the next request
+             */
+            jk_shm_sync_access_time();
+
+two times. So depending on the idea of the functionality of these calls,
+either set_workers_time and sync_access_time should be independently,
+or the second call in jk_status coulkd be removed.
+
+12) "Destroy" functionality
+===========================
+
+[Hint] Destroy on a worker never seems to free shm,
+but I think that was already a flaw without shm.
+
+13) Locks against shm
+=====================
+
+It might be an intersting experiment to implement an improved locking structure.
+It looks like one would need in fact different types of locks.
+In shm we have as read/write information:
+
+Changed only by status worker:
+- redirect, domain, lb_factor, sticky_session, sticky_session_force,
+  recover_wait_time, retries, status (is_disabled, is_stopped).
+
+These changes need some kind of reconfiguration in the threads after
+change and before the next request/response. Since changes are rare,
+here we would be better of, with a simple detect change and copy from
+shm to process procedure. status updates the data in shm and after that
+the time stamp on the shh. Each process checks the time stamp before
+doing a request, and when the time stamp changed it does a writer CS
+lock and updates it's local copy. All threads always do a reader CS
+lock when doing a request/response cycle. Reader CS locks are concurrent,
+writers are exclusive. So readers are not allowed, when the config data is being updated.
+
+Changed by the threads themselves (and via reset by the status worker):
+- counters needed by routing decisions (lb_value, readed, transferred, busy)
+- timers needed by maintenance functions (error_time, servic_time/maintain_time)
+- status is_busy, in_error_state
+- uncritical data with no influence on routing decisions (max_busy, elected, errors,
+  in_recovering)
+
+Here again we could improve by using reader/writer locks. I have a
+tendency for the PESSIMISTIC side of locking, but I think we could
+shrink the code blocks that should be locked. At the monent they are
+pretty big (most of get_most_suitable_worker).
+
+Read-only: name and id.
+
+By the way: at several places we don't check for errors on getting the lock.
+
+14) What I didn't yet check
+===========================
+
+a) Correctness of is_busy handling
+
+b) Correctness of the reset values after reset by status worker
+
+c) What would be the exact behaviour, if shm does not work (memory case).
+   Will this be a critical failure, or will we only experience a
+   degradation in routing decisions.
+
+d) How complete is mod_proxy_ajp/mod_proxy_balancer.
+   Port changes from mod_jk to them.

Modified: trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.apxs.in
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.apxs.in	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.apxs.in	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 ## configure should make the Makefile out of this file.
 
 APXS=@APXS@

Modified: trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.in
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.in	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.in	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+
 ## configure should make the Makefile out of this file.
 
 srcdir=@srcdir@

Modified: trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.netware
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.netware	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.netware	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,21 @@
 #
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+#
 # Makefile for mod_jk (NetWare version - gnu make)
 # created by Guenter Knauf <fuankg at apache.org>
 #
@@ -20,7 +37,6 @@
 # Edit the vars below to change NLM target settings.
 TARGET	= mod_jk
 VERSION	= $(JK_VERSION)
-#COPYR	= Copyright (c) 2000-2007 The Apache Software Foundation. All rights reserved.
 COPYR	= Licensed under the Apache License, Version 2.0
 DESCR	= Apache $(AP_VERSION_STR) plugin for Tomcat $(JK_VERSION_STR)
 MTSAFE	= NO

Modified: trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.tmpl
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.tmpl	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/apache-1.3/Makefile.tmpl	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 ##
 ## Apache 1.3 Makefile template for mod_jk
 ##

Modified: trunk/tomcat5.5/connectors/jk/native/apache-1.3/NWGNUmakefile
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/apache-1.3/NWGNUmakefile	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/apache-1.3/NWGNUmakefile	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,21 @@
 #
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+#
 # Declare the sub-directories to be built here
 #
 

Modified: trunk/tomcat5.5/connectors/jk/native/apache-1.3/NWGNUmakefile.mak
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/apache-1.3/NWGNUmakefile.mak	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/apache-1.3/NWGNUmakefile.mak	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,21 @@
 #
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+#
 # Makefile for mod_jk (NetWare version - gnu make)
 # created by Guenter Knauf <fuankg at apache.org>
 #

Modified: trunk/tomcat5.5/connectors/jk/native/apache-1.3/mod_jk.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/apache-1.3/mod_jk.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/apache-1.3/mod_jk.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -16,12 +16,12 @@
  */
 
 /***************************************************************************
- * Description: Apache 1.3 plugin for Tomcat                                *
+ * Description: Apache 1.3 plugin for Tomcat                               *
  *              See ../common/jk_service.h for general mod_jk info         *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
  *              Dan Milstein <danmil at shore.net>                            *
  *              Henri Gomez <hgomez at apache.org>                            *
- * Version:     $Revision: 562090 $                                          *
+ * Version:     $Revision: 613833 $                                        *
  ***************************************************************************/
 
 /*
@@ -70,6 +70,7 @@
 #define JK_ENV_SESSION              ("SSL_SESSION_ID")
 #define JK_ENV_KEY_SIZE             ("SSL_CIPHER_USEKEYSIZE")
 #define JK_ENV_CERTCHAIN_PREFIX     ("SSL_CLIENT_CERT_CHAIN_")
+#define JK_ENV_REPLY_TIMEOUT        ("JK_REPLY_TIMEOUT")
 #define JK_ENV_WORKER_NAME          ("JK_WORKER_NAME")
 #define JK_NOTE_WORKER_NAME         ("JK_WORKER_NAME")
 #define JK_NOTE_WORKER_TYPE         ("JK_WORKER_TYPE")
@@ -128,20 +129,18 @@
     jk_logger_t *log;
 
     /*
-     * Worker stuff
+     * Mount stuff
      */
-    jk_map_t *worker_properties;
-    char *worker_file;
     char *mount_file;
     int mount_file_reload;
     jk_map_t *uri_to_context;
 
     int mountcopy;
-    char *secret_key;
-    jk_map_t *automount;
 
     jk_uri_worker_map_t *uw_map;
 
+    int was_initialized;
+
     /*
      * Automatic context path apache alias
      */
@@ -158,7 +157,7 @@
     /*
      * Setting target worker via environment
      */
-   char *worker_indicator;
+    char *worker_indicator;
 
     /*
      * SSL Support
@@ -181,7 +180,7 @@
     /*
      * Environment variables support
      */
-    int envvars_in_use;
+    int envvars_has_own;
     table *envvars;
     table *envvars_def;
     array_header *envvar_items;
@@ -204,9 +203,6 @@
      */
     jk_pool_t p;
 
-    /* True iff response headers have been returned to client */
-    int response_started;
-
     /* True iff request body data has been read from Apache */
     int read_body_started;
 
@@ -220,11 +216,18 @@
     array_header *index_names;
 } dir_config_rec;
 
+static server_rec *main_server = NULL;
 static jk_logger_t *main_log = NULL;
 static table *jk_log_fds = NULL;
 static jk_worker_env_t worker_env;
 static char *jk_shm_file = NULL;
-static size_t jk_shm_size = JK_SHM_DEF_SIZE;
+static size_t jk_shm_size = 0;
+/*
+ * Worker stuff
+*/
+static jk_map_t *jk_worker_properties = NULL;
+static char *jk_worker_file = NULL;
+static int jk_mount_copy_all = JK_FALSE;
 
 static int JK_METHOD ws_start_response(jk_ws_service_t *s,
                                        int status,
@@ -243,6 +246,12 @@
                                        const char *const *log_values,
                                        unsigned num_of_log_items);
 
+static void * JK_METHOD ws_next_vhost(void *d);
+
+static void JK_METHOD ws_vhost_to_text(void *d, char *buf, size_t len);
+
+static jk_uri_worker_map_t * JK_METHOD ws_vhost_to_uw_map(void *d);
+
 /* srevilak - new function prototypes */
 static void jk_server_cleanup(void *data);
 static void jk_generic_cleanup(server_rec * s);
@@ -314,7 +323,7 @@
         }
 
         ap_send_http_header(r);
-        p->response_started = JK_TRUE;
+        s->response_started = JK_TRUE;
 
         return JK_TRUE;
     }
@@ -387,7 +396,7 @@
             int w = (int)len;
             int r = 0;
 
-            if (!p->response_started) {
+            if (!s->response_started) {
                 if (main_log)
                     jk_log(main_log, JK_LOG_INFO,
                            "Write without start, starting with defaults");
@@ -449,6 +458,78 @@
     }
 }
 
+static void * JK_METHOD ws_next_vhost(void *d)
+{
+    server_rec *s = (server_rec *)d;
+    if (s == NULL)
+        return main_server;
+    return s->next;
+}
+
+static void JK_METHOD ws_vhost_to_text(void *d, char *buf, size_t len)
+{
+    server_rec *s = (server_rec *)d;
+    size_t used = 0;
+
+    if (s->server_hostname)
+        used += strlen(s->server_hostname);
+    if (!s->is_virtual) {
+        if (s->port)
+            used += strlen(":XXXXX");
+    }
+    else if (s->addrs) {
+        used += strlen(" [");
+        if (s->addrs->virthost)
+            used += strlen(s->addrs->virthost);
+        if (s->addrs->host_port)
+            used += strlen(":XXXXX");
+        used += strlen("]");
+    }
+
+    if (len < used && len > strlen("XXX")) {
+        strcpy(buf, "XXX");
+        return;
+    }
+
+    used = 0;
+
+    if (s->server_hostname) {
+        strcpy(buf + used, s->server_hostname);
+        used += strlen(s->server_hostname);
+    }
+    if (!s->is_virtual) {
+        if (s->port) {
+            sprintf(buf + used, ":%hu", s->port);
+            used = strlen(buf);
+        }
+    }
+    else if (s->addrs) {
+        strcpy(buf + used, " [");
+        used += strlen(" [");
+        if (s->addrs->virthost) {
+            strcpy(buf + used, s->addrs->virthost);
+            used += strlen(s->addrs->virthost);
+        }
+        if (s->addrs->host_port) {
+            sprintf(buf + used, ":%hu", s->addrs->host_port);
+            used = strlen(buf);
+        }
+        strcpy(buf + used, "]");
+        used += strlen("]");
+    }
+}
+
+static jk_uri_worker_map_t * JK_METHOD ws_vhost_to_uw_map(void *d)
+{
+    server_rec *s = (server_rec *)d;
+    jk_server_conf_t *conf = NULL;
+    if (s == NULL)
+        return NULL;
+    conf = (jk_server_conf_t *) ap_get_module_config(s->module_config,
+                                                     &jk_module);
+    return conf->uw_map;
+}
+
 /* ====================================================================== */
 /* Utility functions                                                      */
 /* ====================================================================== */
@@ -462,10 +543,20 @@
 {
     va_list ap;
     char *res;
+    char *ch;
 
     va_start(ap, fmt);
     res = ap_pvsprintf(p, fmt, ap);
     va_end(ap);
+    /* Replace all format characters in the resulting message */
+    /* because we feed the message to ap_log_error(). */
+    ch = res;
+    while (*ch) {
+        if (*ch == '%') {
+            *ch = '#';
+        }
+        ch++;
+    }
 
     ap_log_error(file, line, level, s, res);
     if ( s ) {
@@ -520,7 +611,8 @@
     int size;
     request_rec *r = private_data->r;
     char *ssl_temp = NULL;
-    s->route = NULL;        /* Used for sticky session routing */
+    const char *reply_timeout = NULL;
+    rule_extension_t *e;
 
     /* Copy in function pointers (which are really methods) */
     s->start_response = ws_start_response;
@@ -528,10 +620,10 @@
     s->write = ws_write;
     s->flush = ws_flush;
     s->add_log_items = ws_add_log_items;
+    s->next_vhost = ws_next_vhost;
+    s->vhost_to_text = ws_vhost_to_text;
+    s->vhost_to_uw_map = ws_vhost_to_uw_map;
 
-    /* Clear RECO status */
-    s->reco_status = RECO_NONE;
-
     s->auth_type = NULL_FOR_EMPTY(r->connection->ap_auth_type);
     s->remote_user = NULL_FOR_EMPTY(r->connection->user);
 
@@ -548,17 +640,31 @@
 
     if (conf->options & JK_OPT_FLUSHPACKETS)
         s->flush_packets = 1;
-    else
-        s->flush_packets = 0;
     if (conf->options & JK_OPT_FLUSHEADER)
         s->flush_header = 1;
-    else
-        s->flush_header = 0;
 
+    e = (rule_extension_t *)ap_get_module_config(r->request_config, &jk_module);
+    if (e) {
+        s->extension.reply_timeout = e->reply_timeout;
+        if (e->activation) {
+            s->extension.activation = ap_palloc(r->pool, e->activation_size * sizeof(int));
+            memcpy(s->extension.activation, e->activation, e->activation_size * sizeof(int));
+        }
+        if (e->fail_on_status_size > 0) {
+            s->extension.fail_on_status_size = e->fail_on_status_size;
+            s->extension.fail_on_status = ap_palloc(r->pool, e->fail_on_status_size * sizeof(int));
+            memcpy(s->extension.fail_on_status, e->fail_on_status, e->fail_on_status_size * sizeof(int));
+        }
+    }
+    reply_timeout = ap_table_get(r->subprocess_env, "JK_REPLY_TIMEOUT");
+    if (reply_timeout) {
+        int r = atoi(reply_timeout);
+        if (r >= 0)
+            s->extension.reply_timeout = r;
+    }
+
     if (conf->options & JK_OPT_DISABLEREUSE)
         s->disable_reuse = 1;
-    else
-        s->disable_reuse = 0;
 
     /* get server name */
     /* s->server_name  = (char *)(r->hostname ? r->hostname : r->server->server_hostname); */
@@ -625,14 +731,7 @@
         return JK_FALSE;
     }
 
-    s->is_ssl = JK_FALSE;
-    s->ssl_cert = NULL;
-    s->ssl_cert_len = 0;
-    s->ssl_cipher = NULL;       /* required by Servlet 2.3 Api, allready in original ajp13 */
-    s->ssl_session = NULL;
-    s->ssl_key_size = -1;       /* required by Servlet 2.3 Api, added in jtc */
-
-    if (conf->ssl_enable || conf->envvars_in_use) {
+    if (conf->ssl_enable || conf->envvars) {
         ap_add_common_vars(r);
 
         if (conf->ssl_enable) {
@@ -692,7 +791,7 @@
             }
         }
 
-        if (conf->envvars_in_use) {
+        if (conf->envvars) {
             const array_header *t = conf->envvar_items;
             if (t && t->nelts) {
                 int i;
@@ -724,9 +823,6 @@
         }
     }
 
-    s->headers_names = NULL;
-    s->headers_values = NULL;
-    s->num_headers = 0;
     if (r->headers_in && ap_table_elts(r->headers_in)) {
         int need_content_length_header = (!s->is_chunked
                                           && s->content_length ==
@@ -811,19 +907,26 @@
 /*
  * JkMountCopy directive handling
  *
- * JkMountCopy On/Off
+ * JkMountCopy On/Off/All
  */
 
-static const char *jk_set_mountcopy(cmd_parms * cmd, void *dummy, int flag)
+static const char *jk_set_mountcopy(cmd_parms * cmd,
+                                    void *dummy, char *mount_copy)
 {
     server_rec *s = cmd->server;
     jk_server_conf_t *conf =
         (jk_server_conf_t *) ap_get_module_config(s->module_config,
                                                   &jk_module);
+    if (! strcasecmp(mount_copy, "all")) {
+        jk_mount_copy_all = JK_TRUE;
+    }
+    else if (strcasecmp(mount_copy, "on") && strcasecmp(mount_copy, "off")) {
+        return "JkMountCopy must be All, On or Off";
+    }
+    else {
+        conf->mountcopy = strcasecmp(mount_copy, "off") ? JK_TRUE : JK_FALSE;
+    }
 
-    /* Set up our value */
-    conf->mountcopy = flag ? JK_TRUE : JK_FALSE;
-
     return NULL;
 }
 
@@ -862,6 +965,11 @@
     if (c[0] != '/')
         return "JkMount context should start with /";
 
+    if (!conf->uri_to_context) {
+        if (!jk_map_alloc(&(conf->uri_to_context))) {
+            return "JkMount Memory error";
+        }
+    }
     /*
      * Add the new worker to the alias map.
      */
@@ -904,6 +1012,12 @@
     if (c[0] != '/')
         return "JkUnMount context should start with /";
     uri = ap_pstrcat(cmd->temp_pool, "!", c, NULL);
+
+    if (!conf->uri_to_context) {
+        if (!jk_map_alloc(&(conf->uri_to_context))) {
+            return "JkUnMount Memory error";
+        }
+    }
     /*
      * Add the new worker to the alias map.
      */
@@ -912,28 +1026,6 @@
 }
 
 /*
- * JkAutoMount directive handling
- *
- * JkAutoMount worker [virtualhost]
- */
-
-static const char *jk_automount_context(cmd_parms * cmd,
-                                        void *dummy,
-                                        char *worker, char *virtualhost)
-{
-    server_rec *s = cmd->server;
-    jk_server_conf_t *conf =
-        (jk_server_conf_t *) ap_get_module_config(s->module_config,
-                                                  &jk_module);
-
-    /*
-     * Add the new automount to the auto map.
-     */
-    jk_map_put(conf->automount, worker, virtualhost, NULL);
-    return NULL;
-}
-
-/*
  * JkWorkersFile Directive Handling
  *
  * JkWorkersFile file
@@ -942,27 +1034,25 @@
 static const char *jk_set_worker_file(cmd_parms * cmd,
                                       void *dummy, char *worker_file)
 {
-    server_rec *s = cmd->server;
     struct stat statbuf;
 
-    jk_server_conf_t *conf =
-        (jk_server_conf_t *) ap_get_module_config(s->module_config,
-                                                  &jk_module);
+    if (jk_worker_file != NULL)
+        return "JkWorkersFile only allowed once";
 
     /* we need an absolute path */
-    conf->worker_file = ap_server_root_relative(cmd->pool, worker_file);
+    jk_worker_file = ap_server_root_relative(cmd->pool, worker_file);
 
 #ifdef CHROOTED_APACHE
-    ap_server_strip_chroot(conf->worker_file, 0);
+    ap_server_strip_chroot(jk_worker_file, 0);
 #endif
 
-    if (conf->worker_file == worker_file)
-        conf->worker_file = ap_pstrdup(cmd->pool, worker_file);
+    if (jk_worker_file == worker_file)
+        jk_worker_file = ap_pstrdup(cmd->pool, worker_file);
 
-    if (conf->worker_file == NULL)
+    if (jk_worker_file == NULL)
         return "JkWorkersFile file name invalid";
 
-    if (stat(conf->worker_file, &statbuf) == -1)
+    if (stat(jk_worker_file, &statbuf) == -1)
         return "Can't find the workers file specified";
 
     return NULL;
@@ -997,6 +1087,12 @@
     if (stat(conf->mount_file, &statbuf) == -1)
         return "Can't find the mount file specified";
 
+    if (!conf->uri_to_context) {
+        if (!jk_map_alloc(&(conf->uri_to_context))) {
+            return "JkMountFile Memory error";
+        }
+    }
+
     return NULL;
 }
 
@@ -1796,7 +1892,13 @@
         (jk_server_conf_t *) ap_get_module_config(s->module_config,
                                                   &jk_module);
 
-    conf->envvars_in_use = JK_TRUE;
+    conf->envvars_has_own = JK_TRUE;
+    if (!conf->envvars) {
+        conf->envvars      = ap_make_table(cmd->pool, 0);
+        conf->envvars_def  = ap_make_table(cmd->pool, 0);
+        conf->envvar_items = ap_make_array(cmd->pool, 0,
+                                           sizeof(envvar_item));
+    }
 
     /* env_name is mandatory, default_value is optional.
      * No value means send the attribute only, if the env var is set during runtime.
@@ -1822,7 +1924,9 @@
         (jk_server_conf_t *) ap_get_module_config(s->module_config,
                                                   &jk_module);
 
-    if (jk_map_read_property(conf->worker_properties, line,
+    if (!jk_worker_properties)
+        jk_map_alloc(&jk_worker_properties);
+    if (jk_map_read_property(jk_worker_properties, line,
                              JK_MAP_HANDLE_DUPLICATES, conf->log) == JK_FALSE)
         return ap_pstrcat(cmd->temp_pool, "Invalid JkWorkerProperty ", line, NULL);
 
@@ -1860,13 +1964,6 @@
      "the reload check interval of the mount file"},
 
     /*
-     * JkAutoMount specifies that the list of handled URLs must be
-     * asked to the servlet engine (autoconf feature)
-     */
-    {"JkAutoMount", jk_automount_context, NULL, RSRC_CONF, TAKE12,
-     "automatic mount points to a servlet-engine worker"},
-
-    /*
      * JkMount mounts a url prefix to a worker (the worker need to be
      * defined in the worker properties file.
      */
@@ -1884,7 +1981,7 @@
      * JkMountCopy specifies if mod_jk should copy the mount points
      * from the main server to the virtual servers.
      */
-    {"JkMountCopy", jk_set_mountcopy, NULL, RSRC_CONF, FLAG,
+    {"JkMountCopy", jk_set_mountcopy, NULL, RSRC_CONF, TAKE1,
      "Should the base server mounts be copied to the virtual server"},
 
     /*
@@ -2076,6 +2173,8 @@
         if (worker) {
 #ifndef NO_GETTIMEOFDAY
             struct timeval tv_begin, tv_end;
+            long micro, seconds;
+            char *duration = NULL;
 #endif
             int rc = JK_FALSE;
             int is_error = JK_HTTP_SERVER_ERROR;
@@ -2084,23 +2183,18 @@
             jk_pool_atom_t buf[SMALL_POOL_SIZE];
             jk_open_pool(&private_data.p, buf, sizeof(buf));
 
-            private_data.response_started = JK_FALSE;
             private_data.read_body_started = JK_FALSE;
             private_data.r = r;
 
             wc_maintain(conf->log);
             jk_init_ws_service(&s);
 
-            /* Update retries for this worker */
-            s.retries = worker->retries;
             s.ws_private = &private_data;
             s.pool = &private_data.p;
             ap_table_setn(r->notes, JK_NOTE_WORKER_TYPE,
                           wc_get_name_for_type(worker->type, conf->log));
 #ifndef NO_GETTIMEOFDAY
-            if (conf->format != NULL) {
-                gettimeofday(&tv_begin, NULL);
-            }
+            gettimeofday(&tv_begin, NULL);
 #endif
 
             if (init_ws_service(&private_data, &s, conf)) {
@@ -2126,23 +2220,21 @@
                         }
                     }
                 }
-                if (conf->format != NULL) {
 #ifndef NO_GETTIMEOFDAY
-                    long micro, seconds;
-                    char *duration = NULL;
-                    gettimeofday(&tv_end, NULL);
-                    if (tv_end.tv_usec < tv_begin.tv_usec) {
-                        tv_end.tv_usec += 1000000;
-                        tv_end.tv_sec--;
-                    }
-                    micro = tv_end.tv_usec - tv_begin.tv_usec;
-                    seconds = tv_end.tv_sec - tv_begin.tv_sec;
-                    duration =
-                        ap_psprintf(r->pool, "%.1ld.%.6ld", seconds, micro);
-                    ap_table_setn(r->notes, JK_NOTE_REQUEST_DURATION, duration);
+                gettimeofday(&tv_end, NULL);
+                if (tv_end.tv_usec < tv_begin.tv_usec) {
+                    tv_end.tv_usec += 1000000;
+                    tv_end.tv_sec--;
+                }
+                micro = tv_end.tv_usec - tv_begin.tv_usec;
+                seconds = tv_end.tv_sec - tv_begin.tv_sec;
+                duration =
+                    ap_psprintf(r->pool, "%.1ld.%.6ld", seconds, micro);
+                ap_table_setn(r->notes, JK_NOTE_REQUEST_DURATION, duration);
 #endif
-                    if (s.route && *s.route)
-                        ap_table_setn(r->notes, JK_NOTE_WORKER_ROUTE, s.route);
+                if (s.route && *s.route)
+                    ap_table_setn(r->notes, JK_NOTE_WORKER_ROUTE, s.route);
+                if (conf->format != NULL) {
                     request_log_transaction(r, conf);
                 }
             }
@@ -2211,34 +2303,21 @@
     jk_server_conf_t *c =
         (jk_server_conf_t *) ap_pcalloc(p, sizeof(jk_server_conf_t));
 
-    c->worker_properties = NULL;
-    jk_map_alloc(&c->worker_properties);
-    c->worker_file = NULL;
-    c->mount_file = NULL;
-    c->log_file = NULL;
     c->log_fd = -1;
-    c->log = NULL;
-    c->alias_dir = NULL;
-    c->stamp_format_string = NULL;
-    c->format_string = NULL;
-    c->format = NULL;
     c->mountcopy = JK_FALSE;
-    c->exclude_options = 0;
+    c->was_initialized = JK_FALSE;
 
     if (s->is_virtual) {
+        c->mountcopy = JK_UNSET;
         c->mount_file_reload = JK_UNSET;
         c->log_level = JK_UNSET;
-        c->options = 0;
-        c->worker_indicator = NULL;
         c->ssl_enable = JK_UNSET;
-        c->https_indicator = NULL;
-        c->certs_indicator = NULL;
-        c->cipher_indicator = NULL;
-        c->certchain_prefix = NULL;
-        c->session_indicator = NULL;
-        c->key_size_indicator = NULL;
         c->strip_session = JK_UNSET;
     } else {
+        if (!jk_map_alloc(&(c->uri_to_context))) {
+            ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, NULL, "Memory error");
+        }
+        c->mountcopy = JK_FALSE;
         c->mount_file_reload = JK_URIMAP_DEF_RELOAD;
         c->log_level = JK_LOG_DEF_LEVEL;
         c->options = JK_OPT_FWDURIDEFAULT;
@@ -2260,45 +2339,34 @@
         c->key_size_indicator = JK_ENV_KEY_SIZE;
         c->strip_session = JK_FALSE;
     }
+    c->envvars_has_own = JK_FALSE;
 
-    if (!jk_map_alloc(&(c->uri_to_context))) {
-        jk_error_exit(APLOG_MARK, APLOG_EMERG, s, p, "Memory error");
-    }
-    if (!jk_map_alloc(&(c->automount))) {
-        jk_error_exit(APLOG_MARK, APLOG_EMERG, s, p, "Memory error");
-    }
-    c->uw_map = NULL;
-    c->secret_key = NULL;
-
-    c->envvars_in_use = JK_FALSE;
-    c->envvars = ap_make_table(p, 0);
-    c->envvars_def = ap_make_table(p, 0);
-    c->envvar_items = ap_make_array(p, 0, sizeof(envvar_item));
-
     c->s = s;
-    jk_map_put(c->worker_properties, "ServerRoot", ap_server_root, NULL);
 
     return c;
 }
 
 
-static void copy_jk_map(ap_pool * p, server_rec * s, jk_map_t *src,
-                        jk_map_t *dst)
+/*
+ * Utility - copy items from apr table src to dst,
+ * for keys that exist in src but not in dst.
+ */
+static void merge_apr_table(table *src, table *dst)
 {
-    int sz = jk_map_size(src);
     int i;
-    for (i = 0; i < sz; i++) {
-        const char *name = jk_map_name_at(src, i);
-        if (jk_map_get(dst, name, NULL) == NULL) {
-            if (!jk_map_put (dst, name,
-                 ap_pstrdup(p, jk_map_get_string(src, name, NULL)),
-                            NULL)) {
-                jk_error_exit(APLOG_MARK, APLOG_EMERG, s, p, "Memory error");
-            }
+    const array_header *arr;
+    const table_entry *elts;
+
+    arr = ap_table_elts(src);
+    elts = (const table_entry *)arr->elts;
+    for (i = 0; i < arr->nelts; ++i) {
+        if (!ap_table_get(dst, elts[i].key)) {
+            ap_table_setn(dst, elts[i].key, elts[i].val);
         }
     }
 }
 
+
 static void *merge_jk_config(ap_pool * p, void *basev, void *overridesv)
 {
     jk_server_conf_t *base = (jk_server_conf_t *) basev;
@@ -2332,49 +2400,38 @@
     if (!overrides->key_size_indicator)
         overrides->key_size_indicator = base->key_size_indicator;
 
-    if (!overrides->secret_key)
-        overrides->secret_key = base->secret_key;
-
     overrides->options |= (base->options & ~base->exclude_options);
 
-    if (base->envvars_in_use) {
-        int i;
-        const array_header *arr;
-        const table_entry *elts;
-
-        arr = ap_table_elts(base->envvars);
-        if (arr) {
-            overrides->envvars_in_use = JK_TRUE;
-            elts = (const table_entry *)arr->elts;
-            for (i = 0; i < arr->nelts; ++i) {
-                if (!ap_table_get(overrides->envvars, elts[i].key)) {
-                    ap_table_setn(overrides->envvars, elts[i].key, elts[i].val);
-                }
-            }
+    if (base->envvars) {
+        if (overrides->envvars && overrides->envvars_has_own) {
+/* merge_apr_table() preserves existing entries in overrides table */
+            merge_apr_table(base->envvars, overrides->envvars);
+            merge_apr_table(base->envvars_def, overrides->envvars_def);
         }
-        arr = ap_table_elts(base->envvars_def);
-        if (arr) {
-            overrides->envvars_in_use = JK_TRUE;
-            elts = (const table_entry *)arr->elts;
-            for (i = 0; i < arr->nelts; ++i) {
-                if (!ap_table_get(overrides->envvars_def, elts[i].key)) {
-                    ap_table_setn(overrides->envvars_def, elts[i].key, elts[i].val);
-                }
-            }
+        else {
+            overrides->envvars = base->envvars;
+            overrides->envvars_def = base->envvars_def;
+            overrides->envvar_items = base->envvar_items;
         }
     }
 
-    if (overrides->mount_file_reload == JK_UNSET)
-        overrides->mount_file_reload = base->mount_file_reload;
-    if (overrides->mountcopy) {
-        copy_jk_map(p, overrides->s, base->uri_to_context,
-                    overrides->uri_to_context);
-        copy_jk_map(p, overrides->s, base->automount, overrides->automount);
+    if (overrides->mountcopy == JK_UNSET && jk_mount_copy_all == JK_TRUE) {
+        overrides->mountcopy = JK_TRUE;
+    }
+    if (overrides->uri_to_context && overrides->mountcopy == JK_TRUE) {
+/* jk_map_copy() preserves existing entries in overrides map */
+        if (jk_map_copy(base->uri_to_context, overrides->uri_to_context) == JK_FALSE) {
+                jk_error_exit(APLOG_MARK, APLOG_EMERG, overrides->s, p, "Memory error");
+        }
         if (!overrides->mount_file)
             overrides->mount_file = base->mount_file;
+    }
+    if (overrides->mountcopy == JK_TRUE) {
         if (!overrides->alias_dir)
             overrides->alias_dir = base->alias_dir;
     }
+    if (overrides->mount_file_reload == JK_UNSET)
+        overrides->mount_file_reload = base->mount_file_reload;
     if (overrides->strip_session == JK_UNSET)
         overrides->strip_session = base->strip_session;
 
@@ -2496,14 +2553,12 @@
     if (jkl && flp) {
         jkl->log = jk_log_to_file;
         jkl->level = conf->log_level;
-        jk_set_time_fmt(jkl, conf->stamp_format_string);
         jkl->logger_private = flp;
         flp->log_fd = conf->log_fd;
         conf->log = jkl;
+        jk_set_time_fmt(conf->log, conf->stamp_format_string);
         if (main_log == NULL)
             main_log = conf->log;
-        jk_log(conf->log, JK_LOG_DEBUG, "log time stamp format is '%s'",
-               conf->log->log_fmt);
         return;
     }
 
@@ -2518,8 +2573,11 @@
     jk_server_conf_t *conf =
         (jk_server_conf_t *) ap_get_module_config(s->module_config,
                                                   &jk_module);
-    jk_map_t *init_map = conf->worker_properties;
+    if (!jk_worker_properties)
+        jk_map_alloc(&jk_worker_properties);
+    jk_map_put(jk_worker_properties, "ServerRoot", ap_server_root, NULL);
 
+    main_server = s;
     jk_log_fds = ap_make_table(p, 0);
 
     /* step through the servers and open each jk logfile
@@ -2528,22 +2586,45 @@
     for (; srv; srv = srv->next) {
         jk_server_conf_t *sconf = (jk_server_conf_t *)ap_get_module_config(srv->module_config,
                                                                            &jk_module);
-        open_jk_log(srv, p);
-        if (sconf) {
+
+/*
+ * If a virtual server contains no JK directive, httpd shares
+ * the config structure. But we don't want to share some settings
+ * by default, especially the JkMount rules.
+ * Therefore we check, if this config structure really belongs to this
+ * vhost, otherwise we create a new one and merge.
+ */
+        if (sconf && sconf->s != srv) {
+            jk_server_conf_t *srvconf = (jk_server_conf_t *)create_jk_config(p, srv);
+            sconf = (jk_server_conf_t *)merge_jk_config(p, sconf, srvconf);
+            ap_set_module_config(srv->module_config, &jk_module, sconf);
+
+        }
+
+        if (sconf && sconf->was_initialized == JK_FALSE) {
+            sconf->was_initialized = JK_TRUE;
+            open_jk_log(srv, p);
             sconf->options &= ~sconf->exclude_options;
-            if (!uri_worker_map_alloc(&(sconf->uw_map),
-                                      sconf->uri_to_context, sconf->log))
-                jk_error_exit(APLOG_MARK, APLOG_EMERG, srv,
-                              p, "Memory error");
-            if (sconf->options & JK_OPT_REJECTUNSAFE)
-                sconf->uw_map->reject_unsafe = 1;
-            else
-                sconf->uw_map->reject_unsafe = 0;
-            if (sconf->mount_file) {
-                sconf->uw_map->fname = sconf->mount_file;
-                sconf->uw_map->reload = sconf->mount_file_reload;
-                uri_worker_map_load(sconf->uw_map, sconf->log);
+            if (sconf->uri_to_context) {
+                if (!uri_worker_map_alloc(&(sconf->uw_map),
+                                          sconf->uri_to_context, sconf->log))
+                    jk_error_exit(APLOG_MARK, APLOG_EMERG, srv,
+                                  p, "Memory error");
+                if (sconf->options & JK_OPT_REJECTUNSAFE)
+                    sconf->uw_map->reject_unsafe = 1;
+                else
+                    sconf->uw_map->reject_unsafe = 0;
+                if (sconf->mount_file) {
+                    sconf->uw_map->fname = sconf->mount_file;
+                    sconf->uw_map->reload = sconf->mount_file_reload;
+                    uri_worker_map_load(sconf->uw_map, sconf->log);
+                }
             }
+            else {
+                if (sconf->mountcopy == JK_TRUE) {
+                    sconf->uw_map = conf->uw_map;
+                }
+            }
             if (sconf->format_string) {
                 sconf->format =
                     parse_request_log_string(p, sconf->format_string, &err_string);
@@ -2551,7 +2632,7 @@
                     ap_log_error(APLOG_MARK, APLOG_ERR, srv,
                                  "JkRequestLogFormat format array NULL");
             }
-            if (sconf->envvars_in_use) {
+            if (sconf->envvars && sconf->envvars_has_own) {
                 int i;
                 const array_header *arr;
                 const table_entry *elts;
@@ -2582,6 +2663,20 @@
         }
     }
 
+    if ((jk_worker_file != NULL) &&
+        !jk_map_read_properties(jk_worker_properties, jk_worker_file, NULL,
+                                JK_MAP_HANDLE_DUPLICATES, conf->log)) {
+        jk_error_exit(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO, s, p,
+                      "Error in reading worker properties from '%s'",
+                      jk_worker_file);
+    }
+
+    if (jk_map_resolve_references(jk_worker_properties, "worker.",
+                                  1, 1, conf->log) == JK_FALSE) {
+        jk_error_exit(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO, s, p,
+                      "Error in resolving configuration references");
+    }
+
 #if !defined(WIN32) && !defined(NETWARE)
     if (!jk_shm_file) {
         jk_shm_file = ap_server_root_relative(p, JK_SHM_DEF_FILE);
@@ -2597,12 +2692,15 @@
     }
 #endif
 
-    if ((rc = jk_shm_open(jk_shm_file, jk_shm_size, conf->log)) == 0) {
-        if (JK_IS_DEBUG_LEVEL(conf->log))
-            jk_log(conf->log, JK_LOG_DEBUG, "Initialized shm:%s",
-                   jk_shm_name(), rc);
+    if (jk_shm_size == 0)
+        jk_shm_size = jk_shm_calculate_size(jk_worker_properties, conf->log);
+    else {
+        jk_log(conf->log, JK_LOG_WARNING,
+               "The optimal shared memory size can now be determined automatically.");
+        jk_log(conf->log, JK_LOG_WARNING,
+               "You can remove the JkShmSize directive if you want to use the optimal size.");
     }
-    else
+    if ((rc = jk_shm_open(jk_shm_file, jk_shm_size, conf->log)) != 0)
         jk_log(conf->log, JK_LOG_ERROR,
                "Initializing shm:%s errno=%d. Load balancing workers will not function properly.",
                jk_shm_name(), rc);
@@ -2611,38 +2709,12 @@
      * to make sure log file gets closed in the parent process  */
     ap_register_cleanup(p, s, jk_server_cleanup, ap_null_cleanup);
 
-/*
-{ int i;
-if (JK_IS_DEBUG_LEVEL(conf->log))
-    jk_log(conf->log, JK_LOG_DEBUG, "default secret key = %s", conf->secret_key);
-for (i = 0; i < jk_map_size(conf->automount); i++)
-{
-            char *name = jk_map_name_at(conf->automount, i);
-            if (JK_IS_DEBUG_LEVEL(conf->log))
-                jk_log(conf->log, JK_LOG_DEBUG, "worker = %s and virtualhost = %s", name, map_get_string(conf->automount, name, NULL));
-}
-}
-*/
-
-    if ((conf->worker_file != NULL) &&
-        !jk_map_read_properties(init_map, conf->worker_file, NULL,
-                                JK_MAP_HANDLE_DUPLICATES, conf->log)) {
-        jk_error_exit(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO, s, p,
-                      "Error in reading worker properties from '%s'",
-                      conf->worker_file);
-    }
-
-    if (jk_map_resolve_references(init_map, "worker.", 1, 1, conf->log) == JK_FALSE) {
-        jk_error_exit(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO, s, p,
-                      "Error in resolving configuration references");
-    }
-
     /* we add the URI->WORKER MAP since workers using AJP14 will feed it */
     worker_env.uri_to_worker = conf->uw_map;
     worker_env.virtual = "*";       /* for now */
     worker_env.server_name = (char *)ap_get_server_version();
 
-    if (wc_open(init_map, &worker_env, conf->log)) {
+    if (wc_open(jk_worker_properties, &worker_env, conf->log)) {
 #if MODULE_MAGIC_NUMBER >= 19980527
         /* Tell apache we're here */
         ap_add_version_component(JK_EXPOSED_VERSION);
@@ -2657,6 +2729,14 @@
                       "Error in creating the workers."
                       " Please consult your mod_jk log file '%s'.", conf->log_file);
     }
+    if (conf->uw_map)
+        uri_worker_map_ext(conf->uw_map, conf->log);
+    for (srv = s; srv; srv = srv->next) {
+        jk_server_conf_t *sconf = (jk_server_conf_t *)ap_get_module_config(srv->module_config,
+                                                                           &jk_module);
+        if (conf->uw_map != sconf->uw_map && sconf->uw_map)
+            uri_worker_map_ext(sconf->uw_map, sconf->log);
+    }
 
 }
 
@@ -2667,6 +2747,10 @@
  */
 static int jk_translate(request_rec * r)
 {
+    rule_extension_t **ext = ap_palloc(r->pool, sizeof(rule_extension_t *));
+    *ext = NULL;
+    ap_set_module_config(r->request_config, &jk_module, ext);
+
     if (!r->proxyreq) {
         jk_server_conf_t *conf =
             (jk_server_conf_t *) ap_get_module_config(r->server->
@@ -2686,7 +2770,20 @@
             }
 
             ap_no2slash(clean_uri);
-            worker = map_uri_to_worker(conf->uw_map, clean_uri, conf->log);
+            if (!conf->uw_map) {
+                if (JK_IS_DEBUG_LEVEL(conf->log))
+                    jk_log(conf->log, JK_LOG_DEBUG,
+                           "missing uri map for %s:%s",
+                           conf->s->server_hostname ? conf->s->server_hostname : "_default_",
+                           r->uri);
+                return DECLINED;
+            }
+            else {
+                rule_extension_t *e;
+                worker = map_uri_to_worker_ext(conf->uw_map, clean_uri,
+                                               NULL, &e, conf->log);
+                ap_set_module_config(r->request_config, &jk_module, e);
+            }
 
             /* Don't know the worker, ForwardDirectories is set, there is a
              * previous request for which the handler is JK_HANDLER (as set by
@@ -2797,23 +2894,29 @@
                     }
                 }
             }
-            else if (conf->strip_session == JK_TRUE) {
-                char *jsessionid;
-                if (r->uri) {
-                    jsessionid = strstr(r->uri, JK_PATH_SESSION_IDENTIFIER);
-                    if (jsessionid) {
-                        if (JK_IS_DEBUG_LEVEL(conf->log))
-                            jk_log(conf->log, JK_LOG_DEBUG,
-                                   "removing session identifier [%s] for non servlet url [%s]",
-                                   jsessionid, r->uri);
-                        *jsessionid = '\0';
+            else {
+                if (JK_IS_DEBUG_LEVEL(conf->log))
+                    jk_log(conf->log, JK_LOG_DEBUG,
+                           "no match for %s found",
+                           r->uri);
+                if (conf->strip_session == JK_TRUE) {
+                    char *jsessionid;
+                    if (r->uri) {
+                        jsessionid = strstr(r->uri, JK_PATH_SESSION_IDENTIFIER);
+                        if (jsessionid) {
+                            if (JK_IS_DEBUG_LEVEL(conf->log))
+                                jk_log(conf->log, JK_LOG_DEBUG,
+                                       "removing session identifier [%s] for non servlet url [%s]",
+                                       jsessionid, r->uri);
+                            *jsessionid = '\0';
+                        }
                     }
+                    if (r->filename) {
+                        jsessionid = strstr(r->filename, JK_PATH_SESSION_IDENTIFIER);
+                        if (jsessionid)
+                            *jsessionid = '\0';
+                    }
                 }
-                if (r->filename) {
-                    jsessionid = strstr(r->filename, JK_PATH_SESSION_IDENTIFIER);
-                    if (jsessionid)
-                        *jsessionid = '\0';
-                }
             }
         }
     }
@@ -2897,12 +3000,7 @@
 
     JK_TRACE_ENTER(conf->log);
 
-    if ((rc = jk_shm_attach(jk_shm_file, jk_shm_size, conf->log)) == 0) {
-        if (JK_IS_DEBUG_LEVEL(conf->log))
-            jk_log(conf->log, JK_LOG_DEBUG, "Attached shm:%s",
-                   jk_shm_name());
-    }
-    else
+    if ((rc = jk_shm_attach(jk_shm_file, jk_shm_size, conf->log)) != 0)
         jk_log(conf->log, JK_LOG_ERROR, "Attaching shm:%s errno=%d",
                jk_shm_name(), rc);
 
@@ -2922,27 +3020,41 @@
 /** BEGIN SREVILAK
  * body taken from exit_handler()
  */
-static void jk_generic_cleanup(server_rec * s)
+static void jk_generic_cleanup(server_rec *s)
 {
 
-    server_rec *tmp = s;
+    if (jk_worker_properties) {
+        jk_map_free(&jk_worker_properties);
+        jk_worker_properties = NULL;
+        jk_worker_file = NULL;
+        jk_mount_copy_all = JK_FALSE;
+    }
 
     /* loop through all available servers to clean up all configuration
      * records we've created
      */
-    while (NULL != tmp) {
+    while (NULL != s) {
         jk_server_conf_t *conf =
-            (jk_server_conf_t *) ap_get_module_config(tmp->module_config,
+            (jk_server_conf_t *) ap_get_module_config(s->module_config,
                                                       &jk_module);
 
-        if (conf) {
+        if (conf && conf->was_initialized == JK_TRUE) {
+            /* On pool cleanup pass NULL for the jk_logger to
+               prevent segmentation faults on Windows because
+               we can't guarantee what order pools get cleaned
+               up between APR implementations. */
             wc_close(NULL);
-            uri_worker_map_free(&(conf->uw_map), NULL);
-            jk_map_free(&(conf->uri_to_context));
-            jk_map_free(&(conf->worker_properties));
-            jk_map_free(&(conf->automount));
+            if (conf->uri_to_context) {
+                jk_map_free(&conf->uri_to_context);
+                /* We cannot have allocated uw_map
+                 * unless we've allocated uri_to_context
+                 */
+                if (conf->uw_map)
+                    uri_worker_map_free(&conf->uw_map, NULL);
+            }
+            conf->was_initialized = JK_FALSE;
         }
-        tmp = tmp->next;
+        s = s->next;
     }
 }
 

Modified: trunk/tomcat5.5/connectors/jk/native/apache-2.0/Makefile.apxs.in
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/apache-2.0/Makefile.apxs.in	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/apache-2.0/Makefile.apxs.in	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 ## configure should make the Makefile out of this file.
 
 APXS=@APXS@

Modified: trunk/tomcat5.5/connectors/jk/native/apache-2.0/Makefile.in
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/apache-2.0/Makefile.in	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/apache-2.0/Makefile.in	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 ## 
 
 APXS=@APXS@

Modified: trunk/tomcat5.5/connectors/jk/native/apache-2.0/NWGNUmakefile
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/apache-2.0/NWGNUmakefile	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/apache-2.0/NWGNUmakefile	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,21 @@
 #
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+#
 # Makefile for mod_jk (uses the build system of Apache2 - gnu make)
 # created by Guenter Knauf <eflash at gmx.net>
 #

Modified: trunk/tomcat5.5/connectors/jk/native/apache-2.0/mod_jk.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/apache-2.0/mod_jk.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/apache-2.0/mod_jk.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -19,7 +19,7 @@
  * Description: Apache 2 plugin for Tomcat                                 *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
  *              Henri Gomez <hgomez at apache.org>                            *
- * Version:     $Revision: 567689 $                                          *
+ * Version:     $Revision: 613833 $                                        *
  ***************************************************************************/
 
 /*
@@ -112,6 +112,7 @@
 #define JK_ENV_SESSION              ("SSL_SESSION_ID")
 #define JK_ENV_KEY_SIZE             ("SSL_CIPHER_USEKEYSIZE")
 #define JK_ENV_CERTCHAIN_PREFIX     ("SSL_CLIENT_CERT_CHAIN_")
+#define JK_ENV_REPLY_TIMEOUT        ("JK_REPLY_TIMEOUT")
 #define JK_ENV_WORKER_NAME          ("JK_WORKER_NAME")
 #define JK_NOTE_WORKER_NAME         ("JK_WORKER_NAME")
 #define JK_NOTE_WORKER_TYPE         ("JK_WORKER_TYPE")
@@ -157,17 +158,13 @@
     apr_file_t *jklogfp;
 
     /*
-     * Worker stuff
+     * Mount stuff
      */
-    jk_map_t *worker_properties;
-    char *worker_file;
     char *mount_file;
     int mount_file_reload;
     jk_map_t *uri_to_context;
 
     int mountcopy;
-    char *secret_key;
-    jk_map_t *automount;
 
     jk_uri_worker_map_t *uw_map;
 
@@ -212,7 +209,7 @@
     /*
      * Environment variables support
      */
-    int envvars_in_use;
+    int envvars_has_own;
     apr_table_t *envvars;
     apr_table_t *envvars_def;
     apr_array_header_t *envvar_items;
@@ -224,18 +221,24 @@
 {
     jk_pool_t p;
 
-    int response_started;
     int read_body_started;
     request_rec *r;
 };
 typedef struct apache_private_data apache_private_data_t;
 
+static server_rec *main_server = NULL;
 static jk_logger_t *main_log = NULL;
 static apr_hash_t *jk_log_fps = NULL;
 static jk_worker_env_t worker_env;
 static apr_global_mutex_t *jk_log_lock = NULL;
 static char *jk_shm_file = NULL;
-static size_t jk_shm_size = JK_SHM_DEF_SIZE;
+static size_t jk_shm_size = 0;
+/*
+ * Worker stuff
+*/
+static jk_map_t *jk_worker_properties = NULL;
+static char *jk_worker_file = NULL;
+static int jk_mount_copy_all = JK_FALSE;
 
 static int JK_METHOD ws_start_response(jk_ws_service_t *s,
                                        int status,
@@ -257,6 +260,12 @@
                                        const char *const *log_values,
                                        unsigned num_of_log_items);
 
+static void * JK_METHOD ws_next_vhost(void *d);
+
+static void JK_METHOD ws_vhost_to_text(void *d, char *buf, size_t len);
+
+static jk_uri_worker_map_t * JK_METHOD ws_vhost_to_uw_map(void *d);
+
 /* ========================================================================= */
 /* JK Service step callbacks                                                 */
 /* ========================================================================= */
@@ -317,7 +326,7 @@
 
     /* this NOP function was removed in apache 2.0 alpha14 */
     /* ap_send_http_header(r); */
-    p->response_started = JK_TRUE;
+    s->response_started = JK_TRUE;
 
     return JK_TRUE;
 }
@@ -408,7 +417,7 @@
             int ll = l;
             const char *bb = (const char *)b;
 
-            if (!p->response_started) {
+            if (!s->response_started) {
                 if (main_log)
                     jk_log(main_log, JK_LOG_INFO,
                            "Write without start, starting with defaults");
@@ -481,6 +490,78 @@
     }
 }
 
+static void * JK_METHOD ws_next_vhost(void *d)
+{
+    server_rec *s = (server_rec *)d;
+    if (s == NULL)
+        return main_server;
+    return s->next;
+}
+
+static void JK_METHOD ws_vhost_to_text(void *d, char *buf, size_t len)
+{
+    server_rec *s = (server_rec *)d;
+    size_t used = 0;
+
+    if (s->server_hostname)
+        used += strlen(s->server_hostname);
+    if (!s->is_virtual) {
+        if (s->port)
+            used += strlen(":XXXXX");
+    }
+    else if (s->addrs) {
+        used += strlen(" [");
+        if (s->addrs->virthost)
+            used += strlen(s->addrs->virthost);
+        if (s->addrs->host_port)
+            used += strlen(":XXXXX");
+        used += strlen("]");
+    }
+
+    if (len < used && len > strlen("XXX")) {
+        strcpy(buf, "XXX");
+        return;
+    }
+
+    used = 0;
+
+    if (s->server_hostname) {
+        strcpy(buf + used, s->server_hostname);
+        used += strlen(s->server_hostname);
+    }
+    if (!s->is_virtual) {
+        if (s->port) {
+            sprintf(buf + used, ":%hu", s->port);
+            used = strlen(buf);
+        }
+    }
+    else if (s->addrs) {
+        strcpy(buf + used, " [");
+        used += strlen(" [");
+        if (s->addrs->virthost) {
+            strcpy(buf + used, s->addrs->virthost);
+            used += strlen(s->addrs->virthost);
+        }
+        if (s->addrs->host_port) {
+            sprintf(buf + used, ":%hu", s->addrs->host_port);
+            used = strlen(buf);
+        }
+        strcpy(buf + used, "]");
+        used += strlen("]");
+    }
+}
+
+static jk_uri_worker_map_t * JK_METHOD ws_vhost_to_uw_map(void *d)
+{
+    server_rec *s = (server_rec *)d;
+    jk_server_conf_t *conf = NULL;
+    if (s == NULL)
+        return NULL;
+    conf = (jk_server_conf_t *) ap_get_module_config(s->module_config,
+                                                     &jk_module);
+    return conf->uw_map;
+}
+
 /* ========================================================================= */
 /* Utility functions                                                         */
 /* ========================================================================= */
@@ -495,10 +576,20 @@
 {
     va_list ap;
     char *res;
+    char *ch;
 
     va_start(ap, fmt);
     res = apr_pvsprintf(s->process->pool, fmt, ap);
     va_end(ap);
+    /* Replace all format characters in the resulting message */
+    /* because we feed the message to ap_log_error(). */
+    ch = res;
+    while (*ch) {
+        if (*ch == '%') {
+            *ch = '#';
+        }
+        ch++;
+    }
 
     ap_log_error(file, line, level, 0, s, res);
     if ( s ) {
@@ -531,11 +622,11 @@
 static int init_ws_service(apache_private_data_t * private_data,
                            jk_ws_service_t *s, jk_server_conf_t * conf)
 {
+    int size;
     request_rec *r = private_data->r;
-
     char *ssl_temp = NULL;
-    int size;
-    s->route = NULL;        /* Used for sticky session routing */
+    const char *reply_timeout = NULL;
+    rule_extension_t *e;
 
     /* Copy in function pointers (which are really methods) */
     s->start_response = ws_start_response;
@@ -543,10 +634,10 @@
     s->write = ws_write;
     s->flush = ws_flush;
     s->add_log_items = ws_add_log_items;
+    s->next_vhost = ws_next_vhost;
+    s->vhost_to_text = ws_vhost_to_text;
+    s->vhost_to_uw_map = ws_vhost_to_uw_map;
 
-    /* Clear RECO status */
-    s->reco_status = RECO_NONE;
-
     s->auth_type = NULL_FOR_EMPTY(r->ap_auth_type);
     s->remote_user = NULL_FOR_EMPTY(r->user);
 
@@ -561,17 +652,31 @@
         s->remote_addr = NULL_FOR_EMPTY(r->connection->remote_ip);
     if (conf->options & JK_OPT_FLUSHPACKETS)
         s->flush_packets = 1;
-    else
-        s->flush_packets = 0;
     if (conf->options & JK_OPT_FLUSHEADER)
         s->flush_header = 1;
-    else
-        s->flush_header = 0;
 
+    e = (rule_extension_t *)ap_get_module_config(r->request_config, &jk_module);
+    if (e) {
+        s->extension.reply_timeout = e->reply_timeout;
+        if (e->activation) {
+            s->extension.activation = apr_palloc(r->pool, e->activation_size * sizeof(int));
+            memcpy(s->extension.activation, e->activation, e->activation_size * sizeof(int));
+        }
+        if (e->fail_on_status_size > 0) {
+            s->extension.fail_on_status_size = e->fail_on_status_size;
+            s->extension.fail_on_status = apr_palloc(r->pool, e->fail_on_status_size * sizeof(int));
+            memcpy(s->extension.fail_on_status, e->fail_on_status, e->fail_on_status_size * sizeof(int));
+        }
+    }
+    reply_timeout = apr_table_get(r->subprocess_env, "JK_REPLY_TIMEOUT");
+    if (reply_timeout) {
+        int r = atoi(reply_timeout);
+        if (r >= 0)
+            s->extension.reply_timeout = r;
+    }
+
     if (conf->options & JK_OPT_DISABLEREUSE)
         s->disable_reuse = 1;
-    else
-        s->disable_reuse = 0;
 
     /* get server name */
     s->server_name = (char *)ap_get_server_name(r);
@@ -584,7 +689,7 @@
      */
     s->server_port  = ap_get_server_port(r);
 
-#if (AP_MODULE_MAGIC_AT_LEAST(20060905,0))
+#if (AP_MODULE_MAGIC_AT_LEAST(20051115,4)) && !defined(API_COMPATIBILITY)
     s->server_software = (char *)ap_get_server_description();
 #else
     s->server_software = (char *)ap_get_server_version();
@@ -647,15 +752,7 @@
         return JK_FALSE;
     }
 
-    s->is_ssl = JK_FALSE;
-    s->ssl_cert = NULL;
-    s->ssl_cert_len = 0;
-    s->ssl_cipher = NULL;       /* required by Servlet 2.3 Api,
-                                   allready in original ajp13 */
-    s->ssl_session = NULL;
-    s->ssl_key_size = -1;       /* required by Servlet 2.3 Api, added in jtc */
-
-    if (conf->ssl_enable || conf->envvars_in_use) {
+    if (conf->ssl_enable || conf->envvars) {
         ap_add_common_vars(r);
 
         if (conf->ssl_enable) {
@@ -715,7 +812,7 @@
             }
         }
 
-        if (conf->envvars_in_use) {
+        if (conf->envvars) {
             const apr_array_header_t *t = conf->envvar_items;
             if (t && t->nelts) {
                 int i;
@@ -747,9 +844,6 @@
         }
     }
 
-    s->headers_names = NULL;
-    s->headers_values = NULL;
-    s->num_headers = 0;
     if (r->headers_in && apr_table_elts(r->headers_in)) {
         int need_content_length_header = (!s->is_chunked
                                           && s->content_length ==
@@ -834,18 +928,30 @@
 /*
  * JkMountCopy directive handling
  *
- * JkMountCopy On/Off
+ * JkMountCopy On/Off/All
  */
 
-static const char *jk_set_mountcopy(cmd_parms * cmd, void *dummy, int flag)
+static const char *jk_set_mountcopy(cmd_parms * cmd,
+                                    void *dummy, const char *mount_copy)
 {
     server_rec *s = cmd->server;
     jk_server_conf_t *conf =
         (jk_server_conf_t *) ap_get_module_config(s->module_config,
                                                   &jk_module);
 
-    /* Set up our value */
-    conf->mountcopy = flag ? JK_TRUE : JK_FALSE;
+    if (! strcasecmp(mount_copy, "all")) {
+        const char *err_string = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+        if (err_string != NULL) {
+            return err_string;
+        }
+        jk_mount_copy_all = JK_TRUE;
+    }
+    else if (strcasecmp(mount_copy, "on") && strcasecmp(mount_copy, "off")) {
+        return "JkMountCopy must be All, On or Off";
+    }
+    else {
+        conf->mountcopy = strcasecmp(mount_copy, "off") ? JK_TRUE : JK_FALSE;
+    }
 
     return NULL;
 }
@@ -885,6 +991,11 @@
     if (c[0] != '/')
         return "JkMount context should start with /";
 
+    if (!conf->uri_to_context) {
+        if (!jk_map_alloc(&(conf->uri_to_context))) {
+            return "JkMount Memory error";
+        }
+    }
     /*
      * Add the new worker to the alias map.
      */
@@ -929,6 +1040,12 @@
         return "JkUnMount context should start with /";
 
     uri = apr_pstrcat(cmd->temp_pool, "!", c, NULL);
+
+    if (!conf->uri_to_context) {
+        if (!jk_map_alloc(&(conf->uri_to_context))) {
+            return "JkUnMount Memory error";
+        }
+    }
     /*
      * Add the new worker to the alias map.
      */
@@ -938,29 +1055,6 @@
 
 
 /*
- * JkAutoMount directive handling
- *
- * JkAutoMount worker [virtualhost]
- * This is an experimental and undocumented extension made in j-t-c/jk.
- */
-static const char *jk_automount_context(cmd_parms * cmd,
-                                        void *dummy,
-                                        const char *worker,
-                                        const char *virtualhost)
-{
-    server_rec *s = cmd->server;
-    jk_server_conf_t *conf =
-        (jk_server_conf_t *) ap_get_module_config(s->module_config,
-                                                  &jk_module);
-
-    /*
-     * Add the new automount to the auto map.
-     */
-    jk_map_put(conf->automount, worker, virtualhost, NULL);
-    return NULL;
-}
-
-/*
  * JkWorkersFile Directive Handling
  *
  * JkWorkersFile file
@@ -969,24 +1063,21 @@
 static const char *jk_set_worker_file(cmd_parms * cmd,
                                       void *dummy, const char *worker_file)
 {
-    server_rec *s = cmd->server;
-
-    jk_server_conf_t *conf =
-        (jk_server_conf_t *) ap_get_module_config(s->module_config,
-                                                  &jk_module);
-
     const char *err_string = ap_check_cmd_context(cmd, GLOBAL_ONLY);
     if (err_string != NULL) {
         return err_string;
     }
 
+    if (jk_worker_file != NULL)
+        return "JkWorkersFile only allowed once";
+
     /* we need an absolute path (ap_server_root_relative does the ap_pstrdup) */
-    conf->worker_file = ap_server_root_relative(cmd->pool, worker_file);
+    jk_worker_file = ap_server_root_relative(cmd->pool, worker_file);
 
-    if (conf->worker_file == NULL)
+    if (jk_worker_file == NULL)
         return "JkWorkersFile file name invalid";
 
-    if (jk_file_exists(conf->worker_file) != JK_TRUE)
+    if (jk_file_exists(jk_worker_file) != JK_TRUE)
         return "Can't find the workers file specified";
 
     return NULL;
@@ -1016,6 +1107,12 @@
     if (jk_file_exists(conf->mount_file) != JK_TRUE)
         return "Can't find the mount file specified";
 
+    if (!conf->uri_to_context) {
+        if (!jk_map_alloc(&(conf->uri_to_context))) {
+            return "JkMountFile Memory error";
+        }
+    }
+
     return NULL;
 }
 
@@ -1822,7 +1919,13 @@
         (jk_server_conf_t *) ap_get_module_config(s->module_config,
                                                   &jk_module);
 
-    conf->envvars_in_use = JK_TRUE;
+    conf->envvars_has_own = JK_TRUE;
+    if (!conf->envvars) {
+        conf->envvars      = apr_table_make(cmd->pool, 0);
+        conf->envvars_def  = apr_table_make(cmd->pool, 0);
+        conf->envvar_items = apr_array_make(cmd->pool, 0,
+                                            sizeof(envvar_item));
+    }
 
     /* env_name is mandatory, default_value is optional.
      * No value means send the attribute only, if the env var is set during runtime.
@@ -1853,7 +1956,9 @@
         return err_string;
     }
 
-    if (jk_map_read_property(conf->worker_properties, line,
+    if (!jk_worker_properties)
+        jk_map_alloc(&jk_worker_properties);
+    if (jk_map_read_property(jk_worker_properties, line,
                              JK_MAP_HANDLE_DUPLICATES, conf->log) == JK_FALSE)
         return apr_pstrcat(cmd->temp_pool, "Invalid JkWorkerProperty ", line, NULL);
 
@@ -1891,13 +1996,6 @@
                   "the reload check interval of the mount file"),
 
     /*
-     * JkAutoMount specifies that the list of handled URLs must be
-     * asked to the servlet engine (autoconf feature)
-     */
-    AP_INIT_TAKE12("JkAutoMount", jk_automount_context, NULL, RSRC_CONF,
-                   "automatic mount points to a Tomcat worker"),
-
-    /*
      * JkMount mounts a url prefix to a worker (the worker need to be
      * defined in the worker properties file.
      */
@@ -1915,8 +2013,8 @@
      * JkMountCopy specifies if mod_jk should copy the mount points
      * from the main server to the virtual servers.
      */
-    AP_INIT_FLAG("JkMountCopy", jk_set_mountcopy, NULL, RSRC_CONF,
-                 "Should the base server mounts be copied to the virtual server"),
+    AP_INIT_TAKE1("JkMountCopy", jk_set_mountcopy, NULL, RSRC_CONF,
+                  "Should the base server mounts be copied to the virtual server"),
 
     /*
      * JkStripSession specifies if mod_jk should strip the ;jsessionid
@@ -2015,8 +2113,8 @@
      * Servlet Engine
      */
     AP_INIT_TAKE12("JkEnvVar", jk_add_env_var, NULL, RSRC_CONF,
-                  "Adds a name of environment variable and an optional value "
-                  "that should be sent to servlet-engine"),
+                   "Adds a name of environment variable and an optional value "
+                   "that should be sent to servlet-engine"),
 
     AP_INIT_RAW_ARGS("JkWorkerProperty", jk_set_worker_property,
                      NULL, RSRC_CONF,
@@ -2108,7 +2206,20 @@
                        worker_name, r->uri);
         }
         else {
-            worker_name = map_uri_to_worker(xconf->uw_map, r->uri, xconf->log);
+            if (!xconf->uw_map) {
+                if (JK_IS_DEBUG_LEVEL(xconf->log))
+                    jk_log(xconf->log, JK_LOG_DEBUG,
+                           "missing uri map for %s:%s",
+                           xconf->s->server_hostname ? xconf->s->server_hostname : "_default_",
+                           r->uri);
+            }
+            else {
+                rule_extension_t *e;
+                worker_name = map_uri_to_worker_ext(xconf->uw_map, r->uri,
+                                                    NULL, &e, xconf->log);
+                ap_set_module_config(r->request_config, &jk_module, e);
+            }
+
             if (worker_name == NULL && worker_env.num_of_workers) {
                 worker_name = worker_env.worker_list[0];
                 if (JK_IS_DEBUG_LEVEL(xconf->log))
@@ -2124,13 +2235,13 @@
     if (JK_IS_DEBUG_LEVEL(xconf->log))
        jk_log(xconf->log, JK_LOG_DEBUG, "Into handler %s worker=%s"
               " r->proxyreq=%d",
-              r->handler, worker_name, r->proxyreq);
+              r->handler, STRNULL_FOR_NULL(worker_name), r->proxyreq);
 
     /* If this is a proxy request, we'll notify an error */
     if (r->proxyreq) {
         jk_log(xconf->log, JK_LOG_INFO, "Proxy request for worker=%s"
               " is not allowed",
-              worker_name);
+              STRNULL_FOR_NULL(worker_name));
         JK_TRACE_EXIT(xconf->log);
         return HTTP_INTERNAL_SERVER_ERROR;
     }
@@ -2148,6 +2259,9 @@
         }
 
         if (worker) {
+            long micro, seconds;
+            char *duration = NULL;
+            apr_time_t rd;
             apr_time_t request_begin = 0;
             int is_error = HTTP_INTERNAL_SERVER_ERROR;
             int rc = JK_FALSE;
@@ -2156,23 +2270,18 @@
             jk_pool_atom_t buf[SMALL_POOL_SIZE];
             jk_open_pool(&private_data.p, buf, sizeof(buf));
 
-            private_data.response_started = JK_FALSE;
             private_data.read_body_started = JK_FALSE;
             private_data.r = r;
 
             wc_maintain(xconf->log);
 
             jk_init_ws_service(&s);
-            /* Update retries for this worker */
-            s.retries = worker->retries;
             s.ws_private = &private_data;
             s.pool = &private_data.p;
             apr_table_setn(r->notes, JK_NOTE_WORKER_TYPE,
                            wc_get_name_for_type(worker->type, xconf->log));
 
-            if (xconf->format != NULL) {
-                request_begin = apr_time_now();
-            }
+            request_begin = apr_time_now();
 
             if (init_ws_service(&private_data, &s, xconf)) {
                 jk_endpoint_t *end = NULL;
@@ -2221,18 +2330,16 @@
                 JK_TRACE_EXIT(xconf->log);
                 return HTTP_INTERNAL_SERVER_ERROR;
             }
-            if (xconf->format != NULL) {
-                long micro, seconds;
-                char *duration = NULL;
-                apr_time_t rd = apr_time_now() - request_begin;
-                seconds = (long)apr_time_sec(rd);
-                micro = (long)(rd - apr_time_from_sec(seconds));
+            rd = apr_time_now() - request_begin;
+            seconds = (long)apr_time_sec(rd);
+            micro = (long)(rd - apr_time_from_sec(seconds));
 
-                duration = apr_psprintf(r->pool, "%.1ld.%.6ld", seconds, micro);
-                apr_table_setn(r->notes, JK_NOTE_REQUEST_DURATION, duration);
-                if (s.route && *s.route)
-                    apr_table_setn(r->notes, JK_NOTE_WORKER_ROUTE, s.route);
+            duration = apr_psprintf(r->pool, "%.1ld.%.6ld", seconds, micro);
+            apr_table_setn(r->notes, JK_NOTE_REQUEST_DURATION, duration);
+            if (s.route && *s.route)
+                apr_table_setn(r->notes, JK_NOTE_WORKER_ROUTE, s.route);
 
+            if (xconf->format != NULL) {
                 request_log_transaction(r, xconf);
             }
 
@@ -2292,28 +2399,33 @@
 {
     server_rec *s = data;
 
+    if (jk_worker_properties) {
+        jk_map_free(&jk_worker_properties);
+        jk_worker_properties = NULL;
+        jk_worker_file = NULL;
+        jk_mount_copy_all = JK_FALSE;
+    }
+
     while (NULL != s) {
         jk_server_conf_t *conf =
             (jk_server_conf_t *) ap_get_module_config(s->module_config,
                                                       &jk_module);
 
-        if (conf && conf->worker_properties) {
+        if (conf && conf->was_initialized == JK_TRUE) {
             /* On pool cleanup pass NULL for the jk_logger to
                prevent segmentation faults on Windows because
                we can't guarantee what order pools get cleaned
                up between APR implementations. */
-            if (conf->was_initialized)
-                wc_close(NULL);
-            if (conf->worker_properties)
-                jk_map_free(&conf->worker_properties);
-            if (conf->uri_to_context)
+            wc_close(NULL);
+            if (conf->uri_to_context) {
                 jk_map_free(&conf->uri_to_context);
-            if (conf->automount)
-                jk_map_free(&conf->automount);
-            if (conf->uw_map)
-                uri_worker_map_free(&conf->uw_map, NULL);
-            conf->was_initialized   = JK_FALSE;
-            conf->worker_properties = NULL;
+                /* We cannot have allocated uw_map
+                 * unless we've allocated uri_to_context
+                 */
+                if (conf->uw_map)
+                    uri_worker_map_free(&conf->uw_map, NULL);
+            }
+            conf->was_initialized = JK_FALSE;
         }
         s = s->next;
     }
@@ -2328,34 +2440,19 @@
     jk_server_conf_t *c =
         (jk_server_conf_t *) apr_pcalloc(p, sizeof(jk_server_conf_t));
 
-    c->worker_properties = NULL;
-    jk_map_alloc(&c->worker_properties);
-    c->worker_file = NULL;
-    c->mount_file = NULL;
-    c->log_file = NULL;
-    c->log = NULL;
-    c->alias_dir = NULL;
-    c->stamp_format_string = NULL;
-    c->format_string = NULL;
-    c->format = NULL;
-    c->mountcopy = JK_FALSE;
-    c->exclude_options = 0;
     c->was_initialized = JK_FALSE;
 
     if (s->is_virtual) {
+        c->mountcopy = JK_UNSET;
         c->mount_file_reload = JK_UNSET;
         c->log_level = JK_UNSET;
-        c->options = 0;
-        c->worker_indicator = NULL;
         c->ssl_enable = JK_UNSET;
-        c->https_indicator = NULL;
-        c->certs_indicator = NULL;
-        c->cipher_indicator = NULL;
-        c->certchain_prefix = NULL;
-        c->session_indicator = NULL;
-        c->key_size_indicator = NULL;
         c->strip_session = JK_UNSET;
     } else {
+        if (!jk_map_alloc(&(c->uri_to_context))) {
+            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "Memory error");
+        }
+        c->mountcopy = JK_FALSE;
         c->mount_file_reload = JK_URIMAP_DEF_RELOAD;
         c->log_level = JK_LOG_DEF_LEVEL;
         c->options = JK_OPT_FWDURIDEFAULT;
@@ -2377,48 +2474,34 @@
         c->key_size_indicator = JK_ENV_KEY_SIZE;
         c->strip_session = JK_FALSE;
     }
+    c->envvars_has_own = JK_FALSE;
 
-    if (!jk_map_alloc(&(c->uri_to_context))) {
-        jk_error_exit(APLOG_MARK, APLOG_EMERG, s, p, "Memory error");
-    }
-    if (!jk_map_alloc(&(c->automount))) {
-        jk_error_exit(APLOG_MARK, APLOG_EMERG, s, p, "Memory error");
-    }
-
-    c->uw_map = NULL;
-    c->secret_key = NULL;
-
-    c->envvars_in_use = JK_FALSE;
-    c->envvars = apr_table_make(p, 0);
-    c->envvars_def = apr_table_make(p, 0);
-    c->envvar_items = apr_array_make(p, 0, sizeof(envvar_item));
-
     c->s = s;
-    jk_map_put(c->worker_properties, "ServerRoot", ap_server_root, NULL);
     apr_pool_cleanup_register(p, s, jk_apr_pool_cleanup, jk_apr_pool_cleanup);
     return c;
 }
 
 
-/** Utility - copy a map . XXX Should move to jk_map, it's generic code.
+/*
+ * Utility - copy items from apr table src to dst,
+ * for keys that exist in src but not in dst.
  */
-static void copy_jk_map(apr_pool_t * p, server_rec * s, jk_map_t *src,
-                        jk_map_t *dst)
+static void merge_apr_table(apr_table_t *src, apr_table_t *dst)
 {
-    int sz = jk_map_size(src);
     int i;
-    for (i = 0; i < sz; i++) {
-        const char *name = jk_map_name_at(src, i);
-        if (jk_map_get(dst, name, NULL) == NULL) {
-            if (!jk_map_put(dst, name,
-                            apr_pstrdup(p, jk_map_get_string(src, name, NULL)),
-                            NULL)) {
-                jk_error_exit(APLOG_MARK, APLOG_EMERG, s, p, "Memory error");
-            }
+    const apr_array_header_t *arr;
+    const apr_table_entry_t *elts;
+
+    arr = apr_table_elts(src);
+    elts = (const apr_table_entry_t *)arr->elts;
+    for (i = 0; i < arr->nelts; ++i) {
+        if (!apr_table_get(dst, elts[i].key)) {
+            apr_table_setn(dst, elts[i].key, elts[i].val);
         }
     }
 }
 
+
 /** Standard apache callback, merge jk options specified in <Directory>
     context or <Host>.
  */
@@ -2455,49 +2538,38 @@
     if (!overrides->key_size_indicator)
         overrides->key_size_indicator = base->key_size_indicator;
 
-    if (!overrides->secret_key)
-        overrides->secret_key = base->secret_key;
-
     overrides->options |= (base->options & ~base->exclude_options);
 
-    if (base->envvars_in_use) {
-        int i;
-        const apr_array_header_t *arr;
-        const apr_table_entry_t *elts;
-
-        arr = apr_table_elts(base->envvars);
-        if (arr) {
-            overrides->envvars_in_use = JK_TRUE;
-            elts = (const apr_table_entry_t *)arr->elts;
-            for (i = 0; i < arr->nelts; ++i) {
-                if (!apr_table_get(overrides->envvars, elts[i].key)) {
-                    apr_table_setn(overrides->envvars, elts[i].key, elts[i].val);
-                }
-            }
+    if (base->envvars) {
+        if (overrides->envvars && overrides->envvars_has_own) {
+/* merge_apr_table() preserves existing entries in overrides table */
+            merge_apr_table(base->envvars, overrides->envvars);
+            merge_apr_table(base->envvars_def, overrides->envvars_def);
         }
-        arr = apr_table_elts(base->envvars_def);
-        if (arr) {
-            overrides->envvars_in_use = JK_TRUE;
-            elts = (const apr_table_entry_t *)arr->elts;
-            for (i = 0; i < arr->nelts; ++i) {
-                if (!apr_table_get(overrides->envvars_def, elts[i].key)) {
-                    apr_table_setn(overrides->envvars_def, elts[i].key, elts[i].val);
-                }
-            }
+        else {
+            overrides->envvars = base->envvars;
+            overrides->envvars_def = base->envvars_def;
+            overrides->envvar_items = base->envvar_items;
         }
     }
 
-    if (overrides->mount_file_reload == JK_UNSET)
-        overrides->mount_file_reload = base->mount_file_reload;
-    if (overrides->mountcopy) {
-        copy_jk_map(p, overrides->s, base->uri_to_context,
-                    overrides->uri_to_context);
-        copy_jk_map(p, overrides->s, base->automount, overrides->automount);
+    if (overrides->mountcopy == JK_UNSET && jk_mount_copy_all == JK_TRUE) {
+        overrides->mountcopy = JK_TRUE;
+    }
+    if (overrides->uri_to_context && overrides->mountcopy == JK_TRUE) {
+/* jk_map_copy() preserves existing entries in overrides map */
+        if (jk_map_copy(base->uri_to_context, overrides->uri_to_context) == JK_FALSE) {
+                jk_error_exit(APLOG_MARK, APLOG_EMERG, overrides->s, p, "Memory error");
+        }
         if (!overrides->mount_file)
             overrides->mount_file = base->mount_file;
+    }
+    if (overrides->mountcopy == JK_TRUE) {
         if (!overrides->alias_dir)
             overrides->alias_dir = base->alias_dir;
     }
+    if (overrides->mount_file_reload == JK_UNSET)
+        overrides->mount_file_reload = base->mount_file_reload;
     if (overrides->strip_session == JK_UNSET)
         overrides->strip_session = base->strip_session;
 
@@ -2629,10 +2701,10 @@
     if (jkl && flp) {
         jkl->log = jk_log_to_file;
         jkl->level = conf->log_level;
-        jk_set_time_fmt(jkl, conf->stamp_format_string);
         jkl->logger_private = flp;
         flp->jklogfp = conf->jklogfp;
         conf->log = jkl;
+        jk_set_time_fmt(conf->log, conf->stamp_format_string);
         if (main_log == NULL) {
             main_log = conf->log;
 
@@ -2641,8 +2713,6 @@
             /* Also should we pass pointer (ie: main_log) or handle (*main_log) ? */
             apr_pool_cleanup_register(p, &main_log, jklog_cleanup, jklog_cleanup);
         }
-        jk_log(conf->log, JK_LOG_DEBUG, "log time stamp format is '%s'",
-               conf->log->log_fmt);
 
         return 0;
     }
@@ -2670,11 +2740,8 @@
     JK_TRACE_ENTER(conf->log);
 
     if ((rc = jk_shm_attach(jk_shm_file, jk_shm_size, conf->log)) == 0) {
-        if (JK_IS_DEBUG_LEVEL(conf->log))
-            jk_log(conf->log, JK_LOG_DEBUG, "Attached shm:%s",
-                   jk_shm_name());
-            apr_pool_cleanup_register(pconf, conf->log, jk_cleanup_shmem,
-                                     jk_cleanup_shmem);
+        apr_pool_cleanup_register(pconf, conf->log, jk_cleanup_shmem,
+                                  jk_cleanup_shmem);
     }
     else
         jk_log(conf->log, JK_LOG_ERROR, "Attaching shm:%s errno=%d",
@@ -2701,30 +2768,10 @@
     int is_threaded;
     int mpm_threads = 1;
 
-    /*     jk_map_t *init_map = NULL; */
-    jk_map_t *init_map = conf->worker_properties;
+    if (!jk_worker_properties)
+        jk_map_alloc(&jk_worker_properties);
+    jk_map_put(jk_worker_properties, "ServerRoot", ap_server_root, NULL);
 
-#if !defined(WIN32) && !defined(NETWARE)
-    if (!jk_shm_file) {
-        jk_shm_file = ap_server_root_relative(pconf, JK_SHM_DEF_FILE);
-        if (jk_shm_file)
-            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
-                         "No JkShmFile defined in httpd.conf. "
-                         "Using default %s", jk_shm_file);
-    }
-#endif
-    if ((rc = jk_shm_open(jk_shm_file, jk_shm_size, conf->log)) == 0) {
-        if (JK_IS_DEBUG_LEVEL(conf->log))
-            jk_log(conf->log, JK_LOG_DEBUG, "Initialized shm:%s",
-                   jk_shm_name(), rc);
-            apr_pool_cleanup_register(pconf, conf->log, jk_cleanup_shmem,
-                                      jk_cleanup_shmem);
-    }
-    else
-        jk_log(conf->log, JK_LOG_ERROR,
-               "Initializing shm:%s errno=%d. Load balancing workers will not function properly.",
-               jk_shm_name(), rc);
-
     /* Set default connection cache size for multi-threaded MPMs */
     if (ap_mpm_query(AP_MPMQ_IS_THREADED, &is_threaded) == APR_SUCCESS &&
         is_threaded != AP_MPMQ_NOT_SUPPORTED) {
@@ -2737,32 +2784,59 @@
                mpm_threads);
     jk_set_worker_def_cache_size(mpm_threads);
 
-    if ((conf->worker_file != NULL) &&
-        !jk_map_read_properties(init_map, conf->worker_file, NULL,
+    if ((jk_worker_file != NULL) &&
+        !jk_map_read_properties(jk_worker_properties, jk_worker_file, NULL,
                                 JK_MAP_HANDLE_DUPLICATES, conf->log)) {
         ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
                      "Error in reading worker properties from '%s'",
-                     conf->worker_file);
+                     jk_worker_file);
         return JK_FALSE;
     }
 
-    if (jk_map_resolve_references(init_map, "worker.", 1, 1, conf->log) == JK_FALSE) {
+    if (jk_map_resolve_references(jk_worker_properties, "worker.",
+                                  1, 1, conf->log) == JK_FALSE) {
         ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
                      "Error in resolving configuration references");
         return JK_FALSE;
     }
 
+#if !defined(WIN32) && !defined(NETWARE)
+    if (!jk_shm_file) {
+        jk_shm_file = ap_server_root_relative(pconf, JK_SHM_DEF_FILE);
+        if (jk_shm_file)
+            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
+                         "No JkShmFile defined in httpd.conf. "
+                         "Using default %s", jk_shm_file);
+    }
+#endif
+    if (jk_shm_size == 0)
+        jk_shm_size = jk_shm_calculate_size(jk_worker_properties, conf->log);
+    else {
+        jk_log(conf->log, JK_LOG_WARNING,
+               "The optimal shared memory size can now be determined automatically.");
+        jk_log(conf->log, JK_LOG_WARNING,
+               "You can remove the JkShmSize directive if you want to use the optimal size.");
+    }
+    if ((rc = jk_shm_open(jk_shm_file, jk_shm_size, conf->log)) == 0) {
+        apr_pool_cleanup_register(pconf, conf->log, jk_cleanup_shmem,
+                                  jk_cleanup_shmem);
+    }
+    else
+        jk_log(conf->log, JK_LOG_ERROR,
+               "Initializing shm:%s errno=%d. Load balancing workers will not function properly.",
+               jk_shm_name(), rc);
+
     /* we add the URI->WORKER MAP since workers using AJP14
        will feed it */
     worker_env.uri_to_worker = conf->uw_map;
     worker_env.virtual = "*";   /* for now */
-#if (AP_MODULE_MAGIC_AT_LEAST(20060905,0))
+#if (AP_MODULE_MAGIC_AT_LEAST(20051115,4)) && !defined(API_COMPATIBILITY)
     worker_env.server_name = (char *)ap_get_server_description();
 #else
     worker_env.server_name = (char *)ap_get_server_version();
 #endif
 
-    if (wc_open(init_map, &worker_env, conf->log)) {
+    if (wc_open(jk_worker_properties, &worker_env, conf->log)) {
         ap_add_version_component(pconf, JK_EXPOSED_VERSION);
         jk_log(conf->log, JK_LOG_INFO,
                "%s initialized",
@@ -2805,36 +2879,59 @@
     }
 #endif
 
+    main_server = s;
     jk_log_fps = apr_hash_make(pconf);
 
     if (!s->is_virtual) {
         conf = (jk_server_conf_t *)ap_get_module_config(s->module_config,
                                                         &jk_module);
-        if (!conf->was_initialized) {
-            conf->was_initialized = JK_TRUE;
+        if (conf->was_initialized == JK_FALSE) {
             /* step through the servers and open each jk logfile
              * and do additional post config initialization.
              */
             for (; srv; srv = srv->next) {
                 jk_server_conf_t *sconf = (jk_server_conf_t *)ap_get_module_config(srv->module_config,
                                                                                    &jk_module);
-                if (open_jklog(srv, pconf))
-                    return HTTP_INTERNAL_SERVER_ERROR;
-                if (sconf) {
+
+/*
+ * If a virtual server contains no JK directive, httpd shares
+ * the config structure. But we don't want to share some settings
+ * by default, especially the JkMount rules.
+ * Therefore we check, if this config structure really belongs to this
+ * vhost, otherwise we create a new one and merge.
+ */
+                if (sconf && sconf->s != srv) {
+                    jk_server_conf_t *srvconf = (jk_server_conf_t *)create_jk_config(pconf, srv);
+                    sconf = (jk_server_conf_t *)merge_jk_config(pconf, sconf, srvconf);
+                    ap_set_module_config(srv->module_config, &jk_module, sconf);
+
+                }
+
+                if (sconf && sconf->was_initialized == JK_FALSE) {
+                    sconf->was_initialized = JK_TRUE;
+                    if (open_jklog(srv, pconf))
+                        return HTTP_INTERNAL_SERVER_ERROR;
                     sconf->options &= ~sconf->exclude_options;
-                    if (!uri_worker_map_alloc(&(sconf->uw_map),
-                                              sconf->uri_to_context, sconf->log))
-                        jk_error_exit(APLOG_MARK, APLOG_EMERG, srv,
-                                      srv->process->pool, "Memory error");
-                    if (sconf->options & JK_OPT_REJECTUNSAFE)
-                        sconf->uw_map->reject_unsafe = 1;
-                    else
-                        sconf->uw_map->reject_unsafe = 0;
-                    if (sconf->mount_file) {
-                        sconf->uw_map->fname = sconf->mount_file;
-                        sconf->uw_map->reload = sconf->mount_file_reload;
-                        uri_worker_map_load(sconf->uw_map, sconf->log);
+                    if (sconf->uri_to_context) {
+                        if (!uri_worker_map_alloc(&(sconf->uw_map),
+                                                  sconf->uri_to_context, sconf->log))
+                            jk_error_exit(APLOG_MARK, APLOG_EMERG, srv,
+                                          srv->process->pool, "Memory error");
+                        if (sconf->options & JK_OPT_REJECTUNSAFE)
+                            sconf->uw_map->reject_unsafe = 1;
+                        else
+                            sconf->uw_map->reject_unsafe = 0;
+                        if (sconf->mount_file) {
+                            sconf->uw_map->fname = sconf->mount_file;
+                            sconf->uw_map->reload = sconf->mount_file_reload;
+                            uri_worker_map_load(sconf->uw_map, sconf->log);
+                        }
                     }
+                    else {
+                        if (sconf->mountcopy == JK_TRUE) {
+                            sconf->uw_map = conf->uw_map;
+                        }
+                    }
                     if (sconf->format_string) {
                         sconf->format =
                             parse_request_log_string(pconf, sconf->format_string, &err_string);
@@ -2842,7 +2939,7 @@
                             ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
                                          "JkRequestLogFormat format array NULL");
                     }
-                    if (sconf->envvars_in_use) {
+                    if (sconf->envvars && sconf->envvars_has_own) {
                         int i;
                         const apr_array_header_t *arr;
                         const apr_table_entry_t *elts;
@@ -2871,8 +2968,18 @@
                     }
                 }
             }
+            conf->was_initialized = JK_TRUE;
             if (init_jk(pconf, conf, s) == JK_FALSE)
                 return HTTP_INTERNAL_SERVER_ERROR;
+            if (conf->uw_map)
+                uri_worker_map_ext(conf->uw_map, conf->log);
+            for (srv = s; srv; srv = srv->next) {
+                jk_server_conf_t *sconf = (jk_server_conf_t *)ap_get_module_config(srv->module_config,
+                                                                                   &jk_module);
+                if (conf->uw_map != sconf->uw_map && sconf->uw_map)
+                    uri_worker_map_ext(sconf->uw_map, sconf->log);
+            }
+
         }
     }
 
@@ -2884,6 +2991,10 @@
  */
 static int jk_translate(request_rec * r)
 {
+    rule_extension_t **ext = apr_palloc(r->pool, sizeof(rule_extension_t *));
+    *ext = NULL;
+    ap_set_module_config(r->request_config, &jk_module, ext);
+
     if (!r->proxyreq) {
         jk_server_conf_t *conf =
             (jk_server_conf_t *) ap_get_module_config(r->server->
@@ -2946,9 +3057,21 @@
                     return DECLINED;
                 }
             }
+            if (!conf->uw_map) {
+                if (JK_IS_DEBUG_LEVEL(conf->log))
+                    jk_log(conf->log, JK_LOG_DEBUG,
+                           "missing uri map for %s:%s",
+                           conf->s->server_hostname ? conf->s->server_hostname : "_default_",
+                           r->uri);
+                return DECLINED;
+            }
+            else {
+                rule_extension_t *e;
+                worker = map_uri_to_worker_ext(conf->uw_map, r->uri,
+                                               NULL, &e, conf->log);
+                ap_set_module_config(r->request_config, &jk_module, e);
+            }
 
-            worker = map_uri_to_worker(conf->uw_map, r->uri, conf->log);
-
             if (worker) {
                 r->handler = apr_pstrdup(r->pool, JK_HANDLER);
                 apr_table_setn(r->notes, JK_NOTE_WORKER_NAME, worker);
@@ -3051,6 +3174,12 @@
                     }
                 }
             }
+            else {
+                if (JK_IS_DEBUG_LEVEL(conf->log))
+                    jk_log(conf->log, JK_LOG_DEBUG,
+                           "no match for %s found",
+                           r->uri);
+            }
         }
     }
 
@@ -3088,9 +3217,21 @@
 
                 return DECLINED;
             }
+            if (!conf->uw_map) {
+                if (JK_IS_DEBUG_LEVEL(conf->log))
+                    jk_log(conf->log, JK_LOG_DEBUG,
+                           "missing uri map for %s:%s",
+                           conf->s->server_hostname ? conf->s->server_hostname : "_default_",
+                           r->uri);
+                return DECLINED;
+            }
+            else {
+                rule_extension_t *e;
+                worker = map_uri_to_worker_ext(conf->uw_map, r->uri,
+                                               NULL, &e, conf->log);
+                ap_set_module_config(r->request_config, &jk_module, e);
+            }
 
-            worker = map_uri_to_worker(conf->uw_map, r->uri, conf->log);
-
             if (worker) {
                 r->handler = apr_pstrdup(r->pool, JK_HANDLER);
                 apr_table_setn(r->notes, JK_NOTE_WORKER_NAME, worker);
@@ -3100,24 +3241,30 @@
                     apr_table_setn(r->main->notes, JK_NOTE_WORKER_NAME, worker);
 
             }
-            else if (conf->strip_session == JK_TRUE) {
-                char *jsessionid;
-                if (r->uri) {
-                    jsessionid = strstr(r->uri, JK_PATH_SESSION_IDENTIFIER);
-                    if (jsessionid) {
-                        if (JK_IS_DEBUG_LEVEL(conf->log))
-                            jk_log(conf->log, JK_LOG_DEBUG,
-                                   "removing session identifier [%s] for non servlet url [%s]",
-                                   jsessionid, r->uri);
-                        *jsessionid = '\0';
+            else {
+                if (JK_IS_DEBUG_LEVEL(conf->log))
+                    jk_log(conf->log, JK_LOG_DEBUG,
+                           "no match for %s found",
+                           r->uri);
+                if (conf->strip_session == JK_TRUE) {
+                    char *jsessionid;
+                    if (r->uri) {
+                        jsessionid = strstr(r->uri, JK_PATH_SESSION_IDENTIFIER);
+                        if (jsessionid) {
+                            if (JK_IS_DEBUG_LEVEL(conf->log))
+                                jk_log(conf->log, JK_LOG_DEBUG,
+                                       "removing session identifier [%s] for non servlet url [%s]",
+                                       jsessionid, r->uri);
+                            *jsessionid = '\0';
+                        }
                     }
+                    if (r->filename) {
+                        jsessionid = strstr(r->filename, JK_PATH_SESSION_IDENTIFIER);
+                        if (jsessionid)
+                            *jsessionid = '\0';
+                    }
+                    return DECLINED;
                 }
-                if (r->filename) {
-                    jsessionid = strstr(r->filename, JK_PATH_SESSION_IDENTIFIER);
-                    if (jsessionid)
-                        *jsessionid = '\0';
-                }
-                return DECLINED;
             }
         }
     }

Modified: trunk/tomcat5.5/connectors/jk/native/build.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,21 @@
 <?xml version="1.0" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
+
 <project name="jk_native" default="main" basedir=".">
 
   <description>Build the native component of jk.</description>

Modified: trunk/tomcat5.5/connectors/jk/native/buildconf.sh
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/buildconf.sh	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/buildconf.sh	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,21 @@
 #!/bin/sh
 
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+
 echo "rm autom4te.cache"
 rm -rf autom4te.cache
 

Modified: trunk/tomcat5.5/connectors/jk/native/common/Makefile.in
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/Makefile.in	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/Makefile.in	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 #### XXXX DO we need this Makefile ????
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@

Modified: trunk/tomcat5.5/connectors/jk/native/common/ap_snprintf.h
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/ap_snprintf.h	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/ap_snprintf.h	2008-04-06 12:38:06 UTC (rev 6107)
@@ -67,8 +67,8 @@
 /* ap_vformatter() is a generic printf-style formatting routine
  * with some extensions.  The extensions are:
  *
- * %pA	takes a struct in_addr *, and prints it as a.b.c.d
- * %pI	takes a struct sockaddr_in * and prints it as a.b.c.d:port
+ * %pA  takes a struct in_addr *, and prints it as a.b.c.d
+ * %pI  takes a struct sockaddr_in * and prints it as a.b.c.d:port
  * %pp  takes a void * and outputs it in hex
  *
  * The %p hacks are to force gcc's printf warning code to skip
@@ -147,4 +147,4 @@
 }
 #endif
 
-#endif	/* !APACHE_AP_SNPRINTF_H */
+#endif  /* !APACHE_AP_SNPRINTF_H */

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_ajp12_worker.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_ajp12_worker.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_ajp12_worker.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -20,7 +20,7 @@
  *              This worker is deprecated                                  *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
  * Based on:    jserv_ajpv12.c from Jserv                                  *
- * Version:     $Revision: 559467 $                                          *
+ * Version:     $Revision: 609760 $                                          *
  ***************************************************************************/
 
 #include "jk_ajp12_worker.h"
@@ -84,6 +84,19 @@
 static int ajpv12_handle_request(ajp12_endpoint_t * p,
                                  jk_ws_service_t *s, jk_logger_t *l);
 
+/*
+ * Return values of service() method for ajp12 worker:
+ * return value  is_error              reason
+ * JK_FALSE      JK_HTTP_SERVER_ERROR  Invalid parameters (null values)
+ *                                     Error during connect to the backend
+ *                                     ajpv12_handle_request() returns false:
+ *           Any error during reading a request body from the client or
+ *           sending the request to the backend
+ * JK_FALSE      JK_HTTP_OK            ajpv12_handle_response() returns false:
+ *           Any error during reading parts of response from backend or
+ *           sending to client
+ * JK_TRUE       JK_HTTP_OK            All other cases
+ */
 static int JK_METHOD service(jk_endpoint_t *e,
                              jk_ws_service_t *s,
                              jk_logger_t *l, int *is_error)
@@ -114,7 +127,7 @@
          attempt++) {
         p->sd =
             jk_open_socket(&p->worker->worker_inet_addr,
-                           JK_FALSE, -1, 0, l);
+                           JK_FALSE, 0, 0, l);
 
         jk_log(l, JK_LOG_DEBUG, "In jk_endpoint_t::service, sd = %d",
                p->sd);
@@ -147,7 +160,7 @@
     if (e && *e && (*e)->endpoint_private) {
         ajp12_endpoint_t *p = (*e)->endpoint_private;
         if (IS_VALID_SOCKET(p->sd)) {
-            jk_shutdown_socket(p->sd);
+            jk_shutdown_socket(p->sd, l);
         }
         free(p);
         *e = NULL;
@@ -179,7 +192,7 @@
                p->name, host, port);
 
         if (port > 1024 && host) {
-            if (jk_resolve(host, port, &p->worker_inet_addr)) {
+            if (jk_resolve(host, port, &p->worker_inet_addr, l)) {
                 return JK_TRUE;
             }
             jk_log(l, JK_LOG_ERROR,
@@ -267,7 +280,6 @@
                 private_data->worker.get_endpoint = get_endpoint;
                 private_data->worker.destroy = destroy;
                 private_data->worker.maintain = NULL;
-                private_data->worker.retries = JK_RETRIES;
 
                 *w = &private_data->worker;
                 return JK_AJP12_WORKER_TYPE;
@@ -527,7 +539,7 @@
         char *line = NULL;
         char *name = NULL;
         char *value = NULL;
-#ifdef _REENTRANT
+#ifdef _MT_CODE_PTHREAD
         char *lasts;
 #endif
 
@@ -575,7 +587,7 @@
         jk_log(l, JK_LOG_DEBUG, "ajpv12_handle_response, read %s=%s", name,
                value);
         if (0 == strcmp("Status", name)) {
-#ifdef _REENTRANT
+#ifdef _MT_CODE_PTHREAD
             char *numeric = strtok_r(value, " \t", &lasts);
 #else
             char *numeric = strtok(value, " \t");
@@ -587,7 +599,7 @@
                        "ajpv12_handle_response, invalid status code");
                 return JK_FALSE;
             }
-#ifdef _REENTRANT
+#ifdef _MT_CODE_PTHREAD
             reason = jk_pool_strdup(s->pool, strtok_r(NULL, " \t", &lasts));
 #else
             reason = jk_pool_strdup(s->pool, strtok(NULL, " \t"));

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_ajp13_worker.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_ajp13_worker.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_ajp13_worker.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -20,7 +20,7 @@
  * Author:      Costin <costin at costin.dnt.ro>                              *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
  * Author:      Henri Gomez <hgomez at apache.org>                            *
- * Version:     $Revision: 466585 $                                          *
+ * Version:     $Revision: 611589 $                                          *
  ***************************************************************************/
 
 #include "jk_ajp13_worker.h"
@@ -44,12 +44,8 @@
                           jk_worker_env_t *we, jk_logger_t *l)
 {
     int rc;
-    ajp_worker_t *aw = ( ajp_worker_t *)pThis->worker_private;
     JK_TRACE_ENTER(l);
 
-    pThis->retries = jk_get_worker_retries(props, aw->name,
-                                           JK_RETRIES);
-
     rc = ajp_init(pThis, props, we, l, AJP13_PROTO);
     JK_TRACE_EXIT(l);
     return rc;
@@ -82,39 +78,17 @@
     ajp_worker_t *aw;
 
     JK_TRACE_ENTER(l);
-    if (name == NULL || w == NULL) {
-        JK_LOG_NULL_PARAMS(l);
-        JK_TRACE_EXIT(l);
+    if (ajp_worker_factory(w, name, l) == JK_FALSE)
         return 0;
-    }
 
-    aw = (ajp_worker_t *) calloc(1, sizeof(ajp_worker_t));
-    if (!aw) {
-        jk_log(l, JK_LOG_ERROR,
-               "malloc of private_data failed");
-        JK_TRACE_EXIT(l);
-        return 0;
-    }
-
-    aw->name = name;
+    aw = (*w)->worker_private;
     aw->proto = AJP13_PROTO;
-    aw->login = NULL;
 
-    aw->ep_cache_sz = 0;
-    aw->ep_cache = NULL;
-    aw->connect_retry_attempts = AJP_DEF_RETRY_ATTEMPTS;
-    aw->worker.worker_private = aw;
-
     aw->worker.validate = validate;
     aw->worker.init = init;
     aw->worker.get_endpoint = get_endpoint;
     aw->worker.destroy = destroy;
-    aw->worker.maintain = ajp_maintain;
-    aw->worker.retries = JK_RETRIES;
 
-    aw->logon = NULL;           /* No Logon on AJP13 */
-
-    *w = &aw->worker;
     JK_TRACE_EXIT(l);
     return JK_AJP13_WORKER_TYPE;
 }

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_ajp14_worker.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_ajp14_worker.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_ajp14_worker.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -18,7 +18,7 @@
 /***************************************************************************
  * Description: AJP14 next generation Bi-directional protocol.             *
  * Author:      Henri Gomez <hgomez at apache.org>                            *
- * Version:     $Revision: 478210 $                                          *
+ * Version:     $Revision: 611589 $                                          *
  ***************************************************************************/
 
 #include "jk_context.h"
@@ -307,8 +307,6 @@
         return JK_FALSE;
     }
     aw = pThis->worker_private;
-    pThis->retries = jk_get_worker_retries(props, aw->name,
-                                           JK_RETRIES);
 
     /* Set Secret Key (used at logon time) */
     aw->login->secret_key = jk_get_worker_secret_key(props, aw->name);
@@ -373,31 +371,10 @@
     ajp_worker_t *aw;
 
     JK_TRACE_ENTER(l);
-
-    if (name == NULL || w == NULL) {
-        JK_LOG_NULL_PARAMS(l);
-        JK_TRACE_EXIT(l);
+    if (ajp_worker_factory(w, name, l) == JK_FALSE)
         return 0;
-    }
 
-    aw = (ajp_worker_t *) calloc(1, sizeof(ajp_worker_t));
-    if (!aw) {
-        jk_log(l, JK_LOG_ERROR,
-               "malloc of private data failed");
-       JK_TRACE_EXIT(l);
-       return 0;
-    }
-
-    aw->name = strdup(name);
-
-    if (!aw->name) {
-        free(aw);
-        jk_log(l, JK_LOG_ERROR,
-               "malloc failed for name");
-        JK_TRACE_EXIT(l);
-        return 0;
-    }
-
+    aw = (*w)->worker_private;
     aw->proto = AJP14_PROTO;
 
     aw->login = (jk_login_service_t *)malloc(sizeof(jk_login_service_t));
@@ -415,20 +392,12 @@
         (AJP14_CONTEXT_INFO_NEG | AJP14_PROTO_SUPPORT_AJP14_NEG);
     aw->login->web_server_name = NULL;  /* must be set in init */
 
-    aw->ep_cache_sz = 0;
-    aw->ep_cache = NULL;
-    aw->connect_retry_attempts = AJP_DEF_RETRY_ATTEMPTS;
-    aw->worker.worker_private = aw;
-
     aw->worker.validate = validate;
     aw->worker.init = init;
     aw->worker.get_endpoint = get_endpoint;
     aw->worker.destroy = destroy;
-    aw->worker.maintain = ajp_maintain;
-    aw->worker.retries = JK_RETRIES;
 
     aw->logon = logon;          /* LogOn Handler for AJP14 */
-    *w = &aw->worker;
 
     JK_TRACE_EXIT(l);
     return JK_AJP14_WORKER_TYPE;

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_ajp_common.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_ajp_common.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_ajp_common.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -19,7 +19,7 @@
  * Description: common stuff for bi-directional protocols ajp13/ajp14.     *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
  * Author:      Henri Gomez <hgomez at apache.org>                            *
- * Version:     $Revision: 562194 $                                          *
+ * Version:     $Revision: 613546 $                                          *
  ***************************************************************************/
 
 
@@ -61,6 +61,15 @@
     return rc;
 }
 
+static const char *ajp_state_type[] = {
+    JK_AJP_STATE_TEXT_IDLE,
+    JK_AJP_STATE_TEXT_OK,
+    JK_AJP_STATE_TEXT_ERROR,
+    JK_AJP_STATE_TEXT_PROBE,
+    "unknown",
+    NULL
+};
+
 #define UNKNOWN_METHOD (-1)
 
 static int sc_for_req_method(const char *method, size_t len)
@@ -246,7 +255,7 @@
     const char *p = header_name;
     int i = 0;
 
-    /* ACCEPT-LANGUAGE is the longest headeer
+    /* ACCEPT-LANGUAGE is the longest header
      * that is of interest.
      */
     if (len < 4 || len > 15)
@@ -260,18 +269,20 @@
     header[i] = '\0';
     p = &header[1];
 
+/* Always do memcmp including the final \0-termination character.
+ */
     switch (header[0]) {
         case 'A':
-            if (memcmp(p, "CCEPT", 5) == 0) {
+            if (memcmp(p, "CCEPT", 6) == 0) {
                 if (!header[6])
                     return SC_ACCEPT;
                 else if (header[6] == '-') {
                     p += 6;
-                    if (memcmp(p, "CHARSET", 7) == 0)
+                    if (memcmp(p, "CHARSET", 8) == 0)
                         return SC_ACCEPT_CHARSET;
-                    else if (memcmp(p,  "ENCODING", 8) == 0)
+                    else if (memcmp(p,  "ENCODING", 9) == 0)
                         return SC_ACCEPT_ENCODING;
-                    else if (memcmp(p, "LANGUAGE", 8) == 0)
+                    else if (memcmp(p, "LANGUAGE", 9) == 0)
                         return SC_ACCEPT_LANGUAGE;
                     else
                         return UNKNOWN_METHOD;
@@ -279,45 +290,45 @@
                 else
                     return UNKNOWN_METHOD;
             }
-            else if (memcmp(p, "UTHORIZATION", 12) == 0)
+            else if (memcmp(p, "UTHORIZATION", 13) == 0)
                 return SC_AUTHORIZATION;
             else
                 return UNKNOWN_METHOD;
         break;
         case 'C':
-            if(memcmp(p, "OOKIE2", 6) == 0)
+            if(memcmp(p, "OOKIE2", 7) == 0)
                 return SC_COOKIE2;
-            else if (memcmp(p, "OOKIE", 5) == 0)
+            else if (memcmp(p, "OOKIE", 6) == 0)
                 return SC_COOKIE;
-            else if(memcmp(p, "ONNECTION", 9) == 0)
+            else if(memcmp(p, "ONNECTION", 10) == 0)
                 return SC_CONNECTION;
-            else if(memcmp(p, "ONTENT-TYPE", 11) == 0)
+            else if(memcmp(p, "ONTENT-TYPE", 12) == 0)
                 return SC_CONTENT_TYPE;
-            else if(memcmp(p, "ONTENT-LENGTH", 13) == 0)
+            else if(memcmp(p, "ONTENT-LENGTH", 14) == 0)
                 return SC_CONTENT_LENGTH;
             else
                 return UNKNOWN_METHOD;
         break;
         case 'H':
-            if(memcmp(p, "OST", 3) == 0)
+            if(memcmp(p, "OST", 4) == 0)
                 return SC_HOST;
             else
                 return UNKNOWN_METHOD;
         break;
         case 'P':
-            if(memcmp(p, "RAGMA", 5) == 0)
+            if(memcmp(p, "RAGMA", 6) == 0)
                 return SC_PRAGMA;
             else
                 return UNKNOWN_METHOD;
         break;
         case 'R':
-            if(memcmp(p, "EFERER", 6) == 0)
+            if(memcmp(p, "EFERER", 7) == 0)
                 return SC_REFERER;
             else
                 return UNKNOWN_METHOD;
         break;
         case 'U':
-            if(memcmp(p, "SER-AGENT", 9) == 0)
+            if(memcmp(p, "SER-AGENT", 10) == 0)
                 return SC_USER_AGENT;
             else
                 return UNKNOWN_METHOD;
@@ -328,7 +339,31 @@
     /* NOTREACHED */
 }
 
+/* Return the string representation of the worker state */
+const char *jk_ajp_get_state(ajp_worker_t *aw, jk_logger_t *l)
+{
+    return ajp_state_type[aw->s->state];
+}
 
+/* Return the int representation of the worker state */
+int jk_ajp_get_state_code(const char *v)
+{
+    if (!v)
+        return JK_AJP_STATE_DEF;
+    else if  (*v == 'i' || *v == 'I' || *v == 'n' || *v == 'N' || *v == '0')
+        return JK_AJP_STATE_IDLE;
+    else if  (*v == 'o' || *v == 'O' || *v == '1')
+        return JK_AJP_STATE_OK;
+    else if  (*v == 'e' || *v == 'E' || *v == '4')
+        return JK_AJP_STATE_ERROR;
+    else if  (*v == 'p' || *v == 'P' || *v == '6')
+        return JK_AJP_STATE_PROBE;
+    else
+        return JK_AJP_STATE_DEF;
+}
+
+
+
 /*
  * Message structure
  *
@@ -585,9 +620,9 @@
 {
     jk_pool_t *p = &ae->pool;
 
-    d->status = jk_b_get_int(msg);
     JK_TRACE_ENTER(l);
 
+    d->status = jk_b_get_int(msg);
     if (!d->status) {
         jk_log(l, JK_LOG_ERROR,
                "NULL status");
@@ -683,14 +718,18 @@
 
 static void ajp_reset_endpoint(ajp_endpoint_t * ae, jk_logger_t *l)
 {
+    JK_TRACE_ENTER(l);
+
+    if (JK_IS_DEBUG_LEVEL(l))
+        jk_log(l, JK_LOG_DEBUG,
+        "(%s) resetting endpoint with sd = %u %s",
+         ae->worker->name, ae->sd, ae->reuse? "" : "(socket shutdown)");
     if (IS_VALID_SOCKET(ae->sd) && !ae->reuse) {
-        jk_shutdown_socket(ae->sd);
-        if (JK_IS_DEBUG_LEVEL(l))
-            jk_log(l, JK_LOG_DEBUG,
-            "reset socket with sd = %u", ae->sd );
+        jk_shutdown_socket(ae->sd, l);
         ae->sd = JK_INVALID_SOCKET;
     }
     jk_reset_pool(&(ae->pool));
+    JK_TRACE_EXIT(l);
 }
 
 /*
@@ -701,36 +740,43 @@
 {
     JK_TRACE_ENTER(l);
 
+    if (JK_IS_DEBUG_LEVEL(l))
+        jk_log(l, JK_LOG_DEBUG,
+        "closing endpoint with sd = %u %s",
+         ae->sd, ae->reuse? "" : "(socket shutdown)");
     if (IS_VALID_SOCKET(ae->sd)) {
-        jk_shutdown_socket(ae->sd);
-        if (JK_IS_DEBUG_LEVEL(l))
-            jk_log(l, JK_LOG_DEBUG,
-                   "closed socket with sd = %d", ae->sd);
+        jk_shutdown_socket(ae->sd, l);
         ae->sd = JK_INVALID_SOCKET;
     }
-
     jk_close_pool(&(ae->pool));
     free(ae);
     JK_TRACE_EXIT(l);
 }
 
 
-/*
- * Try another connection from cache
+/** Steal a connection from an idle cache endpoint
+ * @param ae   endpoint that needs a new connection
+ * @param l    logger
+ * @return     JK_FALSE: failure
+ *             JK_TRUE: success
+ * @remark     Always closes old socket endpoint
  */
-
-static void ajp_next_connection(ajp_endpoint_t *ae, jk_logger_t *l)
+static int ajp_next_connection(ajp_endpoint_t *ae, jk_logger_t *l)
 {
     int rc;
+    int ret = JK_FALSE;
     ajp_worker_t *aw = ae->worker;
-    jk_sock_t sock;
 
+    JK_TRACE_ENTER(l);
+
+    /* Close previous socket */
+    if (IS_VALID_SOCKET(ae->sd))
+        jk_shutdown_socket(ae->sd, l);
+    /* Mark existing endpoint socket as closed */
+    ae->sd = JK_INVALID_SOCKET;
     JK_ENTER_CS(&aw->cs, rc);
     if (rc) {
         unsigned int i;
-        sock = ae->sd;
-        /* Mark existing endpoint socket as closed */
-        ae->sd = JK_INVALID_SOCKET;
         for (i = 0; i < aw->ep_cache_sz; i++) {
             /* Find cache slot with usable socket */
             if (aw->ep_cache[i] && IS_VALID_SOCKET(aw->ep_cache[i]->sd)) {
@@ -740,61 +786,35 @@
             }
         }
         JK_LEAVE_CS(&aw->cs, rc);
-        /* Close previous socket */
-        if (IS_VALID_SOCKET(sock))
-            jk_shutdown_socket(sock);
+        if (IS_VALID_SOCKET(ae->sd)) {
+            ret = JK_TRUE;
+            if (JK_IS_DEBUG_LEVEL(l))
+                jk_log(l, JK_LOG_DEBUG,
+                       "(%s) Will try pooled connection sd = %d from slot %d",
+                        ae->worker->name, ae->sd, i);
+        }
     }
+    JK_TRACE_EXIT(l);
+    return ret;
 }
 
-/*
- * Wait input event on ajp_endpoint for timeout ms
+/** Handle the cping/cpong query
+ * @param ae       endpoint
+ * @param timeout  wait timeout in milliseconds
+ * @param l        logger
+ * @return         JK_FALSE: failure
+ *                 JK_TRUE: success
+ * @remark         Always closes socket in case of
+ *                 a socket error
  */
-static int ajp_is_input_event(ajp_endpoint_t * ae, int timeout, jk_logger_t *l)
-{
-    fd_set rset;
-    struct timeval tv;
-    int rc;
-
-    FD_ZERO(&rset);
-    FD_SET(ae->sd, &rset);
-    tv.tv_sec = timeout / 1000;
-    tv.tv_usec = (timeout % 1000) * 1000;
-
-    do {
-        rc = select((int)ae->sd + 1, &rset, NULL, NULL, &tv);
-    } while (rc < 0 && errno == EINTR);
-
-    ae->last_errno = 0;
-    if (rc == 0) {
-        /* Timeout. Set the errno to timeout */
-#if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
-        errno = WSAETIMEDOUT - WSABASEERR;
-#else
-        errno = ETIMEDOUT;
-#endif
-        ae->last_errno = errno;
-        return JK_FALSE;
-    }
-    else if (rc < 0) {
-        ae->last_errno = errno;
-        jk_log(l, JK_LOG_WARNING,
-               "error during select (errno=%d)", ae->last_errno);
-        return JK_FALSE;
-    }
-    else
-        return JK_TRUE;
-}
-
-
-/*
- * Handle the CPING/CPONG initial query
- */
 static int ajp_handle_cping_cpong(ajp_endpoint_t * ae, int timeout, jk_logger_t *l)
 {
     int cmd;
     jk_msg_buf_t *msg;
 
     JK_TRACE_ENTER(l);
+
+    ae->last_errno = 0;
     msg = jk_b_new(&ae->pool);
     if (!msg) {
         jk_log(l, JK_LOG_ERROR,
@@ -821,8 +841,12 @@
 
     /* wait for Pong reply for timeout milliseconds
      */
-    if (ajp_is_input_event(ae, timeout, l) == JK_FALSE) {
-        jk_log(l, JK_LOG_INFO, "timeout in reply pong");
+    if (jk_is_input_event(ae->sd, timeout, l) == JK_FALSE) {
+        ae->last_errno = errno;
+        jk_log(l, JK_LOG_INFO, "timeout in reply cpong");
+        /* We can't trust this connection any more. */
+        jk_shutdown_socket(ae->sd, l);
+        ae->sd = JK_INVALID_SOCKET;
         JK_TRACE_EXIT(l);
         return JK_FALSE;
     }
@@ -837,9 +861,12 @@
     }
 
     if ((cmd = jk_b_get_byte(msg)) != AJP13_CPONG_REPLY) {
-        jk_log(l, JK_LOG_INFO,
+        jk_log(l, JK_LOG_WARNING,
                "awaited reply cpong, received %d instead",
                cmd);
+        /* We can't trust this connection any more. */
+        jk_shutdown_socket(ae->sd, l);
+        ae->sd = JK_INVALID_SOCKET;
         JK_TRACE_EXIT(l);
         return JK_FALSE;
     }
@@ -848,6 +875,15 @@
     return JK_TRUE;
 }
 
+/** Connect an endpoint to a backend
+ * @param ae       endpoint
+ * @param l        logger
+ * @return         JK_FALSE: failure
+ *                 JK_TRUE: success
+ * @remark         Always closes socket in case of
+ *                 a socket error
+ * @remark         Cares about ae->last_errno
+ */
 int ajp_connect_to_endpoint(ajp_endpoint_t * ae, jk_logger_t *l)
 {
     char buf[32];
@@ -855,56 +891,120 @@
 
     JK_TRACE_ENTER(l);
 
+    ae->last_errno = 0;
     ae->sd = jk_open_socket(&ae->worker->worker_inet_addr,
                             ae->worker->keepalive,
                             ae->worker->socket_timeout,
                             ae->worker->socket_buf, l);
-    if (IS_VALID_SOCKET(ae->sd)) {
-        ae->last_errno = 0;
-        if (JK_IS_DEBUG_LEVEL(l)) {
-            jk_log(l, JK_LOG_DEBUG,
-                   "Connected socket %d to (%s)",
-                   ae->sd,
-                   jk_dump_hinfo(&ae->worker->worker_inet_addr, buf));
-        }
-        /* set last_access only if needed */
-        if (ae->worker->cache_timeout > 0)
-            ae->last_access = time(NULL);
-        /* Check if we must execute a logon after the physical connect */
-        if (ae->worker->logon != NULL) {
-            rc = ae->worker->logon(ae, l);
-            JK_TRACE_EXIT(l);
-            return rc;
-        }
-        /* should we send a CPING to validate connection ? */
-        if (ae->worker->connect_timeout > 0) {
-            rc = ajp_handle_cping_cpong (ae,
-                        ae->worker->connect_timeout, l);
-            JK_TRACE_EXIT(l);
-            return rc;
-        }
+
+    if (!IS_VALID_SOCKET(ae->sd)) {
+        ae->last_errno = errno;
+        jk_log(l, JK_LOG_INFO,
+               "Failed opening socket to (%s) (errno=%d)",
+               jk_dump_hinfo(&ae->worker->worker_inet_addr, buf), ae->last_errno);
         JK_TRACE_EXIT(l);
-        return JK_TRUE;
+        return JK_FALSE;
     }
-    ae->last_errno = errno;
 
-    jk_log(l, JK_LOG_INFO,
-           "Failed opening socket to (%s) (errno=%d)",
-           jk_dump_hinfo(&ae->worker->worker_inet_addr, buf), ae->last_errno);
+    ae->last_errno = 0;
+    if (JK_IS_DEBUG_LEVEL(l)) {
+        jk_log(l, JK_LOG_DEBUG,
+               "Connected socket %d to (%s)",
+               ae->sd,
+               jk_dump_hinfo(&ae->worker->worker_inet_addr, buf));
+    }
+    /* set last_access only if needed */
+    if (ae->worker->cache_timeout > 0)
+        ae->last_access = time(NULL);
+    /* Check if we must execute a logon after the physical connect */
+    /* XXX: Not sure, if we really should do logon before cping/cpong */
+    /* XXX: and if no cping/cpong is allowed before or after logon. */
+    if (ae->worker->logon != NULL) {
+        rc = ae->worker->logon(ae, l);
+        if (rc == JK_FALSE) {
+            jk_log(l, JK_LOG_ERROR,
+                   "(%s) ajp14 worker logon to the backend server failed",
+                   ae->worker->name);
+            /* Close the socket if unable to logon */
+            jk_shutdown_socket(ae->sd, l);
+            ae->sd = JK_INVALID_SOCKET;
+        }
+    }
+    /* XXX: Should we send a cping also after logon to validate the connection? */
+    else if (ae->worker->connect_timeout > 0) {
+        rc = ajp_handle_cping_cpong(ae, ae->worker->connect_timeout, l);
+        if (rc == JK_FALSE)
+            jk_log(l, JK_LOG_ERROR,
+                   "(%s) cping/cpong after connecting to the backend server failed (errno=%d)",
+                   ae->worker->name, ae->last_errno);
+    }
     JK_TRACE_EXIT(l);
-    return JK_FALSE;
+    return rc;
 }
 
-/*
- * Send a message to endpoint, using corresponding PROTO HEADER
+/* Syncing config values from shm */
+void jk_ajp_pull(ajp_worker_t * aw, jk_logger_t *l)
+{
+    JK_TRACE_ENTER(l);
+
+    if (JK_IS_DEBUG_LEVEL(l))
+        jk_log(l, JK_LOG_DEBUG,
+               "syncing mem for ajp worker '%s' from shm",
+               aw->name);
+
+    aw->cache_timeout = aw->s->cache_timeout;
+    aw->connect_timeout = aw->s->connect_timeout;
+    aw->reply_timeout = aw->s->reply_timeout;
+    aw->prepost_timeout = aw->s->prepost_timeout;
+    aw->recovery_opts = aw->s->recovery_opts;
+    aw->retries = aw->s->retries;
+    aw->max_packet_size = aw->s->max_packet_size;
+    aw->sequence = aw->s->h.sequence;
+
+    JK_TRACE_EXIT(l);
+}
+
+/* Syncing config values to shm */
+void jk_ajp_push(ajp_worker_t * aw, jk_logger_t *l)
+{
+    JK_TRACE_ENTER(l);
+
+    if (JK_IS_DEBUG_LEVEL(l))
+        jk_log(l, JK_LOG_DEBUG,
+               "syncing shm for ajp worker '%s' from mem",
+               aw->name);
+
+    aw->s->cache_timeout = aw->cache_timeout;
+    aw->s->connect_timeout = aw->connect_timeout;
+    aw->s->reply_timeout = aw->reply_timeout;
+    aw->s->prepost_timeout = aw->prepost_timeout;
+    aw->s->recovery_opts = aw->recovery_opts;
+    aw->s->retries = aw->retries;
+    aw->s->max_packet_size = aw->max_packet_size;
+    aw->s->h.sequence = aw->sequence;
+
+    JK_TRACE_EXIT(l);
+}
+
+/** Send a message to an endpoint, using corresponding PROTO HEADER
+ * @param ae       endpoint
+ * @param msg      message to send
+ * @param l        logger
+ * @return         JK_FATAL_ERROR: endpoint contains unknown protocol
+ *                 JK_FALSE: other failure 
+ *                 JK_TRUE: success
+ * @remark         Always closes socket in case of
+ *                 a socket error, or JK_FATAL_ERROR
+ * @remark         Cares about ae->last_errno
  */
-
 int ajp_connection_tcp_send_message(ajp_endpoint_t * ae,
                                     jk_msg_buf_t *msg, jk_logger_t *l)
 {
     int rc;
 
     JK_TRACE_ENTER(l);
+
+    ae->last_errno = 0;
     if (ae->proto == AJP13_PROTO) {
         jk_b_end(msg, AJP13_WS_HEADER);
         if (JK_IS_DEBUG_LEVEL(l))
@@ -917,30 +1017,46 @@
     }
     else {
         jk_log(l, JK_LOG_ERROR,
-               "unknown protocol %d, supported are AJP13/AJP14", ae->proto);
+               "(%s) unknown protocol %d, supported are AJP13/AJP14",
+                ae->worker->name, ae->proto);
+        /* We've got a protocol error. */
+        /* We can't trust this connection any more, */
+        /* because we might have send already parts of the request. */
+        jk_shutdown_socket(ae->sd, l);
+        ae->sd = JK_INVALID_SOCKET;
         JK_TRACE_EXIT(l);
         return JK_FATAL_ERROR;
     }
 
+    /* This is the only place in this function where we use the socket. */
+    /* If sendfull gets an error, it implicitely closes the socket. */
+    /* So any socket error inside ajp_connection_tcp_send_message */
+    /* results in a socket close and invalidated endpoint connection. */
     if ((rc = jk_tcp_socket_sendfull(ae->sd, msg->buf,
-                                     msg->len)) > 0) {
-        ae->endpoint.wr += (jk_uint64_t)msg->len;
+                                     msg->len, l)) > 0) {
+        ae->endpoint.wr += (jk_uint64_t)rc;
         JK_TRACE_EXIT(l);
-        ae->last_errno = 0;
         return JK_TRUE;
     }
     ae->last_errno = errno;
     jk_log(l, JK_LOG_ERROR,
            "sendfull returned %d (errno=%d)", rc, ae->last_errno);
+    ae->sd = JK_INVALID_SOCKET;
 
     JK_TRACE_EXIT(l);
     return JK_FALSE;
 }
 
-/*
- * Receive a message from endpoint, checking PROTO HEADER
+/** Receive a message from an endpoint, checking PROTO HEADER
+ * @param ae       endpoint
+ * @param msg      message to send
+ * @param l        logger
+ * @return         JK_FALSE: failure 
+ *                 JK_TRUE: success
+ * @remark         Always closes socket in case of
+ *                 a socket error
+ * @remark         Cares about ae->last_errno
  */
-
 int ajp_connection_tcp_get_message(ajp_endpoint_t * ae,
                                    jk_msg_buf_t *msg, jk_logger_t *l)
 {
@@ -952,15 +1068,21 @@
 
     JK_TRACE_ENTER(l);
 
-    rc = jk_tcp_socket_recvfull(ae->sd, head, AJP_HEADER_LEN);
+    ae->last_errno = 0;
+    /* If recvfull gets an error, it implicitely closes the socket. */
+    /* We will invalidate the endpoint connection. */
+    rc = jk_tcp_socket_recvfull(ae->sd, head, AJP_HEADER_LEN, l);
 
+    /* If the return code is not negative */
+    /* then we always get back the correct number of bytes. */
     if (rc < 0) {
         ae->last_errno = errno;
         if (rc == JK_SOCKET_EOF) {
-            jk_log(l, JK_LOG_INFO,
-                   "(%s) Tomcat has forced a connection close for socket %d",
-                   ae->worker->name, ae->sd);
-            JK_TRACE_EXIT(l);
+            jk_log(l, JK_LOG_ERROR,
+                   "(%s) can't receive the response message from tomcat, "
+                   "tomcat (%s) has forced a connection close for socket %d",
+                   ae->worker->name, jk_dump_hinfo(&ae->worker->worker_inet_addr, buf),
+                   ae->sd);
         }
         else {
             jk_log(l, JK_LOG_ERROR,
@@ -968,11 +1090,11 @@
                    "network problems or tomcat (%s) is down (errno=%d)",
                    ae->worker->name, jk_dump_hinfo(&ae->worker->worker_inet_addr, buf),
                    ae->last_errno);
-             JK_TRACE_EXIT(l);
         }
+        ae->sd = JK_INVALID_SOCKET;
+        JK_TRACE_EXIT(l);
         return JK_FALSE;
     }
-    ae->last_errno = 0;
     ae->endpoint.rd += (jk_uint64_t)rc;
     header = ((unsigned int)head[0] << 8) | head[1];
 
@@ -990,6 +1112,10 @@
                        header, jk_dump_hinfo(&ae->worker->worker_inet_addr,
                                              buf));
             }
+            /* We've got a protocol error. */
+            /* We can't trust this connection any more. */
+            jk_shutdown_socket(ae->sd, l);
+            ae->sd = JK_INVALID_SOCKET;
             JK_TRACE_EXIT(l);
             return JK_FALSE;
         }
@@ -1008,6 +1134,10 @@
                        header, jk_dump_hinfo(&ae->worker->worker_inet_addr,
                                              buf));
             }
+            /* We've got a protocol error. */
+            /* We can't trust this connection any more. */
+            jk_shutdown_socket(ae->sd, l);
+            ae->sd = JK_INVALID_SOCKET;
             JK_TRACE_EXIT(l);
             return JK_FALSE;
         }
@@ -1021,6 +1151,10 @@
                "wrong message size %d %d from %s",
                msglen, msg->maxlen,
                jk_dump_hinfo(&ae->worker->worker_inet_addr, buf));
+        /* We've got a protocol error. */
+        /* We can't trust this connection any more. */
+        jk_shutdown_socket(ae->sd, l);
+        ae->sd = JK_INVALID_SOCKET;
         JK_TRACE_EXIT(l);
         return JK_FALSE;
     }
@@ -1028,7 +1162,11 @@
     msg->len = msglen;
     msg->pos = 0;
 
-    rc = jk_tcp_socket_recvfull(ae->sd, msg->buf, msglen);
+    /* If recvfull gets an error, it implicitely closes the socket. */
+    /* We will invalidate the endpoint connection. */
+    rc = jk_tcp_socket_recvfull(ae->sd, msg->buf, msglen, l);
+    /* If the return code is not negative */
+    /* then we always get back the correct number of bytes. */
     if (rc < 0) {
         ae->last_errno = errno;
         if (rc == JK_SOCKET_EOF) {
@@ -1037,8 +1175,6 @@
                    "tomcat (%s) has forced a connection close for socket %d",
                    ae->worker->name, jk_dump_hinfo(&ae->worker->worker_inet_addr, buf),
                    ae->sd);
-            JK_TRACE_EXIT(l);
-            return JK_FALSE;
         }
         else {
             jk_log(l, JK_LOG_ERROR,
@@ -1046,11 +1182,11 @@
                    "network problems or tomcat (%s) is down (errno=%d)",
                    ae->worker->name, jk_dump_hinfo(&ae->worker->worker_inet_addr, buf),
                    ae->last_errno);
-            JK_TRACE_EXIT(l);
-            return JK_FALSE;
         }
+        ae->sd = JK_INVALID_SOCKET;
+        JK_TRACE_EXIT(l);
+        return JK_FALSE;
     }
-    ae->last_errno = 0;
     ae->endpoint.rd += (jk_uint64_t)rc;
 
     if (ae->proto == AJP13_PROTO) {
@@ -1079,6 +1215,7 @@
     unsigned int padded_len = len;
 
     JK_TRACE_ENTER(l);
+
     if (s->is_chunked && s->no_more_chunks) {
         JK_TRACE_EXIT(l);
         return 0;
@@ -1109,6 +1246,7 @@
         rdlen += this_time;
     }
 
+    JK_TRACE_EXIT(l);
     return (int)rdlen;
 }
 
@@ -1125,6 +1263,7 @@
     unsigned char *read_buf = msg->buf;
 
     JK_TRACE_ENTER(l);
+
     jk_b_reset(msg);
 
     read_buf += AJP_HEADER_LEN; /* leave some space for the buffer headers */
@@ -1169,39 +1308,57 @@
 /*
  * send request to Tomcat via Ajp13
  * - first try to find reuseable socket
- * - if no one available, try to connect
- * - send request, but send must be see as asynchronous,
+ * - if no such available, try to connect
+ * - send request, but send must be seen as asynchronous,
  *   since send() call will return noerror about 95% of time
  *   Hopefully we'll get more information on next read.
  *
- * nb: reqmsg is the original request msg buffer
- *     repmsg is the reply msg buffer which could be scratched
+ * nb: op->request is the original request msg buffer
+ *     op->reply is the reply msg buffer which could be scratched
+ *
+ * Return values of ajp_send_request() function:
+ * return value        op->recoverable   reason
+ * JK_FATAL_ERROR      JK_FALSE          ajp_connection_tcp_send_message() returns JK_FATAL_ERROR
+ *           Endpoint belongs to unknown protocol.
+ * JK_FATAL_ERROR      JK_TRUE           ajp_connection_tcp_send_message() returns JK_FALSE
+ *           Sending request or request body in jk_tcp_socket_sendfull() returns with error.
+ * JK_FATAL_ERROR      JK_TRUE           Could not connect to backend
+ * JK_CLIENT_RD_ERROR  JK_FALSE          Error during reading parts of POST body from client
+ * JK_TRUE             JK_TRUE           All other cases (OK)
  */
 static int ajp_send_request(jk_endpoint_t *e,
                             jk_ws_service_t *s,
                             jk_logger_t *l,
                             ajp_endpoint_t * ae, ajp_operation_t * op)
 {
-    int err = 0;
+    int err_conn = 0;
+    int err_cping = 0;
+    int err_send = 0;
+    int rc;
     int postlen;
 
     JK_TRACE_ENTER(l);
+
+    ae->last_errno = 0;
     /* Up to now, we can recover */
     op->recoverable = JK_TRUE;
 
     /*
      * First try to reuse open connections...
      */
+    if (!IS_VALID_SOCKET(ae->sd))
+        ajp_next_connection(ae, l);
     while (IS_VALID_SOCKET(ae->sd)) {
-        int rc = 0;
-        err = 0;
-        if (!jk_is_socket_connected(ae->sd)) {
+        int err = JK_FALSE;
+        if (jk_is_socket_connected(ae->sd, l) == JK_FALSE) {
+            ae->last_errno = errno;
             jk_log(l, JK_LOG_DEBUG,
-                   "(%s) socket %d is not connected any more (errno=%d)",
-                   ae->worker->name, ae->sd, errno);
-            jk_shutdown_socket(ae->sd);
+                   "(%s) failed sending request, "
+                   "socket %d is not connected any more (errno=%d)",
+                   ae->worker->name, ae->sd, ae->last_errno);
             ae->sd = JK_INVALID_SOCKET;
-            err = 1;
+            err = JK_TRUE;
+            err_conn++;
         }
         if (ae->worker->prepost_timeout > 0 && !err) {
             /* handle cping/cpong if prepost_timeout is set
@@ -1210,49 +1367,51 @@
              */
             if (ajp_handle_cping_cpong(ae,
                         ae->worker->prepost_timeout, l) == JK_FALSE) {
+                jk_log(l, JK_LOG_INFO,
+                       "(%s) failed sending request, "
+                       "socket %d prepost cping/cpong failure (errno=%d)",
+                        ae->worker->name, ae->sd, ae->last_errno);
                 /* XXX: Is there any reason to try other
                  * connections to the node if one of them fails
                  * the cping/cpong heartbeat?
                  * Tomcat can be either too busy or simply dead, so
-                 * there is a chance that all oter connections would
+                 * there is a chance that all other connections would
                  * fail as well.
                  */
-                err = 2;
+                err = JK_TRUE;
+                err_cping++;
             }
         }
 
-        /* If we got an error or can't send data, then try to get a pooled
-         * connection and try again.  If we are succesful, break out of this
-         * loop. */
-        if (err ||
-            ((rc = ajp_connection_tcp_send_message(ae, op->request, l)) != JK_TRUE)) {
-            if (rc != JK_FATAL_ERROR) {
-                if (err == 1) {
-                    jk_log(l, JK_LOG_DEBUG,
-                           "(%s) failed sending request. "
-                           "Will try another pooled connection",
-                            ae->worker->name);
-                }
-                else {
-                    jk_log(l, JK_LOG_INFO,
-                           "(%s) error sending request. "
-                           "Will try another pooled connection",
-                            ae->worker->name);
-                }
-                ajp_next_connection(ae, l);
-            }
-            else {
+        /* We've got a connected socket and the optional
+         * cping/cpong worked, so let's send the request now.
+         */
+        if (err == JK_FALSE) {
+            rc = ajp_connection_tcp_send_message(ae, op->request, l);
+            /* If this worked, we can break out of the loop
+             * and proceed with the request.
+             */
+            if (rc == JK_TRUE)
+                break;
+            /* Error during sending the request.
+             */
+            err_send++;
+            if (rc == JK_FATAL_ERROR)
                 op->recoverable = JK_FALSE;
-                jk_log(l, JK_LOG_ERROR,
-                       "(%s) error sending request. Unrecoverable operation",
-                       ae->worker->name);
-                jk_shutdown_socket(ae->sd);
-                ae->sd = JK_INVALID_SOCKET;
-                JK_TRACE_EXIT(l);
-                return JK_FALSE;
-            }
+            jk_log(l, JK_LOG_INFO,
+                   "(%s) failed sending request (%srecoverable), "
+                   "socket %d (errno=%d)",
+                    ae->worker->name,
+                    op->recoverable ? "" : "un",
+                    ae->sd, ae->last_errno);
+            JK_TRACE_EXIT(l);
+            return JK_FATAL_ERROR;
         }
-        else
+        /* If we got an error or can't send data, then try to steal another pooled
+         * connection and try again.  If we are not successful, break out of this
+         * loop and try to open a new connection after the loop.
+         */
+        if (ajp_next_connection(ae, l) == JK_FALSE)
             break;
     }
 
@@ -1260,65 +1419,70 @@
      * If we failed to reuse a connection, try to reconnect.
      */
     if (!IS_VALID_SOCKET(ae->sd)) {
-        if (err == 1) {
-            /* If err is set, the tomcat is disconnected */
+        /* Could not steal any connection from an endpoint - backend is disconnected */
+        if (err_conn + err_cping + err_send > 0)
             jk_log(l, JK_LOG_INFO,
-                   "(%s) all endpoints are disconnected", ae->worker->name);
+                   "(%s) all endpoints are disconnected, "
+                   "detected by connect check (%d), cping (%d), send (%d)",
+                   ae->worker->name, err_conn, err_cping, err_send);
+        else if (JK_IS_DEBUG_LEVEL(l))
+            jk_log(l, JK_LOG_DEBUG,
+                   "(%s) all endpoints are disconnected, "
+                   "detected by connect check (%d), cping (%d), send (%d)",
+                   ae->worker->name, err_conn, err_cping, err_send);
+        /* Connect to the backend.
+         */
+        if (ajp_connect_to_endpoint(ae, l) != JK_TRUE) {
+            jk_log(l, JK_LOG_ERROR,
+                   "(%s) connecting to backend failed. Tomcat is probably not started "
+                   "or is listening on the wrong port (errno=%d)",
+                   ae->worker->name, ae->last_errno);
             JK_TRACE_EXIT(l);
-            return JK_FALSE;
+            return JK_FATAL_ERROR;
         }
-        else if (err) {
-            /* If err is set, the tomcat is dead */
-            jk_log(l, JK_LOG_INFO,
-                   "(%s) all endpoints are dead", ae->worker->name);
-            /* TODO: What is the purpose of the following log message?
-             *       IMO it is very confusing and does not reflect the
-             *       real reason (CPING/CPONG failed) of the error.
-             *       Further more user might deliberately set the
-             *       connectionTimeout and this is normal operational
-             *       message in that case.
+        if (ae->worker->connect_timeout <= 0 &&
+            ae->worker->prepost_timeout > 0) {
+            /* handle cping/cpong if prepost_timeout is set
+             * and we didn't already do a connect cping/cpong.
              */
-            jk_log(l, JK_LOG_INFO,
-                   "(%s) increase the backend idle connection "
-                   "timeout or the connection_pool_minsize",
-                   ae->worker->name);
-            JK_TRACE_EXIT(l);
-            return JK_FALSE;
-        }
-        /* Connect to the backend.
-         * This can be either uninitalized connection or a reconnect.
-         */
-        if (ajp_connect_to_endpoint(ae, l) == JK_TRUE) {
-            /*
-             * After we are connected, each error that we are going to
-             * have is probably unrecoverable
-             */
-            if (ajp_connection_tcp_send_message(ae, op->request, l) != JK_TRUE) {
-                /* Close the socket if unable to send request */
-                jk_shutdown_socket(ae->sd);
-                ae->sd = JK_INVALID_SOCKET;
+            if (ajp_handle_cping_cpong(ae,
+                        ae->worker->prepost_timeout, l) == JK_FALSE) {
                 jk_log(l, JK_LOG_INFO,
-                       "(%s) error sending request on a fresh connection (errno=%d)",
-                       ae->worker->name, ae->last_errno);
+                       "(%s) failed sending request, "
+                       "socket %d prepost cping/cpong failure (errno=%d)",
+                        ae->worker->name, ae->sd, ae->last_errno);
                 JK_TRACE_EXIT(l);
-                return JK_FALSE;
+                return JK_FATAL_ERROR;
             }
         }
-        else {
-            /* Close the socket if unable to connect */
-            jk_shutdown_socket(ae->sd);
-            ae->sd = JK_INVALID_SOCKET;
-            jk_log(l, JK_LOG_INFO,
-                   "(%s) error connecting to the backend server (errno=%d)",
-                   ae->worker->name, ae->last_errno);
+
+        /* We've got a connected socket and the optional
+         * cping/cpong worked, so let's send the request now.
+         */
+        rc = ajp_connection_tcp_send_message(ae, op->request, l);
+        /* Error during sending the request.
+         */
+        if (rc != JK_TRUE) {
+            if (rc == JK_FATAL_ERROR)
+                op->recoverable = JK_FALSE;
+            jk_log(l, JK_LOG_ERROR,
+                   "(%s) failed sending request on a fresh connection (%srecoverable), "
+                   "socket %d (errno=%d)",
+                    ae->worker->name, op->recoverable ? "" : "un",
+                    ae->sd, ae->last_errno);
             JK_TRACE_EXIT(l);
-            return JK_FALSE;
+            return JK_FATAL_ERROR;
         }
     }
+    else if (JK_IS_DEBUG_LEVEL(l))
+        jk_log(l, JK_LOG_DEBUG,
+               "(%s) Statistics about invalid connections: "
+               "connect check (%d), cping (%d), send (%d)",
+               ae->worker->name, err_conn, err_cping, err_send);
 
     /*
      * From now on an error means that we have an internal server error
-     * or Tomcat crashed. In any case we cannot recover this.
+     * or Tomcat crashed.
      */
 
     if (JK_IS_DEBUG_LEVEL(l))
@@ -1338,14 +1502,19 @@
 
     postlen = op->post->len;
     if (postlen > AJP_HEADER_LEN) {
-        if (ajp_connection_tcp_send_message(ae, op->post, l) != JK_TRUE) {
-            /* Close the socket if unable to send request */
-            jk_shutdown_socket(ae->sd);
-            ae->sd = JK_INVALID_SOCKET;
-            jk_log(l, JK_LOG_ERROR, "(%s) failed resending request body (%d)",
-                   ae->worker->name, postlen);
+        rc = ajp_connection_tcp_send_message(ae, op->post, l);
+        /* Error during sending the request body.
+         */
+        if (rc != JK_TRUE) {
+            if (rc == JK_FATAL_ERROR)
+                op->recoverable = JK_FALSE;
+            jk_log(l, JK_LOG_ERROR,
+                   "(%s) failed sending request body of size %d (%srecoverable), "
+                   "socket %d (errno=%d)",
+                    ae->worker->name, postlen, op->recoverable ? "" : "un",
+                    ae->sd, ae->last_errno);
             JK_TRACE_EXIT(l);
-            return JK_SERVER_ERROR;
+            return JK_FATAL_ERROR;
         }
         else {
             if (JK_IS_DEBUG_LEVEL(l))
@@ -1358,15 +1527,19 @@
         postlen = s->reco_buf->len;
 
         if (postlen > AJP_HEADER_LEN) {
-            if (ajp_connection_tcp_send_message(ae, s->reco_buf, l) != JK_TRUE) {
-                /* Close the socket if unable to send request */
-                jk_shutdown_socket(ae->sd);
-                ae->sd = JK_INVALID_SOCKET;
+            rc = ajp_connection_tcp_send_message(ae, s->reco_buf, l);
+            /* Error during sending the request body.
+             */
+            if (rc != JK_TRUE) {
+                if (rc == JK_FATAL_ERROR)
+                    op->recoverable = JK_FALSE;
                 jk_log(l, JK_LOG_ERROR,
-                       "(%s) failed resending request body (lb mode) (%d)",
-                       ae->worker->name, postlen);
+                       "(%s) failed sending request body of size %d (lb mode) (%srecoverable), "
+                       "socket %d (errno=%d)",
+                        ae->worker->name, postlen, op->recoverable ? "" : "un",
+                        ae->sd, ae->last_errno);
                 JK_TRACE_EXIT(l);
-                return JK_SERVER_ERROR;
+                return JK_FATAL_ERROR;
             }
         }
         else {
@@ -1408,36 +1581,27 @@
             }
 
             s->content_read = (jk_uint64_t)len;
-            if (ajp_connection_tcp_send_message(ae, op->post, l) != JK_TRUE) {
-                /* Close the socket if unable to send request */
-                jk_shutdown_socket(ae->sd);
-                ae->sd = JK_INVALID_SOCKET;
-                jk_log(l, JK_LOG_ERROR, "(%s) error sending request body",
-                       ae->worker->name);
+            rc = ajp_connection_tcp_send_message(ae, op->post, l);
+            /* Error during sending the request body.
+             */
+            if (rc != JK_TRUE) {
+                if (rc == JK_FATAL_ERROR)
+                    op->recoverable = JK_FALSE;
+                jk_log(l, JK_LOG_ERROR,
+                       "(%s) failed sending request body of size %d (%srecoverable), "
+                       "socket %d (errno=%d)",
+                        ae->worker->name, len, op->recoverable ? "" : "un",
+                        ae->sd, ae->last_errno);
                 JK_TRACE_EXIT(l);
-                return JK_SERVER_ERROR;
+                return JK_FATAL_ERROR;
             }
         }
     }
     JK_TRACE_EXIT(l);
-    return (JK_TRUE);
+    return JK_TRUE;
 }
 
 
-static int is_http_status_fail(ajp_worker_t *w, int status)
-{
-    unsigned int i;
-    int soft_status = -1 * status;
-    for (i = 0; i < w->http_status_fail_num; i++) {
-        if (w->http_status_fail[i] == status)
-            return 1;
-        else if (w->http_status_fail[i] == soft_status)
-            return -1;
-    }
-    return 0;
-}
-
-
 /*
  * What to do with incoming data (dispatcher)
  */
@@ -1450,6 +1614,7 @@
     int code = (int)jk_b_get_byte(msg);
 
     JK_TRACE_ENTER(l);
+
     switch (code) {
     case JK_AJP13_SEND_HEADERS:
         {
@@ -1462,7 +1627,12 @@
                 return JK_AJP13_ERROR;
             }
             r->http_response_status = res.status;
-            rc  = is_http_status_fail(ae->worker, res.status);
+            if (r->extension.fail_on_status_size > 0)
+                rc = is_http_status_fail(r->extension.fail_on_status_size,
+                                         r->extension.fail_on_status, res.status);
+            else
+                rc = is_http_status_fail(ae->worker->http_status_fail_num,
+                                         ae->worker->http_status_fail, res.status);
             if (rc > 0) {
                 JK_TRACE_EXIT(l);
                 return JK_STATUS_FATAL_ERROR;
@@ -1503,8 +1673,15 @@
                 /* AJP13_SEND_BODY_CHUNK with length 0 is
                  * explicit flush packet message.
                  */
-                if (r->flush)
-                    r->flush(r);
+                if (r->response_started) {
+                    if (r->flush) {
+                        r->flush(r);
+                    }
+                }
+                else {
+                    jk_log(l, JK_LOG_DEBUG,
+                           "Ignoring flush message received before headers");
+                }
             }
             else {
                 if (!r->write(r, msg->buf + msg->pos, len)) {
@@ -1541,7 +1718,7 @@
             }
 
             jk_log(l, JK_LOG_INFO,
-                   "Reding from client aborted or client network problems");
+                   "Reading from client aborted or client network problems");
 
             JK_TRACE_EXIT(l);
             return JK_CLIENT_RD_ERROR;
@@ -1591,16 +1768,29 @@
 
 /*
  * get replies from Tomcat via Ajp13/Ajp14
- * We will know only at read time if the remote host closed
- * the connection (half-closed state - FIN-WAIT2). In that case
- * we must close our side of the socket and abort emission.
- * We will need another connection to send the request
- * There is need of refactoring here since we mix
- * reply reception (tomcat -> apache) and request send (apache -> tomcat)
- * and everything using the same buffer (repmsg)
  * ajp13/ajp14 is async but handling read/send this way prevent nice recovery
  * In fact if tomcat link is broken during upload (browser -> apache -> tomcat)
  * we'll loose data and we'll have to abort the whole request.
+ *
+ * Return values of ajp_get_reply() function:
+ * return value           op->recoverable    reason
+ * JK_REPLY_TIMEOUT       ?recovery_options  Reply timeout while waiting for response packet
+ * JK_FALSE               ?recovery_options  Error during ajp_connection_tcp_get_message()
+ *           Communication error or wrong packet content while reading from backend.
+ * JK_STATUS_ERROR        mostly JK_TRUE     ajp_process_callback() returns JK_STATUS_ERROR
+ *           Recoverable, if callback didn't return with a JK_HAS_RESPONSE before.
+ *           JK_HAS_RESPONSE: parts of the post buffer are consumed.
+ * JK_STATUS_FATAL_ERROR  mostly JK_TRUE     ajp_process_callback() returns JK_STATUS_FATAL_ERROR
+ *           Recoverable, if callback didn't return with a JK_HAS_RESPONSE before.
+ *           JK_HAS_RESPONSE: parts of the post buffer are consumed.
+ * JK_FATAL_ERROR         ?                  ajp_process_callback() returns JK_AJP13_ERROR
+ *           JK_AJP13_ERROR: protocol error, or JK_INTERNAL_ERROR: chunk size to large
+ * JK_CLIENT_RD_ERROR     ?                  ajp_process_callback() returns JK_CLIENT_RD_ERROR
+ *           JK_CLIENT_RD_ERROR: could not read post from client.
+ * JK_CLIENT_WR_ERROR     ?                  ajp_process_callback() returns JK_CLIENT_WR_ERROR
+ *           JK_CLIENT_WR_ERROR: could not write back result to client
+ * JK_TRUE                ?                  ajp_process_callback() returns JK_AJP13_END_RESPONSE
+ * JK_FALSE               ?                  Other unhandled cases (unknown return codes)
  */
 static int ajp_get_reply(jk_endpoint_t *e,
                          jk_ws_service_t *s,
@@ -1612,48 +1802,54 @@
 
     JK_TRACE_ENTER(l);
 
+    p->last_errno = 0;
     /* Start read all reply message */
     while (1) {
         int rc = 0;
-
+        /* Allow to overwrite reply_timeout on a per URL basis via service struct */
+        int reply_timeout = s->extension.reply_timeout;
+        if (reply_timeout < 0)
+            reply_timeout = p->worker->reply_timeout;
         /* If we set a reply timeout, check if something is available */
-        if (p->worker->reply_timeout > 0) {
-            if (ajp_is_input_event(p, p->worker->reply_timeout, l) ==
+        if (reply_timeout > 0) {
+            if (jk_is_input_event(p->sd, reply_timeout, l) ==
                 JK_FALSE) {
+                p->last_errno = errno;
                 jk_log(l, JK_LOG_ERROR,
                        "(%s) Timeout with waiting reply from tomcat. "
                        "Tomcat is down, stopped or network problems (errno=%d)",
                        p->worker->name, p->last_errno);
+                /* We can't trust this connection any more. */
+                jk_shutdown_socket(p->sd, l);
+                p->sd = JK_INVALID_SOCKET;
                 if (headeratclient == JK_FALSE) {
                     if (p->worker->recovery_opts & RECOVER_ABORT_IF_TCGETREQUEST)
                         op->recoverable = JK_FALSE;
+                    /*
+                     * We revert back to recoverable, if recovery_opts allow it for GET or HEAD
+                     */
+                    if (op->recoverable == JK_FALSE) {
+                        if (p->worker->recovery_opts & RECOVER_ALWAYS_HTTP_HEAD) {
+                            if (!strcmp(s->method, "HEAD"))
+                                op->recoverable = JK_TRUE;
+                        }
+                        else if (p->worker->recovery_opts & RECOVER_ALWAYS_HTTP_GET) {
+                            if (!strcmp(s->method, "GET"))
+                                op->recoverable = JK_TRUE;
+                        }
+                    }
                 }
                 else {
                     if (p->worker->recovery_opts & RECOVER_ABORT_IF_TCSENDHEADER)
                         op->recoverable = JK_FALSE;
                 }
 
-                /*
-                 * We revert back to recoverable, if recovery_opts allow it for GET or HEAD
-                 */
-                if (op->recoverable == JK_FALSE) {
-                    if (p->worker->recovery_opts & RECOVER_ALWAYS_HTTP_HEAD) {
-                        if (!strcmp(s->method, "HEAD"))
-                            op->recoverable = JK_TRUE;
-                    }
-                    else if (p->worker->recovery_opts & RECOVER_ALWAYS_HTTP_GET) {
-                        if (!strcmp(s->method, "GET"))
-                            op->recoverable = JK_TRUE;
-                    }
-                }
-
                 JK_TRACE_EXIT(l);
                 return JK_REPLY_TIMEOUT;
             }
         }
 
-        if (!ajp_connection_tcp_get_message(p, op->reply, l)) {
-            /* we just can't recover, unset recover flag */
+        if (ajp_connection_tcp_get_message(p, op->reply, l) != JK_TRUE) {
             if (headeratclient == JK_FALSE) {
                 jk_log(l, JK_LOG_ERROR,
                        "(%s) Tomcat is down or refused connection. "
@@ -1662,10 +1858,6 @@
                 /*
                  * communication with tomcat has been interrupted BEFORE
                  * headers have been sent to the client.
-                 * DISCUSSION: As we suppose that tomcat has already started
-                 * to process the query we think it's unrecoverable (and we
-                 * should not retry or switch to another tomcat in the
-                 * cluster).
                  */
 
                 /*
@@ -1673,7 +1865,6 @@
                  */
                 if (p->worker->recovery_opts & RECOVER_ABORT_IF_TCGETREQUEST)
                     op->recoverable = JK_FALSE;
-
                 /*
                  * We revert back to recoverable, if recovery_opts allow it for GET or HEAD
                  */
@@ -1688,12 +1879,6 @@
                     }
                 }
 
-                /*
-                 * we want to display the webservers error page, therefore
-                 * we return JK_FALSE
-                 */
-                JK_TRACE_EXIT(l);
-                return JK_FALSE;
             }
             else {
                 jk_log(l, JK_LOG_ERROR,
@@ -1707,11 +1892,6 @@
                  * sent, therefore the response is "complete" in a sense
                  * that nobody should append any data, especially no 500 error
                  * page of the webserver!
-                 *
-                 * BUT if you retrun JK_TRUE you have a 200 (OK) code in your
-                 * in your apache access.log instead of a 500 (Error).
-                 * Therefore return FALSE/FALSE
-                 * return JK_TRUE;
                  */
 
                 /*
@@ -1720,23 +1900,14 @@
                 if (p->worker->recovery_opts & RECOVER_ABORT_IF_TCSENDHEADER)
                     op->recoverable = JK_FALSE;
 
-                /*
-                 * We revert back to recoverable, if recovery_opts allow it for GET or HEAD
-                 */
-                if (op->recoverable == JK_FALSE) {
-                    if (p->worker->recovery_opts & RECOVER_ALWAYS_HTTP_HEAD) {
-                        if (!strcmp(s->method, "HEAD"))
-                            op->recoverable = JK_TRUE;
-                    }
-                    else if (p->worker->recovery_opts & RECOVER_ALWAYS_HTTP_GET) {
-                        if (!strcmp(s->method, "GET"))
-                            op->recoverable = JK_TRUE;
-                    }
-                }
+            }
 
-                JK_TRACE_EXIT(l);
-                return JK_FALSE;
-            }
+            /*
+             * we want to display the webservers error page, therefore
+             * we return JK_FALSE
+             */
+            JK_TRACE_EXIT(l);
+            return JK_FALSE;
         }
 
         rc = ajp_process_callback(op->reply, op->post, p, s, l);
@@ -1750,13 +1921,19 @@
             headeratclient = JK_TRUE;
         }
         else if (JK_STATUS_ERROR == rc || JK_STATUS_FATAL_ERROR == rc) {
+            jk_log(l, JK_LOG_INFO,
+                   "(%s) request failed%s, "
+                   "because of response status %d, ",
+                   p->worker->name,
+                   rc == JK_STATUS_FATAL_ERROR ? "" : " (soft)",
+                   s->http_response_status);
             JK_TRACE_EXIT(l);
             return rc;
         }
         else if (JK_AJP13_HAS_RESPONSE == rc) {
             /*
              * in upload-mode there is no second chance since
-             * we may have allready sent part of the uploaded data
+             * we may have already sent part of the uploaded data
              * to Tomcat.
              * In this case if Tomcat connection is broken we must
              * abort request and indicate error.
@@ -1769,8 +1946,6 @@
                 jk_log(l, JK_LOG_ERROR,
                        "(%s) Tomcat is down or network problems",
                         p->worker->name);
-                jk_shutdown_socket(p->sd);
-                p->sd = JK_INVALID_SOCKET;
                 JK_TRACE_EXIT(l);
                 return JK_FALSE;
             }
@@ -1782,17 +1957,8 @@
              * failover is possible.
              */
             JK_TRACE_EXIT(l);
-            return JK_SERVER_ERROR;
+            return JK_FATAL_ERROR;
         }
-        else if (JK_FATAL_ERROR == rc) {
-            /*
-             * we won't be able to gracefully recover from this so
-             * set recoverable to false and get out.
-             */
-            op->recoverable = JK_FALSE;
-            JK_TRACE_EXIT(l);
-            return JK_FALSE;
-        }
         else if (JK_CLIENT_RD_ERROR == rc) {
             /*
              * Client has stop sending to us, so get out.
@@ -1809,18 +1975,26 @@
             JK_TRACE_EXIT(l);
             return JK_CLIENT_WR_ERROR;
         }
-        else if (JK_SERVER_ERROR == rc) {
+        else if (JK_INTERNAL_ERROR == rc) {
             /*
-             * Tomcat has stop talking to us, so get out.
-             * Loadbalancer if present will decide if
-             * failover is possible.
+             * Internal error, like memory allocation or invalid packet lengths.
              */
             JK_TRACE_EXIT(l);
-            return JK_SERVER_ERROR;
+            return JK_FATAL_ERROR;
         }
+        else if (JK_AJP13_NO_RESPONSE == rc) {
+            /*
+             * This is fine, loop again, more data to send.
+             */
+            continue;
+        }
         else if (rc < 0) {
+            op->recoverable = JK_FALSE;
+            jk_log(l, JK_LOG_ERROR,
+                   "(%s) Callback returns with unknown value %d",
+                    p->worker->name, rc);
             JK_TRACE_EXIT(l);
-            return (JK_FALSE);  /* XXX error */
+            return JK_FALSE;
         }
     }
     /* XXX: Not reached? */
@@ -1828,12 +2002,56 @@
     return JK_FALSE;
 }
 
+static void ajp_update_stats(jk_endpoint_t *e, ajp_worker_t *aw, int rc, jk_logger_t *l)
+{
+    aw->s->readed += e->rd;
+    aw->s->transferred += e->wr;
+    if (aw->s->busy)
+        aw->s->busy--;
+    if (rc != JK_TRUE) {
+        aw->s->state = JK_AJP_STATE_ERROR;
+        aw->s->errors++;
+        aw->s->error_time = time(NULL);
+    }
+    else
+        aw->s->state = JK_AJP_STATE_OK;
+}
+
 /*
  * service is now splitted in ajp_send_request and ajp_get_reply
  * much more easier to do errors recovery
  *
  * We serve here the request, using AJP13/AJP14 (e->proto)
  *
+ * Return values of service() method for ajp13/ajp14 worker:
+ * return value      is_error              e->recoverable     reason
+ * JK_FALSE          JK_HTTP_SERVER_ERROR  TRUE               Invalid Parameters (null values)
+ * JK_SERVER_ERROR   JK_HTTP_SERVER_ERROR  TRUE               Error during initializing empty request, response or post body objects
+ * JK_CLIENT_ERROR   JK_HTTP_REQUEST_TOO_LARGE JK_TRUE        Request doesn't fit into buffer (error during ajp_marshal_into_msgb())
+ * JK_CLIENT_ERROR   JK_HTTP_BAD_REQUEST   JK_FALSE           Error during reading parts of POST body from client
+ * JK_FATAL_ERROR    JK_HTTP_SERVER_ERROR  JK_FALSE           If ajp_send_request() returns JK_FATAL_ERROR and !op->recoverable.
+ * JK_FATAL_ERROR    JK_HTTP_SERVER_ERROR  JK_FALSE           If ajp_send_request() returns JK_TRUE but !op->recoverable.
+ *           This should never happen.
+ * JK_CLIENT_ERROR   JK_HTTP_BAD_REQUEST   ?                  ajp_get_reply() returns JK_CLIENT_RD_ERROR
+ * JK_CLIENT_ERROR   JK_HTTP_OK            ?                  ajp_get_reply() returns JK_CLIENT_WR_ERROR
+ * JK_FATAL_ERROR    JK_HTTP_SERVER_ERROR  JK_TRUE            ajp_get_reply() returns JK_FATAL_ERROR
+ *           JK_FATAL_ERROR: protocol error or internal error
+ * JK_FATAL_ERROR    JK_HTTP_SERVER_ERROR  JK_FALSE           ajp_get_reply() returns JK_FATAL_ERROR
+ *           JK_FATAL_ERROR: protocol error or internal error
+ * JK_STATUS_ERROR   JK_HTTP_SERVER_BUSY   JK_TRUE            ajp_get_reply() returns JK_STATUS_ERROR
+ *           Only if op->recoverable and no more ajp13/ajp14 direct retries
+ * JK_STATUS_ERROR   JK_HTTP_SERVER_BUSY   JK_FALSE           ajp_get_reply() returns JK_STATUS_ERROR
+ *           Only if !op->recoverable
+ * JK_STATUS_FATAL_ERROR JK_HTTP_SERVER_BUSY JK_TRUE          ajp_get_reply() returns JK_STATUS_ERROR
+ *           Only if op->recoverable and no more ajp13/ajp14 direct retries
+ * JK_STATUS_FATAL_ERROR JK_HTTP_SERVER_BUSY JK_FALSE         ajp_get_reply() returns JK_STATUS_FATAL_ERROR
+ *           Only if !op->recoverable
+ * JK_REPLY_TIMEOUT  JK_HTTP_GATEWAY_TIME_OUT JK_TRUE         ajp_get_reply() returns JK_REPLY_TIMEOUT
+ * ??? JK_FATAL_ERROR    JK_HTTP_GATEWAY_TIME_OUT JK_FALSE        ajp_get_reply() returns something else
+ *           Only if !op->recoverable
+ * ??? JK_FALSE          JK_HTTP_SERVER_BUSY    JK_TRUE           ajp_get_reply() returns JK_FALSE
+ *           Only if op->recoverable and no more ajp13/ajp14 direct retries
+ * JK_TRUE           JK_HTTP_OK             ?                 OK
  */
 static int JK_METHOD ajp_service(jk_endpoint_t *e,
                                  jk_ws_service_t *s,
@@ -1844,6 +2062,10 @@
     ajp_operation_t oper;
     ajp_operation_t *op = &oper;
     ajp_endpoint_t *p;
+    ajp_worker_t *aw;
+    int log_error;
+    int rc = JK_UNSET;
+    char *msg;
 
     JK_TRACE_ENTER(l);
 
@@ -1856,20 +2078,26 @@
     }
 
     p = e->endpoint_private;
+    aw = p->worker;
 
-    /* Set returned error to OK */
-    *is_error = JK_HTTP_OK;
+    jk_shm_lock();
+    if (aw->sequence != aw->s->h.sequence)
+        jk_ajp_pull(aw, l);
+    jk_shm_unlock();
 
+    aw->s->used++;
+
+    /* Set returned error to SERVER ERROR */
+    *is_error = JK_HTTP_SERVER_ERROR;
+
     op->request = jk_b_new(&(p->pool));
     if (!op->request) {
-        *is_error = JK_HTTP_SERVER_ERROR;
         jk_log(l, JK_LOG_ERROR,
                "Failed allocating AJP message");
         JK_TRACE_EXIT(l);
         return JK_SERVER_ERROR;
     }
-    if (jk_b_set_buffer_size(op->request, p->worker->max_packet_size)) {
-        *is_error = JK_HTTP_SERVER_ERROR;
+    if (jk_b_set_buffer_size(op->request, aw->max_packet_size)) {
         jk_log(l, JK_LOG_ERROR,
                "Failed allocating AJP message buffer");
         JK_TRACE_EXIT(l);
@@ -1879,14 +2107,12 @@
 
     op->reply = jk_b_new(&(p->pool));
     if (!op->reply) {
-        *is_error = JK_HTTP_SERVER_ERROR;
         jk_log(l, JK_LOG_ERROR,
                "Failed allocating AJP message");
         JK_TRACE_EXIT(l);
         return JK_SERVER_ERROR;
     }
-    if (jk_b_set_buffer_size(op->reply, p->worker->max_packet_size)) {
-        *is_error = JK_HTTP_SERVER_ERROR;
+    if (jk_b_set_buffer_size(op->reply, aw->max_packet_size)) {
         jk_log(l, JK_LOG_ERROR,
                "Failed allocating AJP message buffer");
         JK_TRACE_EXIT(l);
@@ -1896,14 +2122,12 @@
 
     op->post = jk_b_new(&(p->pool));
     if (!op->post) {
-        *is_error = JK_HTTP_SERVER_ERROR;
         jk_log(l, JK_LOG_ERROR,
                "Failed allocating AJP message");
         JK_TRACE_EXIT(l);
         return JK_SERVER_ERROR;
     }
-    if (jk_b_set_buffer_size(op->post, p->worker->max_packet_size)) {
-        *is_error = JK_HTTP_SERVER_ERROR;
+    if (jk_b_set_buffer_size(op->post, aw->max_packet_size)) {
         jk_log(l, JK_LOG_ERROR,
                "Failed allocating AJP message buffer");
         JK_TRACE_EXIT(l);
@@ -1911,207 +2135,206 @@
     }
     jk_b_reset(op->post);
 
+    /* Set returned error to OK */
+    *is_error = JK_HTTP_OK;
+
     op->recoverable = JK_TRUE;
     op->uploadfd = -1;      /* not yet used, later ;) */
 
     p->left_bytes_to_send = s->content_length;
     p->reuse = JK_FALSE;
 
-    s->secret = p->worker->secret;
+    s->secret = aw->secret;
 
     /*
-     * We get here initial request (in reqmsg)
+     * We get here initial request (in op->request)
      */
     if (!ajp_marshal_into_msgb(op->request, s, l, p)) {
-        *is_error = JK_REQUEST_TOO_LARGE;
+        *is_error = JK_HTTP_REQUEST_TOO_LARGE;
         jk_log(l, JK_LOG_INFO,
                 "Creating AJP message failed, "
                 "without recovery");
+        aw->s->client_errors++;
         JK_TRACE_EXIT(l);
         return JK_CLIENT_ERROR;
     }
 
     if (JK_IS_DEBUG_LEVEL(l)) {
         jk_log(l, JK_LOG_DEBUG, "processing %s with %d retries",
-               p->worker->name, p->worker->worker.retries);
+               aw->name, aw->retries);
     }
-    /*
-     * JK_RETRIES could be replaced by the number of workers in
-     * a load-balancing configuration
-     */
-    for (i = 0; i < p->worker->worker.retries; i++) {
+    aw->s->busy++;
+    if (aw->s->state == JK_AJP_STATE_ERROR)
+        aw->s->state = JK_AJP_STATE_PROBE;
+    if (aw->s->busy > aw->s->max_busy)
+        aw->s->max_busy = aw->s->busy;
+    for (i = 0; i < aw->retries; i++) {
         /*
-         * We're using reqmsg which hold initial request
-         * if Tomcat is stopped or restarted, we will pass reqmsg
+         * We're using op->request which hold initial request
+         * if Tomcat is stopped or restarted, we will pass op->request
          * to next valid tomcat.
          */
+        log_error = JK_TRUE;
+        rc = JK_UNSET;
+        msg = "";
         err = ajp_send_request(e, s, l, p, op);
-        if (err == JK_TRUE) {
+        e->recoverable = op->recoverable;
+        if (err == JK_CLIENT_RD_ERROR) {
+            *is_error = JK_HTTP_BAD_REQUEST;
+            msg = "because of client read error";
+            aw->s->client_errors++;
+            rc = JK_CLIENT_ERROR;
+            log_error = JK_FALSE;
+            e->recoverable = JK_FALSE;
 
-            /* If we have an unrecoverable error, it's probably because
-             * the sender (browser) stopped sending data before the end
-             * (certainly in a big post)
-             */
+              /* This doesn't make sense, because we already set reuse */
+              /* to JK_FALSE at the beginning of service() and only set it to true again after */
+              /* the whole response has beend received (callback JK_AJP13_END_RESPONSE). */
+//            if (aw->recovery_opts & RECOVER_ABORT_IF_CLIENTERROR) {
+//                /* Mark the endpoint for shutdown */
+//                p->reuse = JK_FALSE;
+//            }
+        }
+        else if (err == JK_FATAL_ERROR) {
+            *is_error = JK_HTTP_SERVER_BUSY;
+            msg = "because of error during request sending";
+            rc = err;
             if (!op->recoverable) {
                 *is_error = JK_HTTP_SERVER_ERROR;
-                jk_log(l, JK_LOG_ERROR,
-                       "(%s) sending request to tomcat failed "
-                       "without recovery in send loop %d",
-                       p->worker->name, i);
-                JK_TRACE_EXIT(l);
-                return JK_FALSE;
+                msg = "because of protocol error during request sending";
             }
-
+        }
+        else if (err == JK_TRUE && op->recoverable) {
             /* Up to there we can recover */
 
             err = ajp_get_reply(e, s, l, p, op);
+            e->recoverable = op->recoverable;
             if (err == JK_TRUE) {
                 *is_error = JK_HTTP_OK;
                 /* Done with the request */
+                ajp_update_stats(e, aw, JK_TRUE, l);
                 JK_TRACE_EXIT(l);
                 return JK_TRUE;
             }
 
             if (err == JK_CLIENT_RD_ERROR) {
                 *is_error = JK_HTTP_BAD_REQUEST;
-                if (p->worker->recovery_opts & RECOVER_ABORT_IF_CLIENTERROR) {
-                    /* Mark the endpoint for shutdown */
-                    p->reuse = JK_FALSE;
-                }
-                jk_log(l, JK_LOG_INFO,
-                       "(%s) request failed, "
-                       "because of client read error "
-                       "without recovery in send loop attempt=%d",
-                       p->worker->name, i);
-                JK_TRACE_EXIT(l);
-                return JK_CLIENT_ERROR;
+                msg = "because of client read error";
+                aw->s->client_errors++;
+                rc = JK_CLIENT_ERROR;
+                log_error = JK_FALSE;
+                e->recoverable = JK_FALSE;
+                op->recoverable = JK_FALSE;
+                  /* This doesn't make sense, because we already set reuse */
+                  /* to JK_FALSE at the beginning of service() and only set it to true again after */
+                  /* the whole response has beend received (callback JK_AJP13_END_RESPONSE). */
+//                if (aw->recovery_opts & RECOVER_ABORT_IF_CLIENTERROR) {
+//                    /* Mark the endpoint for shutdown */
+//                    p->reuse = JK_FALSE;
+//                }
             }
             else if (err == JK_CLIENT_WR_ERROR) {
                 /* XXX: Is this correct to log this as 200? */
                 *is_error = JK_HTTP_OK;
-                if (p->worker->recovery_opts & RECOVER_ABORT_IF_CLIENTERROR) {
-                    /* Mark the endpoint for shutdown */
-                    p->reuse = JK_FALSE;
-                }
-                jk_log(l, JK_LOG_INFO,
-                       "(%s) request failed, "
-                       "because of client write error "
-                       "without recovery in send loop attempt=%d",
-                       p->worker->name, i);
-                JK_TRACE_EXIT(l);
-                return JK_CLIENT_ERROR;
+                msg = "because of client write error";
+                aw->s->client_errors++;
+                rc = JK_CLIENT_ERROR;
+                log_error = JK_FALSE;
+                e->recoverable = JK_FALSE;
+                op->recoverable = JK_FALSE;
+                  /* This doesn't make sense, because we already set reuse */
+                  /* to JK_FALSE at the beginning of service() and only set it to true again after */
+                  /* the whole response has beend received (callback JK_AJP13_END_RESPONSE). */
+//                if (aw->recovery_opts & RECOVER_ABORT_IF_CLIENTERROR) {
+//                    /* Mark the endpoint for shutdown */
+//                    p->reuse = JK_FALSE;
+//                }
             }
-            else if (err == JK_SERVER_ERROR) {
+            else if (err == JK_FATAL_ERROR) {
                 *is_error = JK_HTTP_SERVER_ERROR;
-                jk_log(l, JK_LOG_INFO,
-                       "(%s) request failed, "
-                       "because of server error "
-                       "without recovery in send loop attempt=%d",
-                       p->worker->name, i);
-                JK_TRACE_EXIT(l);
-                return JK_SERVER_ERROR;
+                msg = "because of server error";
+                rc = err;
             }
+            else if (err == JK_REPLY_TIMEOUT) {
+                *is_error = JK_HTTP_GATEWAY_TIME_OUT;
+                msg = "because of reply timeout";
+                aw->s->reply_timeouts++;
+                rc = err;
+            }
             else if (err == JK_STATUS_ERROR || err == JK_STATUS_FATAL_ERROR) {
-                jk_log(l, JK_LOG_INFO,
-                       "(%s) request failed%s, "
-                       "because of response status %d, "
-                       "recoverable operation attempt=%d",
-                       p->worker->name,
-                       err == JK_STATUS_FATAL_ERROR ? "" : " (soft)",
-                       s->http_response_status, i);
+                *is_error = JK_HTTP_SERVER_BUSY;
+                msg = "because of response status";
+                rc = err;
                 if (i >= JK_RETRIES) {
                     jk_sleep(JK_SLEEP_DEF);
                 }
             }
+            /* This should only be the cases err == JK_FALSE */
             else {
                 /* if we can't get reply, check if unrecoverable flag was set
                  * if is_recoverable_error is cleared, we have started
                  * receiving upload data and we must consider that
                  * operation is no more recoverable
                  */
-                if (!op->recoverable) {
-                    *is_error = JK_HTTP_BAD_GATEWAY;
-                    jk_log(l, JK_LOG_ERROR,
-                           "(%s) receiving reply from tomcat failed "
-                           "without recovery in send loop attempt=%d",
-                           p->worker->name, i);
-                    if (err == JK_REPLY_TIMEOUT) {
-                        *is_error = JK_HTTP_GATEWAY_TIME_OUT;
-                        JK_TRACE_EXIT(l);
-                        return JK_REPLY_TIMEOUT;
-                    }
-                    JK_TRACE_EXIT(l);
-                    return JK_FALSE;
-                }
-                jk_log(l, JK_LOG_INFO,
-                       "(%s) receiving from tomcat failed, "
-                       "recoverable operation attempt=%d",
-                       p->worker->name, i);
+                *is_error = JK_HTTP_BAD_GATEWAY;
+                msg = "";
+                rc = JK_FALSE;
                 /* Check for custom retries */
                 if (i >= JK_RETRIES) {
                     jk_sleep(JK_SLEEP_DEF);
                 }
             }
         }
-        if (err == JK_CLIENT_RD_ERROR) {
-            *is_error = JK_HTTP_BAD_REQUEST;
-            if (p->worker->recovery_opts & RECOVER_ABORT_IF_CLIENTERROR) {
-                /* Mark the endpoint for shutdown */
-                p->reuse = JK_FALSE;
-            }
-            jk_log(l, JK_LOG_INFO,
-                   "(%s) sending request to tomcat failed, "
-                   "because of client read error "
-                   "without recovery in send loop attempt=%d",
-                   p->worker->name, i);
-            JK_TRACE_EXIT(l);
-            return JK_CLIENT_ERROR;
+        else {
+            /* XXX: this should never happen:
+             *      ajp_send_request() never returns JK_TRUE if !op->recoverable.
+             *      and all other return values have already been handled.
+             */
+            e->recoverable = JK_FALSE;
+            *is_error = JK_HTTP_SERVER_ERROR;
+            msg = "because of an unknown reason";
+            rc = JK_FATAL_ERROR;
+            jk_log(l, JK_LOG_ERROR,
+                   "(%s) unexpected condition err=%d recoverable=%d",
+                   aw->name, err, op->recoverable);
         }
-        else if (err == JK_CLIENT_WR_ERROR) {
-            *is_error = JK_HTTP_OK;
-            if (p->worker->recovery_opts & RECOVER_ABORT_IF_CLIENTERROR) {
-                /* Mark the endpoint for shutdown */
-                p->reuse = JK_FALSE;
-            }
-            jk_log(l, JK_LOG_INFO,
-                   "(%s) sending request to tomcat failed, "
-                   "because of client write error "
-                   "without recovery in send loop attempt=%d",
-                   p->worker->name, i);
-            JK_TRACE_EXIT(l);
-            return JK_CLIENT_ERROR;
+        if (!op->recoverable && log_error == JK_TRUE) {
+            jk_log(l, JK_LOG_ERROR,
+                   "(%s) sending request to tomcat failed (unrecoverable), "
+                   "%s "
+                   "(attempt=%d)",
+                   aw->name, msg, i + 1);
         }
         else {
             jk_log(l, JK_LOG_INFO,
-                   "(%s) sending request to tomcat failed,  "
-                   "recoverable operation attempt=%d",
-                   p->worker->name, i + 1);
+                   "(%s) sending request to tomcat failed (%srecoverable), "
+                   "%s "
+                   "(attempt=%d)",
+                   aw->name,
+                   op->recoverable ? "" : "un",
+                   msg, i + 1);
         }
+        if (!op->recoverable) {
+            ajp_update_stats(e, aw, rc, l);
+            JK_TRACE_EXIT(l);
+            return rc;
+        }
         /* Get another connection from the pool and try again.
          * Note: All sockets are probably closed already.
          */
         ajp_next_connection(p, l);
     }
-    *is_error = JK_HTTP_SERVER_BUSY;
     /* Log the error only once per failed request. */
     jk_log(l, JK_LOG_ERROR,
            "(%s) Connecting to tomcat failed. Tomcat is probably not started "
            "or is listening on the wrong port",
-           p->worker->name);
+           aw->name);
 
-    if (err == JK_STATUS_ERROR) {
-        JK_TRACE_EXIT(l);
-        return JK_STATUS_ERROR;
-    }
+/* XXX: Do we need to fix rc or is_error before returning? */
 
-    if (err == JK_REPLY_TIMEOUT) {
-        *is_error = JK_HTTP_GATEWAY_TIME_OUT;
-        JK_TRACE_EXIT(l);
-        return JK_REPLY_TIMEOUT;
-    }
-
+    ajp_update_stats(e, aw, rc, l);
     JK_TRACE_EXIT(l);
-    return JK_FALSE;
+    return rc;
 }
 
 /*
@@ -2152,8 +2375,9 @@
                    "worker %s contact is '%s:%d'",
                    p->name, p->host, p->port);
 
+/* XXX: Why do we only resolve, if port > 1024 ? */
         if (p->port > 1024) {
-            if (jk_resolve(p->host, p->port, &p->worker_inet_addr)) {
+            if (jk_resolve(p->host, p->port, &p->worker_inet_addr, l)) {
                 JK_TRACE_EXIT(l);
                 return JK_TRUE;
             }
@@ -2178,6 +2402,7 @@
     time_t now = time(NULL);
 
     JK_TRACE_ENTER(l);
+
     p->ep_cache = (ajp_endpoint_t **)calloc(1, sizeof(ajp_endpoint_t *) *
                                             p->ep_cache_sz);
     if (!p->ep_cache) {
@@ -2188,26 +2413,26 @@
         jk_log(l, JK_LOG_DEBUG,
                 "setting connection pool size to %u with min %u",
                 p->ep_cache_sz, p->ep_mincache_sz);
-        for (i = 0; i < p->ep_cache_sz; i++) {
-            p->ep_cache[i] = (ajp_endpoint_t *)calloc(1, sizeof(ajp_endpoint_t));
-            if (!p->ep_cache[i]) {
-                jk_log(l, JK_LOG_ERROR,
-                        "allocating endpoint slot %d (errno=%d)",
-                        i, errno);
-                JK_TRACE_EXIT(l);
-                return JK_FALSE;
-            }
-            p->ep_cache[i]->sd = JK_INVALID_SOCKET;
-            p->ep_cache[i]->reuse = JK_FALSE;
-            p->ep_cache[i]->last_access = now;
-            jk_open_pool(&(p->ep_cache[i]->pool), p->ep_cache[i]->buf,
-                         sizeof(p->ep_cache[i]->buf));
-            p->ep_cache[i]->worker = p;
-            p->ep_cache[i]->endpoint.endpoint_private = p->ep_cache[i];
-            p->ep_cache[i]->proto = proto;
-            p->ep_cache[i]->endpoint.service = ajp_service;
-            p->ep_cache[i]->endpoint.done    = ajp_done;
+    for (i = 0; i < p->ep_cache_sz; i++) {
+        p->ep_cache[i] = (ajp_endpoint_t *)calloc(1, sizeof(ajp_endpoint_t));
+        if (!p->ep_cache[i]) {
+            jk_log(l, JK_LOG_ERROR,
+                    "allocating endpoint slot %d (errno=%d)",
+                    i, errno);
+            JK_TRACE_EXIT(l);
+            return JK_FALSE;
         }
+        p->ep_cache[i]->sd = JK_INVALID_SOCKET;
+        p->ep_cache[i]->reuse = JK_FALSE;
+        p->ep_cache[i]->last_access = now;
+        jk_open_pool(&(p->ep_cache[i]->pool), p->ep_cache[i]->buf,
+                     sizeof(p->ep_cache[i]->buf));
+        p->ep_cache[i]->worker = p;
+        p->ep_cache[i]->endpoint.endpoint_private = p->ep_cache[i];
+        p->ep_cache[i]->proto = proto;
+        p->ep_cache[i]->endpoint.service = ajp_service;
+        p->ep_cache[i]->endpoint.done    = ajp_done;
+    }
 
     JK_TRACE_EXIT(l);
     return JK_TRUE;
@@ -2258,6 +2483,11 @@
         p->recovery_opts =
             jk_get_worker_recovery_opts(props, p->name,
                                         AJP_DEF_RECOVERY_OPTS);
+
+        p->retries =
+            jk_get_worker_retries(props, p->name,
+                                  JK_RETRIES);
+
         p->max_packet_size =
             jk_get_max_packet_size(props, p->name);
 
@@ -2265,17 +2495,18 @@
                                      &p->http_status_fail[0],
                                      JK_MAX_HTTP_STATUS_FAILS);
 
-
-        pThis->retries =
-            jk_get_worker_retries(props, p->name,
-                                  JK_RETRIES);
-        if (pThis->retries < 1) {
+        if (p->retries < 1) {
             jk_log(l, JK_LOG_INFO,
-                   "number of retries must be grater then 1. Setting to default=%d",
+                   "number of retries must be greater then 1. Setting to default=%d",
                    JK_RETRIES);
-            pThis->retries = JK_RETRIES;
+            p->retries = JK_RETRIES;
         }
 
+        p->maintain_time = jk_get_worker_maintain_time(props);
+        if(p->maintain_time < 0)
+            p->maintain_time = 0;
+        p->s->last_maintain_time = time(NULL);
+
         if (JK_IS_DEBUG_LEVEL(l)) {
 
             jk_log(l, JK_LOG_DEBUG,
@@ -2315,7 +2546,7 @@
 
             jk_log(l, JK_LOG_DEBUG,
                    "retries:          %d",
-                    pThis->retries);
+                    p->retries);
 
             jk_log(l, JK_LOG_DEBUG,
                    "max packet size:  %d",
@@ -2353,6 +2584,57 @@
     return rc;
 }
 
+int JK_METHOD ajp_worker_factory(jk_worker_t **w,
+                                 const char *name, jk_logger_t *l)
+{
+    ajp_worker_t *aw;
+
+    JK_TRACE_ENTER(l);
+    if (name == NULL || w == NULL) {
+        JK_LOG_NULL_PARAMS(l);
+        JK_TRACE_EXIT(l);
+        return JK_FALSE;
+    }
+
+    aw = (ajp_worker_t *) calloc(1, sizeof(ajp_worker_t));
+    if (!aw) {
+        jk_log(l, JK_LOG_ERROR,
+               "malloc of private_data failed");
+        JK_TRACE_EXIT(l);
+        return JK_FALSE;
+    }
+
+    jk_open_pool(&aw->p,
+                 aw->buf,
+                 sizeof(jk_pool_atom_t) * TINY_POOL_SIZE);
+
+    strncpy(aw->name, name, JK_SHM_STR_SIZ);
+    aw->login = NULL;
+
+    aw->ep_cache_sz = 0;
+    aw->ep_cache = NULL;
+    aw->connect_retry_attempts = AJP_DEF_RETRY_ATTEMPTS;
+    aw->worker.worker_private = aw;
+
+    aw->worker.maintain = ajp_maintain;
+
+    aw->logon = NULL;
+
+    *w = &aw->worker;
+
+    aw->s = jk_shm_alloc_ajp_worker(&aw->p);
+    if (!aw->s) {
+        jk_close_pool(&aw->p);
+        free(aw);
+        jk_log(l, JK_LOG_ERROR,
+               "allocating ajp worker record from shared memory");
+        JK_TRACE_EXIT(l);
+        return JK_FALSE;
+    }
+    JK_TRACE_EXIT(l);
+    return JK_TRUE;
+}
+
 int ajp_destroy(jk_worker_t **pThis, jk_logger_t *l, int proto)
 {
     JK_TRACE_ENTER(l);
@@ -2382,6 +2664,7 @@
             aw->login = NULL;
         }
 
+        jk_close_pool(&aw->p);
         free(aw);
         JK_TRACE_EXIT(l);
         return JK_TRUE;
@@ -2395,47 +2678,29 @@
 int JK_METHOD ajp_done(jk_endpoint_t **e, jk_logger_t *l)
 {
     JK_TRACE_ENTER(l);
+
     if (e && *e && (*e)->endpoint_private) {
         ajp_endpoint_t *p = (*e)->endpoint_private;
         int rc;
         ajp_worker_t *w = p->worker;
 
+        /* set last_access only if needed */
+        if (w->cache_timeout > 0)
+            p->last_access = time(NULL);
+        ajp_reset_endpoint(p, l);
+        *e = NULL;
         JK_ENTER_CS(&w->cs, rc);
         if (rc) {
             int i;
-            jk_sock_t sock = JK_INVALID_SOCKET;
 
-            /* If we are going to close the connection, then park the socket so
-               we can shut it down nicely rather than letting ajp_reset_endpoint kill it */
-            if (IS_VALID_SOCKET(p->sd) && !p->reuse) {
-                if (JK_IS_DEBUG_LEVEL(l))
-                    jk_log(l, JK_LOG_DEBUG,
-                    "will be shutting down socket %u for worker %s",
-                            p->sd, p->worker->name );
-                sock  = p->sd;
-                p->sd = JK_INVALID_SOCKET;
-            }
-            for(i = w->ep_cache_sz - 1; i >= 0; i--) {
+            for (i = w->ep_cache_sz - 1; i >= 0; i--) {
                 if (w->ep_cache[i] == NULL) {
                     w->ep_cache[i] = p;
                     break;
                 }
             }
-            ajp_reset_endpoint(p, l);
-            *e = NULL;
-            /* set last_access only if needed */
-            if (w->cache_timeout > 0)
-                p->last_access = time(NULL);
             JK_LEAVE_CS(&w->cs, rc);
 
-            /* Drain and close the socket */
-            if (IS_VALID_SOCKET(sock)) {
-                if (JK_IS_DEBUG_LEVEL(l))
-                    jk_log(l, JK_LOG_DEBUG,
-                    "Shutting down held socket %u in worker %s",
-                            sock, p->worker->name);
-                jk_shutdown_socket(sock);
-            }
             if (i >= 0) {
                 if (JK_IS_DEBUG_LEVEL(l))
                     jk_log(l, JK_LOG_DEBUG,
@@ -2444,7 +2709,7 @@
                 JK_TRACE_EXIT(l);
                 return JK_TRUE;
             }
-            /* XXX: This should never hapen because
+            /* This should never hapen because
              * there is always free empty cache slot
              */
             jk_log(l, JK_LOG_ERROR,
@@ -2490,10 +2755,10 @@
                     break;
                 }
             }
+            JK_LEAVE_CS(&aw->cs, rc);
             if (ae) {
                 ae->last_access = now;
                 *je = &ae->endpoint;
-                JK_LEAVE_CS(&aw->cs, rc);
                 if (JK_IS_DEBUG_LEVEL(l))
                     jk_log(l, JK_LOG_DEBUG,
                            "acquired connection pool slot=%u",
@@ -2506,7 +2771,6 @@
                         "Unable to get the free endpoint for worker %s from %u slots",
                         aw->name, aw->ep_cache_sz);
             }
-            JK_LEAVE_CS(&aw->cs, rc);
         }
         else {
            jk_log(l, JK_LOG_ERROR,
@@ -2534,22 +2798,45 @@
     if (pThis && pThis->worker_private) {
         ajp_worker_t *aw = pThis->worker_private;
         int rc;
+        long delta;
+
+        jk_shm_lock();
+
+        /* Now we check for global maintenance (once for all processes).
+         * Checking workers for idleness.
+         * Therefore we globally sync and we use a global timestamp.
+         * Since it's possible that we come here a few milliseconds
+         * before the interval has passed, we allow a little tolerance.
+         */
+        delta = (long)difftime(now, aw->s->last_maintain_time) + JK_AJP_MAINTAIN_TOLERANCE;
+        if (delta >= aw->maintain_time) {
+            aw->s->last_maintain_time = now;
+            if (aw->s->state == JK_AJP_STATE_OK &&
+                aw->s->used == aw->s->used_snapshot)
+                aw->s->state = JK_AJP_STATE_IDLE;
+            aw->s->used_snapshot = aw->s->used;
+        }
+
+        jk_shm_unlock();
+
         /* Obtain current time only if needed */
         if (aw->cache_timeout <= 0) {
             /* Nothing to do. */
             JK_TRACE_EXIT(l);
             return JK_TRUE;
         }
+
         JK_ENTER_CS(&aw->cs, rc);
         if (rc) {
-            unsigned int i, n = 0, cnt = 0;
+            unsigned int n = 0, cnt = 0;
+            int i;
             /* Count open slots */
-            for (i = 0; i < aw->ep_cache_sz; i++) {
+            for (i = (int)aw->ep_cache_sz - 1; i >= 0; i--) {
                 if (aw->ep_cache[i] && IS_VALID_SOCKET(aw->ep_cache[i]->sd))
                     cnt++;
             }
             /* Handle worker cache and recycle timeouts */
-            for (i = 0; i < aw->ep_cache_sz; i++) {
+            for (i = (int)aw->ep_cache_sz - 1; i >= 0; i--) {
                 /* Skip the closed sockets */
                 if (aw->ep_cache[i] && IS_VALID_SOCKET(aw->ep_cache[i]->sd)) {
                     int elapsed = (int)difftime(now, aw->ep_cache[i]->last_access);
@@ -2562,11 +2849,11 @@
                         ajp_reset_endpoint(aw->ep_cache[i], l);
                         if (JK_IS_DEBUG_LEVEL(l))
                             jk_log(l, JK_LOG_DEBUG,
-                                    "cleaning pool slot=%u elapsed %d in %d",
+                                    "cleaning pool slot=%d elapsed %d in %d",
                                     i, elapsed, (int)(difftime(time(NULL), rt)));
                     }
                 }
-                if ((cnt - n) <= aw->ep_mincache_sz) {
+                if (cnt <= aw->ep_mincache_sz + n) {
                     if (JK_IS_DEBUG_LEVEL(l)) {
                         jk_log(l, JK_LOG_DEBUG,
                         "reached pool min size %u from %u cache slots",
@@ -2575,12 +2862,12 @@
                     break;
                 }
             }
+            JK_LEAVE_CS(&aw->cs, rc);
             if (JK_IS_DEBUG_LEVEL(l))
                 jk_log(l, JK_LOG_DEBUG,
                         "recycled %u sockets in %d seconds from %u pool slots",
                         n, (int)(difftime(time(NULL), now)),
                         aw->ep_cache_sz);
-            JK_LEAVE_CS(&aw->cs, rc);
             JK_TRACE_EXIT(l);
             return JK_TRUE;
         }

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_ajp_common.h
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_ajp_common.h	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_ajp_common.h	2008-04-06 12:38:06 UTC (rev 6107)
@@ -19,7 +19,7 @@
  * Description: common stuff for bi-directional protocol ajp13/ajp14.      *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
  * Author:      Henri Gomez <hgomez at apache.org>                            *
- * Version:     $Revision: 550221 $                                          *
+ * Version:     $Revision: 611672 $                                          *
  ***************************************************************************/
 
 #ifndef JK_AJP_COMMON_H
@@ -27,6 +27,7 @@
 
 #include "jk_service.h"
 #include "jk_msg_buff.h"
+#include "jk_shm.h"
 #include "jk_mt.h"
 
 #ifdef __cplusplus
@@ -34,6 +35,22 @@
 {
 #endif                          /* __cplusplus */
 
+#define JK_AJP_STATE_IDLE               (0)
+#define JK_AJP_STATE_OK                 (1)
+#define JK_AJP_STATE_ERROR              (2)
+#define JK_AJP_STATE_PROBE              (3)
+#define JK_AJP_STATE_DEF                (JK_AJP_STATE_IDLE)
+#define JK_AJP_STATE_TEXT_IDLE          ("OK/IDLE")
+#define JK_AJP_STATE_TEXT_OK            ("OK")
+#define JK_AJP_STATE_TEXT_ERROR         ("ERR")
+#define JK_AJP_STATE_TEXT_PROBE         ("ERR/PRB")
+#define JK_AJP_STATE_TEXT_MAX           (JK_AJP_STATE_PROBE)
+#define JK_AJP_STATE_TEXT_DEF           (JK_AJP_STATE_TEXT_IDLE)
+
+/* We accept doing global maintenance if we are */
+/* JK_AJP_MAINTAIN_TOLERANCE seconds early. */
+#define JK_AJP_MAINTAIN_TOLERANCE (2)
+
 /*
  * Conditional request attributes
  *
@@ -232,11 +249,26 @@
 
 struct ajp_worker
 {
+    jk_worker_t worker;
+    /* Shared memory worker data */
+    jk_shm_ajp_worker_t *s;
+
+    char         name[JK_SHM_STR_SIZ+1];
+    /* Sequence counter starting at 0 and increasing
+     * every time we change the config
+     */
+    volatile unsigned int sequence;
+
+    jk_pool_t p;
+    jk_pool_atom_t buf[TINY_POOL_SIZE];
+
+    JK_CRIT_SEC cs;
+
     struct sockaddr_in worker_inet_addr;    /* Contains host and port */
     unsigned connect_retry_attempts;
-    const char *name;
     const char *host;
     int port;
+    int maintain_time;
     /*
      * Open connections cache...
      *
@@ -244,7 +276,6 @@
      * 2. Cache size.
      * 3. An array of "open" endpoints.
      */
-    JK_CRIT_SEC cs;
     unsigned int ep_cache_sz;
     unsigned int ep_mincache_sz;
     unsigned int ep_maxcache_sz;
@@ -257,8 +288,6 @@
     /* Weak secret similar with ajp12, used in ajp13 */
     const char *secret;
 
-    jk_worker_t worker;
-
     /*
      * Post physical connect handler.
      * AJP14 will set here its login handler
@@ -284,10 +313,16 @@
     int prepost_timeout;   /* before sending a request cping/cpong timeout delay in ms (0 means disabled) */
 
     /*
-     * Recovery option
+     * Recovery options
      */
-    unsigned int recovery_opts; /* Set the recovery option */
+    unsigned int recovery_opts;
     
+    /*
+     * Public property to enable the number of retry attempts
+     * on this worker.
+     */
+    int retries;
+
     unsigned int max_packet_size;  /*  Maximum AJP Packet size */
     
     /* 
@@ -342,6 +377,10 @@
  */
 
 
+const char *jk_ajp_get_state(ajp_worker_t *aw, jk_logger_t *l);
+
+int jk_ajp_get_state_code(const char *v);
+
 int ajp_validate(jk_worker_t *pThis,
                  jk_map_t *props,
                  jk_worker_env_t *we, jk_logger_t *l, int proto);
@@ -350,6 +389,9 @@
              jk_map_t *props,
              jk_worker_env_t *we, jk_logger_t *l, int proto);
 
+int JK_METHOD ajp_worker_factory(jk_worker_t **w,
+                                 const char *name, jk_logger_t *l);
+
 int ajp_destroy(jk_worker_t **pThis, jk_logger_t *l, int proto);
 
 int JK_METHOD ajp_done(jk_endpoint_t **e, jk_logger_t *l);
@@ -361,6 +403,10 @@
 
 void ajp_close_endpoint(ajp_endpoint_t * ae, jk_logger_t *l);
 
+void jk_ajp_pull(ajp_worker_t * aw, jk_logger_t *l);
+
+void jk_ajp_push(ajp_worker_t * aw, jk_logger_t *l);
+
 int ajp_connection_tcp_send_message(ajp_endpoint_t * ae,
                                     jk_msg_buf_t *msg, jk_logger_t *l);
 

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_connect.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_connect.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_connect.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -23,7 +23,7 @@
  * @package jk_connect
  * @author      Gal Shachor <shachor at il.ibm.com>
  * @author      Mladen Turk <mturk at apache.org>
- * @version     $Revision: 555199 $
+ * @version     $Revision: 603677 $
  */
 
 
@@ -58,6 +58,12 @@
 typedef const char* SET_TYPE;
 #endif
 
+/** Set socket to blocking
+ * @param sd  socket to manipulate
+ * @return    errno: fcntl returns -1 (!WIN32)
+ *            pseudo errno: ioctlsocket returns SOCKET_ERROR (WIN32)
+ *            0: success
+ */
 static int soblock(jk_sock_t sd)
 {
 /* BeOS uses setsockopt at present for non blocking... */
@@ -79,14 +85,20 @@
     }
 #else
     u_long on = 0;
-    if (ioctlsocket(sd, FIONBIO, &on) == SOCKET_ERROR) {
-        errno = WSAGetLastError() - WSABASEERR;
+    if (JK_IS_SOCKET_ERROR(ioctlsocket(sd, FIONBIO, &on))) {
+        JK_GET_SOCKET_ERRNO();
         return errno;
     }
 #endif /* WIN32 */
     return 0;
 }
 
+/** Set socket to non-blocking
+ * @param sd  socket to manipulate
+ * @return    errno: fcntl returns -1 (!WIN32)
+ *            pseudo errno: ioctlsocket returns SOCKET_ERROR (WIN32)
+ *            0: success
+ */
 static int sononblock(jk_sock_t sd)
 {
 #ifndef WIN32
@@ -107,8 +119,8 @@
     }
 #else
     u_long on = 1;
-    if (ioctlsocket(sd, FIONBIO, &on) == SOCKET_ERROR) {
-        errno = WSAGetLastError() - WSABASEERR;
+    if (JK_IS_SOCKET_ERROR(ioctlsocket(sd, FIONBIO, &on))) {
+        JK_GET_SOCKET_ERRNO();
         return errno;
     }
 #endif /* WIN32 */
@@ -117,66 +129,102 @@
 
 #if defined (WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
 /* WIN32 implementation */
-static int nb_connect(jk_sock_t sock, struct sockaddr *addr, int timeout)
+/** Non-blocking socket connect
+ * @param sd       socket to connect
+ * @param addr     address to connect to
+ * @param timeout  connect timeout in seconds
+ *                 (<=0: no timeout=blocking)
+ * @param l        logger
+ * @return         -1: some kind of error occured
+ *                 SOCKET_ERROR: no timeout given and error
+ *                               during blocking connect
+ *                 0: success
+ */
+static int nb_connect(jk_sock_t sd, struct sockaddr *addr, int timeout, jk_logger_t *l)
 {
     int rc;
-    if (timeout <= 0)
-        return connect(sock, addr, sizeof(struct sockaddr_in));
 
-    if ((rc = sononblock(sock)))
+    JK_TRACE_ENTER(l);
+
+    if (timeout <= 0) {
+        rc = connect(sd, addr, sizeof(struct sockaddr_in));
+        JK_TRACE_EXIT(l);
+        return rc;
+    }
+
+    if ((rc = sononblock(sd))) {
+        JK_TRACE_EXIT(l);
         return -1;
-    if (connect(sock, addr, sizeof(struct sockaddr_in)) == SOCKET_ERROR) {
+    }
+    if (JK_IS_SOCKET_ERROR(connect(sd, addr, sizeof(struct sockaddr_in)))) {
         struct timeval tv;
         fd_set wfdset, efdset;
 
         if ((rc = WSAGetLastError()) != WSAEWOULDBLOCK) {
-            soblock(sock);
+            soblock(sd);
             WSASetLastError(rc);
+            JK_TRACE_EXIT(l);
             return -1;
         }
         /* wait for the connect to complete or timeout */
         FD_ZERO(&wfdset);
-        FD_SET(sock, &wfdset);
+        FD_SET(sd, &wfdset);
         FD_ZERO(&efdset);
-        FD_SET(sock, &efdset);
+        FD_SET(sd, &efdset);
 
         tv.tv_sec  = timeout;
         tv.tv_usec = 0;
-        rc = select((int)sock + 1, NULL, &wfdset, &efdset, &tv);
-        if (rc == SOCKET_ERROR || rc == 0) {
+        rc = select((int)sd + 1, NULL, &wfdset, &efdset, &tv);
+        if (JK_IS_SOCKET_ERROR(rc) || rc == 0) {
             rc = WSAGetLastError();
-            soblock(sock);
+            soblock(sd);
             WSASetLastError(rc);
+            JK_TRACE_EXIT(l);
             return -1;
         }
         /* Evaluate the efdset */
-        if (FD_ISSET(sock, &efdset)) {
+        if (FD_ISSET(sd, &efdset)) {
             /* The connect failed. */
             int rclen = (int)sizeof(rc);
-            if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (char*) &rc, &rclen))
+            if (getsockopt(sd, SOL_SOCKET, SO_ERROR, (char*) &rc, &rclen))
                 rc = 0;
-            soblock(sock);
+            soblock(sd);
             if (rc)
                 WSASetLastError(rc);
+            JK_TRACE_EXIT(l);
             return -1;
         }
     }
-    soblock(sock);
+    soblock(sd);
+    JK_TRACE_EXIT(l);
     return 0;
 }
 
 #elif !defined(NETWARE)
 /* POSIX implementation */
-static int nb_connect(jk_sock_t sock, struct sockaddr *addr, int timeout)
+/** Non-blocking socket connect
+ * @param sd       socket to connect
+ * @param addr     address to connect to
+ * @param timeout  connect timeout in seconds
+ *                 (<=0: no timeout=blocking)
+ * @param l        logger
+ * @return         -1: some kind of error occured
+ *                 0: success
+ */
+static int nb_connect(jk_sock_t sd, struct sockaddr *addr, int timeout, jk_logger_t *l)
 {
     int rc = 0;
 
+    JK_TRACE_ENTER(l);
+
     if (timeout > 0) {
-        if (sononblock(sock))
+        if (sononblock(sd)) {
+            JK_TRACE_EXIT(l);
             return -1;
+        }
     }
     do {
-        rc = connect(sock, addr, sizeof(struct sockaddr_in));
+        rc = connect(sd, addr, sizeof(struct sockaddr_in));
     } while (rc == -1 && errno == EINTR);
 
     if ((rc == -1) && (errno == EINPROGRESS || errno == EALREADY)
@@ -186,21 +234,22 @@
         socklen_t rclen = (socklen_t)sizeof(rc);
 
         FD_ZERO(&wfdset);
-        FD_SET(sock, &wfdset);
+        FD_SET(sd, &wfdset);
         tv.tv_sec  = timeout;
         tv.tv_usec = 0;
-        rc = select(sock + 1, NULL, &wfdset, NULL, &tv);
+        rc = select(sd + 1, NULL, &wfdset, NULL, &tv);
         if (rc <= 0) {
             /* Save errno */
             int err = errno;
-            soblock(sock);
+            soblock(sd);
             errno = err;
+            JK_TRACE_EXIT(l);
             return -1;
         }
         rc = 0;
 #ifdef SO_ERROR
-        if (!FD_ISSET(sock, &wfdset) ||
-            (getsockopt(sock, SOL_SOCKET, SO_ERROR,
+        if (!FD_ISSET(sd, &wfdset) ||
+            (getsockopt(sd, SOL_SOCKET, SO_ERROR,
                         (char *)&rc, &rclen) < 0) || rc) {
             if (rc)
                 errno = rc;
@@ -211,14 +260,29 @@
     /* Not sure we can be already connected */
     if (rc == -1 && errno == EISCONN)
         rc = 0;
-    soblock(sock);
+    soblock(sd);
+    JK_TRACE_EXIT(l);
     return rc;
 }
 #else
 /* NETWARE implementation - blocking for now */
-static int nb_connect(jk_sock_t sock, struct sockaddr *addr, int timeout)
+/** Non-blocking socket connect
+ * @param sd       socket to connect
+ * @param addr     address to connect to
+ * @param timeout  connect timeout in seconds (ignored!)
+ * @param l        logger
+ * @return         -1: some kind of error occured
+ *                 0: success
+ */
+static int nb_connect(jk_sock_t sd, struct sockaddr *addr, int timeout, jk_logger_t *l)
 {
-    return connect(sock, addr, sizeof(struct sockaddr_in));
+    int rc;
+
+    JK_TRACE_ENTER(l);
+
+    rc = connect(sd, addr, sizeof(struct sockaddr_in));
+    JK_TRACE_EXIT(l);
+    return rc;
 }
 #endif
 
@@ -243,13 +307,21 @@
 
 #endif
 
-/** resolve the host IP */
-
-int jk_resolve(const char *host, int port, struct sockaddr_in *rc)
+/** Resolve the host IP
+ * @param host     host or ip address
+ * @param port     port
+ * @param rc       return value pointer
+ * @param l        logger
+ * @return         JK_FALSE: some kind of error occured
+ *                 JK_TRUE: success
+ */
+int jk_resolve(const char *host, int port, struct sockaddr_in *rc, jk_logger_t *l)
 {
     int x;
     struct in_addr laddr;
 
+    JK_TRACE_ENTER(l);
+
     memset(rc, 0, sizeof(struct sockaddr_in));
 
     rc->sin_port = htons((short)port);
@@ -262,7 +334,7 @@
         }
     }
 
-    /* If we found also characters we shoud make name to IP resolution */
+    /* If we found also characters we should make name to IP resolution */
     if (host[x] != '\0') {
 
 #ifdef HAVE_APR
@@ -270,13 +342,17 @@
         char *remote_ipaddr;
 
         if (!jk_apr_pool) {
-            if (apr_pool_create(&jk_apr_pool, NULL) != APR_SUCCESS)
+            if (apr_pool_create(&jk_apr_pool, NULL) != APR_SUCCESS) {
+                JK_TRACE_EXIT(l);
                 return JK_FALSE;
+            }
         }
         if (apr_sockaddr_info_get
             (&remote_sa, host, APR_UNSPEC, (apr_port_t) port, 0, jk_apr_pool)
-            != APR_SUCCESS)
+            != APR_SUCCESS) {
+            JK_TRACE_EXIT(l);
             return JK_FALSE;
+        }
 
         /* Since we are only handling AF_INET (IPV4) address (in_addr_t) */
         /* make sure we find one of those.                               */
@@ -287,8 +363,10 @@
         /* if temp_sa is set, we have a valid address otherwise, just return */
         if (NULL != temp_sa)
             remote_sa = temp_sa;
-        else
+        else {
+            JK_TRACE_EXIT(l);
             return JK_FALSE;
+        }
 
         apr_sockaddr_ip_get(&remote_ipaddr, remote_sa);
 
@@ -304,6 +382,7 @@
         struct hostent *hoste = gethostbyname(host);
 #endif
         if (!hoste) {
+            JK_TRACE_EXIT(l);
             return JK_FALSE;
         }
 
@@ -317,16 +396,27 @@
     }
     memcpy(&(rc->sin_addr), &laddr, sizeof(laddr));
 
+    JK_TRACE_EXIT(l);
     return JK_TRUE;
 }
 
-/** connect to Tomcat */
-
+/** Connect to Tomcat
+ * @param addr      address to connect to
+ * @param keepalive should we set SO_KEEPALIVE (if !=0)
+ * @param timeout   connect timeout in seconds
+ *                  (<=0: no timeout=blocking)
+ * @param sock_buf  size of send and recv buffer
+ *                  (<=0: use default)
+ * @param l         logger
+ * @return          JK_INVALID_SOCKET: some kind of error occured
+ *                  created socket: success
+ * @remark          Cares about errno
+ */
 jk_sock_t jk_open_socket(struct sockaddr_in *addr, int keepalive,
                          int timeout, int sock_buf, jk_logger_t *l)
 {
     char buf[32];
-    jk_sock_t sock;
+    jk_sock_t sd;
     int set = 1;
     int ret = 0;
 #ifdef SO_LINGER
@@ -335,21 +425,22 @@
 
     JK_TRACE_ENTER(l);
 
-    sock = socket(AF_INET, SOCK_STREAM, 0);
-    if (!IS_VALID_SOCKET(sock)) {
+    errno = 0;
+    sd = socket(AF_INET, SOCK_STREAM, 0);
+    if (!IS_VALID_SOCKET(sd)) {
         JK_GET_SOCKET_ERRNO();
         jk_log(l, JK_LOG_ERROR,
                "socket() failed (errno=%d)", errno);
         JK_TRACE_EXIT(l);
         return JK_INVALID_SOCKET;
-;
     }
     /* Disable Nagle algorithm */
-    if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (SET_TYPE)&set,
+    if (setsockopt(sd, IPPROTO_TCP, TCP_NODELAY, (SET_TYPE)&set,
                    sizeof(set))) {
+        JK_GET_SOCKET_ERRNO();
         jk_log(l, JK_LOG_ERROR,
                 "failed setting TCP_NODELAY (errno=%d)", errno);
-        jk_close_socket(sock);
+        jk_close_socket(sd, l);
         JK_TRACE_EXIT(l);
         return JK_INVALID_SOCKET;
     }
@@ -358,11 +449,12 @@
                "socket TCP_NODELAY set to On");
     if (keepalive) {
         set = 1;
-        if (setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (SET_TYPE)&set,
+        if (setsockopt(sd, SOL_SOCKET, SO_KEEPALIVE, (SET_TYPE)&set,
                        sizeof(set))) {
+            JK_GET_SOCKET_ERRNO();
             jk_log(l, JK_LOG_ERROR,
                    "failed setting SO_KEEPALIVE (errno=%d)", errno);
-            jk_close_socket(sock);
+            jk_close_socket(sd, l);
             JK_TRACE_EXIT(l);
             return JK_INVALID_SOCKET;
         }
@@ -374,52 +466,53 @@
     if (sock_buf > 0) {
         set = sock_buf;
         /* Set socket send buffer size */
-        if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (SET_TYPE)&set,
+        if (setsockopt(sd, SOL_SOCKET, SO_SNDBUF, (SET_TYPE)&set,
                         sizeof(set))) {
             JK_GET_SOCKET_ERRNO();
             jk_log(l, JK_LOG_ERROR,
                     "failed setting SO_SNDBUF (errno=%d)", errno);
-            jk_close_socket(sock);
+            jk_close_socket(sd, l);
             JK_TRACE_EXIT(l);
             return JK_INVALID_SOCKET;
         }
         set = sock_buf;
         /* Set socket receive buffer size */
-        if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (SET_TYPE)&set,
+        if (setsockopt(sd, SOL_SOCKET, SO_RCVBUF, (SET_TYPE)&set,
                                 sizeof(set))) {
             JK_GET_SOCKET_ERRNO();
             jk_log(l, JK_LOG_ERROR,
                     "failed setting SO_RCVBUF (errno=%d)", errno);
-            jk_close_socket(sock);
+            jk_close_socket(sd, l);
             JK_TRACE_EXIT(l);
             return JK_INVALID_SOCKET;
         }
         if (JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG,
-                   "socket SO_SNDBUF and  SO_RCVBUF set to %d",
+                   "socket SO_SNDBUF and SO_RCVBUF set to %d",
                    sock_buf);
     }
 
     if (timeout > 0) {
 #if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
         int tmout = timeout * 1000;
-        setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO,
+        setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO,
                    (const char *) &tmout, sizeof(int));
-        setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO,
+        setsockopt(sd, SOL_SOCKET, SO_SNDTIMEO,
                    (const char *) &tmout, sizeof(int));
+        JK_GET_SOCKET_ERRNO();
 #elif defined(SO_RCVTIMEO) && defined(USE_SO_RCVTIMEO) && defined(SO_SNDTIMEO) && defined(USE_SO_SNDTIMEO)
         struct timeval tv;
         tv.tv_sec  = timeout;
         tv.tv_usec = 0;
-        setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO,
+        setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO,
                    (const void *) &tv, sizeof(tv));
-        setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO,
+        setsockopt(sd, SOL_SOCKET, SO_SNDTIMEO,
                    (const void *) &tv, sizeof(tv));
 #endif
         if (JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG,
                    "timeout %d set for socket=%d",
-                   timeout, sock);
+                   timeout, sd);
     }
 #ifdef SO_NOSIGPIPE
     /* The preferred method on Mac OS X (10.2 and later) to prevent SIGPIPEs when
@@ -427,12 +520,12 @@
      * systems?
     */
     set = 1;
-    if (setsockopt(sock, SOL_SOCKET, SO_NOSIGPIPE, (const char *)&set,
+    if (setsockopt(sd, SOL_SOCKET, SO_NOSIGPIPE, (const char *)&set,
                    sizeof(int))) {
         JK_GET_SOCKET_ERRNO();
         jk_log(l, JK_LOG_ERROR,
                 "failed setting SO_NOSIGPIPE (errno=%d)", errno);
-        jk_close_socket(sock);
+        jk_close_socket(sd, l);
         JK_TRACE_EXIT(l);
         return JK_INVALID_SOCKET;
     }
@@ -440,12 +533,12 @@
 #ifdef SO_LINGER
     /* Make hard closesocket by disabling lingering */
     li.l_linger = li.l_onoff = 0;
-    if (setsockopt(sock, SOL_SOCKET, SO_LINGER, (SET_TYPE)&li,
+    if (setsockopt(sd, SOL_SOCKET, SO_LINGER, (SET_TYPE)&li,
                    sizeof(li))) {
         JK_GET_SOCKET_ERRNO();
         jk_log(l, JK_LOG_ERROR,
                 "failed setting SO_LINGER (errno=%d)", errno);
-        jk_close_socket(sock);
+        jk_close_socket(sd, l);
         JK_TRACE_EXIT(l);
         return JK_INVALID_SOCKET;
     }
@@ -453,7 +546,7 @@
     /* Tries to connect to Tomcat (continues trying while error is EINTR) */
     if (JK_IS_DEBUG_LEVEL(l))
         jk_log(l, JK_LOG_DEBUG,
-                "trying to connect socket %d to %s", sock,
+                "trying to connect socket %d to %s", sd,
                 jk_dump_hinfo(addr, buf));
 
 /* Need more infos for BSD 4.4 and Unix 98 defines, for now only
@@ -461,10 +554,10 @@
 #if (_XOPEN_SOURCE >= 520) && defined(AS400)
     ((struct sockaddr *)addr)->sa_len = sizeof(struct sockaddr_in);
 #endif
-    ret = nb_connect(sock, (struct sockaddr *)addr, timeout);
+    ret = nb_connect(sd, (struct sockaddr *)addr, timeout, l);
 #if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
-    if (ret == SOCKET_ERROR) {
-        errno = WSAGetLastError() - WSABASEERR;
+    if (JK_IS_SOCKET_ERROR(ret)) {
+        JK_GET_SOCKET_ERRNO();
     }
 #endif /* WIN32 */
 
@@ -473,29 +566,47 @@
         jk_log(l, JK_LOG_INFO,
                "connect to %s failed (errno=%d)",
                jk_dump_hinfo(addr, buf), errno);
-        jk_close_socket(sock);
-        sock = JK_INVALID_SOCKET;
+        jk_close_socket(sd, l);
+        sd = JK_INVALID_SOCKET;
     }
     else {
         if (JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG, "socket %d connected to %s",
-                   sock, jk_dump_hinfo(addr, buf));
+                   sd, jk_dump_hinfo(addr, buf));
     }
     JK_TRACE_EXIT(l);
-    return sock;
+    return sd;
 }
 
-/** close the socket */
+/** Close the socket
+ * @param sd        socket to close
+ * @param l         logger
+ * @return          -1: some kind of error occured (!WIN32)
+ *                  SOCKET_ERROR: some kind of error occured  (WIN32)
+ *                  0: success
+ * @remark          Does not change errno
+ */
+int jk_close_socket(jk_sock_t sd, jk_logger_t *l)
+{
+    int rc;
+    int save_errno;
 
-int jk_close_socket(jk_sock_t s)
-{
-    if (IS_VALID_SOCKET(s))
+    JK_TRACE_ENTER(l);
+
+    if (!IS_VALID_SOCKET(sd)) {
+        JK_TRACE_EXIT(l);
+        return -1;
+    }
+
+    save_errno = errno;
 #if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
-        return closesocket(s) ? -1 : 0;
+    rc = closesocket(sd) ? -1 : 0;
 #else
-        return close(s);
+    rc = close(sd);
 #endif
-    return -1;
+    errno = save_errno;
+    JK_TRACE_EXIT(l);
+    return rc;
 }
 
 #ifndef MAX_SECS_TO_LINGER
@@ -510,22 +621,41 @@
 #define SHUT_WR 0x01
 #endif
 #endif
-int jk_shutdown_socket(jk_sock_t s)
+
+/** Drain and close the socket
+ * @param sd        socket to close
+ * @param l         logger
+ * @return          -1: socket to close is invalid
+ *                  -1: some kind of error occured (!WIN32)
+ *                  SOCKET_ERROR: some kind of error occured  (WIN32)
+ *                  0: success
+ * @remark          Does not change errno
+ */
+int jk_shutdown_socket(jk_sock_t sd, jk_logger_t *l)
 {
     char dummy[512];
     int rc = 0;
+    int save_errno;
     fd_set rs;
     struct timeval tv;
     time_t start = time(NULL);
 
-    if (!IS_VALID_SOCKET(s))
+    JK_TRACE_ENTER(l);
+
+    if (!IS_VALID_SOCKET(sd)) {
+        JK_TRACE_EXIT(l);
         return -1;
+    }
 
+    save_errno = errno;
     /* Shut down the socket for write, which will send a FIN
      * to the peer.
      */
-    if (shutdown(s, SHUT_WR)) {
-        return jk_close_socket(s);
+    if (shutdown(sd, SHUT_WR)) {
+        rc = jk_close_socket(sd, l);
+        errno = save_errno;
+        JK_TRACE_EXIT(l);
+        return rc;
     }
 
     /* Set up to wait for readable data on socket... */
@@ -538,21 +668,20 @@
          * (a value pulled from Apache 1.3 which seems to work well),
          * close the connection.
          */
-        FD_SET(s, &rs);
+        FD_SET(sd, &rs);
         tv.tv_sec  = SECONDS_TO_LINGER;
         tv.tv_usec = 0;
 
-        if (select((int)s + 1, &rs, NULL, NULL, &tv) > 0) {
+        if (select((int)sd + 1, &rs, NULL, NULL, &tv) > 0) {
             do {
 #if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
-                rc = recv(s, &dummy[0], sizeof(dummy), 0);
-                /* Assuming SOCKET_ERROR is -1 on NETWARE too */
-                if (rc == SOCKET_ERROR)
-                    errno = WSAGetLastError() - WSABASEERR;
+                rc = recv(sd, &dummy[0], sizeof(dummy), 0);
+                if (JK_IS_SOCKET_ERROR(rc))
+                    JK_GET_SOCKET_ERRNO();
 #else
-                rc = read(s, &dummy[0], sizeof(dummy));
+                rc = read(sd, &dummy[0], sizeof(dummy));
 #endif
-            } while (rc == -1 && (errno == EINTR || errno == EAGAIN));
+            } while (JK_IS_SOCKET_ERROR(rc) && (errno == EINTR || errno == EAGAIN));
 
             if (rc <= 0)
                 break;
@@ -562,78 +691,109 @@
 
     } while (difftime(time(NULL), start) < MAX_SECS_TO_LINGER);
 
-    return jk_close_socket(s);
+    rc = jk_close_socket(sd, l);
+    errno = save_errno;
+    JK_TRACE_EXIT(l);
+    return rc;
 }
 
-/** send a long message
- * @param sd  opened socket.
- * @param b   buffer containing the data.
- * @param len length to send.
- * @return    -2: send returned 0 ? what this that ?
- *            -3: send failed.
- *            >0: total size send.
+/** send a message
+ * @param sd  socket to use
+ * @param b   buffer containing the data
+ * @param len length to send
+ * @param l   logger
+ * @return    negative errno: write returns a fatal -1 (!WIN32)
+ *            negative pseudo errno: send returns SOCKET_ERROR (WIN32)
+ *            JK_SOCKET_EOF: no bytes could be sent
+ *            >0: success, provided number of bytes send
+ * @remark    Always closes socket in case of error
+ * @remark    Cares about errno
  * @bug       this fails on Unixes if len is too big for the underlying
- *             protocol.
+ *            protocol
  */
-int jk_tcp_socket_sendfull(jk_sock_t sd, const unsigned char *b, int len)
+int jk_tcp_socket_sendfull(jk_sock_t sd, const unsigned char *b, int len, jk_logger_t *l)
 {
     int sent = 0;
     int wr;
 
+    JK_TRACE_ENTER(l);
+
+    errno = 0;
     while (sent < len) {
         do {
 #if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
             wr = send(sd, (const char*)(b + sent),
                       len - sent, 0);
-            if (wr == SOCKET_ERROR)
-                errno = WSAGetLastError() - WSABASEERR;
+            if (JK_IS_SOCKET_ERROR(wr))
+                JK_GET_SOCKET_ERRNO();
 #else
             wr = write(sd, b + sent, len - sent);
 #endif
-        } while (wr == -1 && (errno == EINTR || errno == EAGAIN));
+        } while (JK_IS_SOCKET_ERROR(wr) && (errno == EINTR || errno == EAGAIN));
 
-        if (wr == -1)
+        if (JK_IS_SOCKET_ERROR(wr)) {
+            jk_shutdown_socket(sd, l);
+            JK_TRACE_EXIT(l);
             return (errno > 0) ? -errno : errno;
-        else if (wr == 0)
+        }
+        else if (wr == 0) {
+            jk_shutdown_socket(sd, l);
+            JK_TRACE_EXIT(l);
             return JK_SOCKET_EOF;
+        }
         sent += wr;
     }
 
+    JK_TRACE_EXIT(l);
     return sent;
 }
 
-/** receive len bytes. Used in ajp_common.
- * @param sd  opened socket.
- * @param b   buffer to store the data.
- * @param len length to receive.
- * @return    <0: receive failed or connection closed.
- *            >0: length of the received data.
+/** receive a message
+ * @param sd  socket to use
+ * @param b   buffer to store the data
+ * @param len length to receive
+ * @param l   logger
+ * @return    negative errno: read returns a fatal -1 (!WIN32)
+ *            negative pseudo errno: recv returns SOCKET_ERROR (WIN32)
+ *            JK_SOCKET_EOF: no bytes could be read
+ *            >0: success, requested number of bytes received
+ * @remark    Always closes socket in case of error
+ * @remark    Cares about errno
  */
-int jk_tcp_socket_recvfull(jk_sock_t sd, unsigned char *b, int len)
+int jk_tcp_socket_recvfull(jk_sock_t sd, unsigned char *b, int len, jk_logger_t *l)
 {
     int rdlen = 0;
     int rd;
 
+    JK_TRACE_ENTER(l);
+
+    errno = 0;
     while (rdlen < len) {
         do {
 #if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
             rd = recv(sd, (char *)b + rdlen,
                       len - rdlen, 0);
-            /* Assuming SOCKET_ERROR is -1 on NETWARE too */
-            if (rd == SOCKET_ERROR)
-                errno = WSAGetLastError() - WSABASEERR;
+            if (JK_IS_SOCKET_ERROR(rd))
+                JK_GET_SOCKET_ERRNO();
 #else
             rd = read(sd, (char *)b + rdlen, len - rdlen);
 #endif
-        } while (rd == -1 && (errno == EINTR || errno == EAGAIN));
+        } while (JK_IS_SOCKET_ERROR(rd) && (errno == EINTR || errno == EAGAIN));
 
-        if (rd == -1)
+        if (JK_IS_SOCKET_ERROR(rd)) {
+            jk_shutdown_socket(sd, l);
+            JK_TRACE_EXIT(l);
             return (errno > 0) ? -errno : errno;
-        else if (rd == 0)
+        }
+        else if (rd == 0) {
+            jk_shutdown_socket(sd, l);
+            JK_TRACE_EXIT(l);
             return JK_SOCKET_EOF;
+        }
         rdlen += rd;
     }
 
+    JK_TRACE_EXIT(l);
     return rdlen;
 }
 
@@ -653,14 +813,78 @@
     return buf;
 }
 
-int jk_is_socket_connected(jk_sock_t sock)
+/** Wait for input event on socket until timeout
+ * @param sd      socket to use
+ * @param timeout wait timeout in milliseconds
+ * @param l       logger
+ * @return        JK_FALSE: Timeout expired without something to read
+ *                JK_FALSE: Error during waiting
+ *                JK_TRUE: success
+ * @remark        Does not close socket in case of error
+ *                to allow for iterative waiting
+ * @remark        Cares about errno
+ */
+int jk_is_input_event(jk_sock_t sd, int timeout, jk_logger_t *l)
 {
+    fd_set rset;
+    struct timeval tv;
+    int rc;
+    int save_errno;
+
+    JK_TRACE_ENTER(l);
+
+    errno = 0;
+    FD_ZERO(&rset);
+    FD_SET(sd, &rset);
+    tv.tv_sec = timeout / 1000;
+    tv.tv_usec = (timeout % 1000) * 1000;
+
+    do {
+        rc = select((int)sd + 1, &rset, NULL, NULL, &tv);
+    } while (rc < 0 && errno == EINTR);
+
+    if (rc == 0) {
+        /* Timeout. Set the errno to timeout */
+#if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
+        errno = WSAETIMEDOUT - WSABASEERR;
+#else
+        errno = ETIMEDOUT;
+#endif
+        JK_TRACE_EXIT(l);
+        return JK_FALSE;
+    }
+    else if (rc < 0) {
+        save_errno = errno;
+        jk_log(l, JK_LOG_WARNING,
+               "error during select on socket sd = %d (errno=%d)", sd, errno);
+        errno = save_errno;
+        JK_TRACE_EXIT(l);
+        return JK_FALSE;
+    }
+    errno = 0;
+    JK_TRACE_EXIT(l);
+    return JK_TRUE;
+}
+
+/** Test if a socket is still connected
+ * @param sd   socket to use
+ * @param l    logger
+ * @return     JK_FALSE: failure
+ *             JK_TRUE: success
+ * @remark     Always closes socket in case of error
+ * @remark     Cares about errno
+ */
+int jk_is_socket_connected(jk_sock_t sd, jk_logger_t *l)
+{
     fd_set fd;
     struct timeval tv;
     int rc;
 
+    JK_TRACE_ENTER(l);
+
+    errno = 0;
     FD_ZERO(&fd);
-    FD_SET(sock, &fd);
+    FD_SET(sd, &fd);
 
     /* Initially test the socket without any blocking.
      */
@@ -668,37 +892,41 @@
     tv.tv_usec = 0;
 
     do {
-        rc = select((int)sock + 1, &fd, NULL, NULL, &tv);
-#if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
-        errno = WSAGetLastError() - WSABASEERR;
-#endif
+        rc = select((int)sd + 1, &fd, NULL, NULL, &tv);
+        JK_GET_SOCKET_ERRNO();
         /* Wait one microsecond on next select, if EINTR */
         tv.tv_sec  = 0;
         tv.tv_usec = 1;
-    } while (rc == -1 && errno == EINTR);
+    } while (JK_IS_SOCKET_ERROR(rc) && errno == EINTR);
 
+    errno = 0;
     if (rc == 0) {
         /* If we get a timeout, then we are still connected */
-        return 1;
+        JK_TRACE_EXIT(l);
+        return JK_TRUE;
     }
     else if (rc == 1) {
 #if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
         u_long nr;
-        if (ioctlsocket(sock, FIONREAD, &nr) == 0) {
+        rc = ioctlsocket(sd, FIONREAD, &nr);
+        if (rc == 0) {
             if (WSAGetLastError() == 0)
                 errno = 0;
             else
-                errno = WSAGetLastError() - WSABASEERR;
-            return nr == 0 ? 0 : 1;
+                JK_GET_SOCKET_ERRNO();
         }
-        errno = WSAGetLastError() - WSABASEERR;
 #else
         int nr;
-        if (ioctl(sock, FIONREAD, (void*)&nr) == 0) {
-            return nr == 0 ? 0 : 1;
+        rc = ioctl(sd, FIONREAD, (void*)&nr);
+#endif
+        if (rc == 0 && nr != 0) {
+            JK_TRACE_EXIT(l);
+            return JK_TRUE;
         }
-#endif
+        JK_GET_SOCKET_ERRNO();
     }
+    jk_shutdown_socket(sd, l);
 
-    return 0;
+    JK_TRACE_EXIT(l);
+    return JK_FALSE;
 }

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_connect.h
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_connect.h	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_connect.h	2008-04-06 12:38:06 UTC (rev 6107)
@@ -18,7 +18,7 @@
 /***************************************************************************
  * Description: Socket connections header file                             *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
- * Version:     $Revision: 531819 $                                               *
+ * Version:     $Revision: 603556 $                                               *
  ***************************************************************************/
 
 #ifndef JK_CONNECT_H
@@ -37,26 +37,27 @@
 #endif                          /* __cplusplus */
 
 #define JK_SOCKET_EOF      (-2)
-#define JK_SOCKET_ERROR    (-3)
 
-int jk_resolve(const char *host, int port, struct sockaddr_in *rc);
+int jk_resolve(const char *host, int port, struct sockaddr_in *rc, jk_logger_t *l);
 
 jk_sock_t jk_open_socket(struct sockaddr_in *addr, int keepalive,
                          int timeout, int sock_buf, jk_logger_t *l);
 
-int jk_close_socket(jk_sock_t s);
+int jk_close_socket(jk_sock_t sd, jk_logger_t *l);
 
-int jk_shutdown_socket(jk_sock_t s);
+int jk_shutdown_socket(jk_sock_t sd, jk_logger_t *l);
 
-int jk_tcp_socket_sendfull(jk_sock_t sd, const unsigned char *b, int len);
+int jk_tcp_socket_sendfull(jk_sock_t sd, const unsigned char *b, int len, jk_logger_t *l);
 
-int jk_tcp_socket_recvfull(jk_sock_t sd, unsigned char *b, int len);
+int jk_tcp_socket_recvfull(jk_sock_t sd, unsigned char *b, int len, jk_logger_t *l);
 
 char *jk_dump_hinfo(struct sockaddr_in *saddr, char *buf);
 
-int jk_is_socket_connected(jk_sock_t sd);
+int jk_is_input_event(jk_sock_t sd, int timeout, jk_logger_t *l);
 
+int jk_is_socket_connected(jk_sock_t sd, jk_logger_t *l);
 
+
 /***
  * i5/OS V5R4 need ASCII<->EBCDIC translation for inet_addr() call
  */

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_global.h
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_global.h	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_global.h	2008-04-06 12:38:06 UTC (rev 6107)
@@ -19,7 +19,7 @@
  * Description: Global definitions and include files that should exist     *
  *              anywhere                                                   *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
- * Version:     $Revision: 560736 $                                               *
+ * Version:     $Revision: 611605 $                                               *
  ***************************************************************************/
 
 #ifndef JK_GLOBAL_H
@@ -74,6 +74,7 @@
 #include <errno.h>
 #include <time.h>
 #include <ctype.h>
+#include <limits.h>
 
 #ifdef _OSD_POSIX
 #include "ap_config.h"
@@ -214,14 +215,14 @@
 /* HTTP Error codes
  */
 
-#define JK_HTTP_OK               200
-#define JK_HTTP_BAD_REQUEST      400
-#define JK_REQUEST_TOO_LARGE     413
-#define JK_HTTP_SERVER_ERROR     500
-#define JK_HTTP_NOT_IMPLEMENTED  501
-#define JK_HTTP_BAD_GATEWAY      502
-#define JK_HTTP_SERVER_BUSY      503
-#define JK_HTTP_GATEWAY_TIME_OUT 504
+#define JK_HTTP_OK                200
+#define JK_HTTP_BAD_REQUEST       400
+#define JK_HTTP_REQUEST_TOO_LARGE 413
+#define JK_HTTP_SERVER_ERROR      500
+#define JK_HTTP_NOT_IMPLEMENTED   501
+#define JK_HTTP_BAD_GATEWAY       502
+#define JK_HTTP_SERVER_BUSY       503
+#define JK_HTTP_GATEWAY_TIME_OUT  504
 
 
 /*

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_jni_worker.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_jni_worker.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_jni_worker.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -19,7 +19,7 @@
  * Description: In process JNI worker                                      *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
  * Based on:                                                               *
- * Version:     $Revision: 559197 $                                           *
+ * Version:     $Revision: 609760 $                                           *
  ***************************************************************************/
 
 #if !defined(WIN32) && !defined(NETWARE) && !defined(AS400)
@@ -248,6 +248,14 @@
 }
 #endif
 
+/*
+ * Return values of service() method for jni worker:
+ * return value  is_error              reason
+ * JK_FALSE      JK_HTTP_SERVER_ERROR  Invalid parameters (null values)
+ *                                     Error during attach to the JNI backend
+ *                                     Error during JNI call
+ * JK_TRUE       JK_HTTP_OK            All other cases
+ */
 static int JK_METHOD service(jk_endpoint_t *e,
                              jk_ws_service_t *s,
                              jk_logger_t *l, int *is_error)
@@ -702,7 +710,6 @@
     private_data->worker.init = init;
     private_data->worker.get_endpoint = get_endpoint;
     private_data->worker.destroy = destroy;
-    private_data->worker.retries = JK_RETRIES;
 
     *w = &private_data->worker;
     the_singleton_jni_worker = &private_data->worker;

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_lb_worker.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_lb_worker.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_lb_worker.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -22,7 +22,7 @@
  * Author:      Mladen Turk <mturk at apache.org>                             *
  * Author:      Rainer Jung <rjung at apache.org>                             *
  * Based on:                                                               *
- * Version:     $Revision: 562194 $                                          *
+ * Version:     $Revision: 613544 $                                          *
  ***************************************************************************/
 
 #include "jk_pool.h"
@@ -40,8 +40,18 @@
  * The load balancing code in this
  */
 
-#define JK_WORKER_USABLE(w)   ((w)->state != JK_LB_STATE_ERROR && (w)->state != JK_LB_STATE_PROBE && (w)->state != JK_LB_STATE_BUSY && (w)->activation != JK_LB_ACTIVATION_STOPPED && (w)->activation != JK_LB_ACTIVATION_DISABLED)
-#define JK_WORKER_USABLE_STICKY(w)   ((w)->state != JK_LB_STATE_ERROR && (w)->state != JK_LB_STATE_PROBE && (w)->activation != JK_LB_ACTIVATION_STOPPED)
+/*
+ * The following two macros need to be kept in sync with
+ * the existing values for state and activation.
+ * Note: state <= JK_LB_STATE_FORCE is equivalent to
+ *       state is none of JK_LB_STATE_BUSY, JK_LB_STATE_ERROR, JK_LB_STATE_PROBE
+ * Note: state <= JK_LB_STATE_BUSY is equivalent to
+ *       state is none of JK_LB_STATE_ERROR, JK_LB_STATE_PROBE
+ * Note: activation == JK_LB_ACTIVATION_ACTIVE is equivalent to
+ *       activation is none of JK_LB_ACTIVATION_STOPPED, JK_LB_ACTIVATION_DISABLED
+ */
+#define JK_WORKER_USABLE(s, activation)   ((s)->state <= JK_LB_STATE_FORCE && activation == JK_LB_ACTIVATION_ACTIVE)
+#define JK_WORKER_USABLE_STICKY(s, activation)   ((s)->state <= JK_LB_STATE_BUSY && activation != JK_LB_ACTIVATION_STOPPED)
 
 static const char *lb_locking_type[] = {
     JK_LB_LOCK_TEXT_OPTIMISTIC,
@@ -162,7 +172,7 @@
     return lb_method_type[p->lbmethod];
 }
 
-/* Return the int representation of the lb lock type */
+/* Return the int representation of the lb method type */
 int jk_lb_get_method_code(const char *v)
 {
     if (!v)
@@ -180,12 +190,12 @@
 }
 
 /* Return the string representation of the balance worker state */
-const char *jk_lb_get_state(worker_record_t *p, jk_logger_t *l)
+const char *jk_lb_get_state(lb_sub_worker_t *p, jk_logger_t *l)
 {
     return lb_state_type[p->s->state];
 }
 
-/* Return the int representation of the lb lock type */
+/* Return the int representation of the lb state */
 int jk_lb_get_state_code(const char *v)
 {
     if (!v)
@@ -209,11 +219,19 @@
 }
 
 /* Return the string representation of the balance worker activation */
-const char *jk_lb_get_activation(worker_record_t *p, jk_logger_t *l)
+/* based on the integer representation */
+const char *jk_lb_get_activation_direct(int activation, jk_logger_t *l)
 {
-    return lb_activation_type[p->s->activation];
+    return lb_activation_type[activation];
 }
 
+/* Return the string representation of the balance worker activation */
+/* based on the sub worker struct */
+const char *jk_lb_get_activation(lb_sub_worker_t *p, jk_logger_t *l)
+{
+    return lb_activation_type[p->activation];
+}
+
 int jk_lb_get_activation_code(const char *v)
 {
     if (!v)
@@ -235,16 +253,16 @@
     jk_uint64_t s = 1;
     JK_TRACE_ENTER(l);
     for (i = 0; i < p->num_of_workers; i++) {
-        s = scm(s, p->lb_workers[i].s->lb_factor);
+        s = scm(s, p->lb_workers[i].lb_factor);
     }
     for (i = 0; i < p->num_of_workers; i++) {
-        p->lb_workers[i].s->lb_mult = s / p->lb_workers[i].s->lb_factor;
+        p->lb_workers[i].lb_mult = s / p->lb_workers[i].lb_factor;
         if (JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG,
                    "worker %s gets multiplicity %"
                    JK_UINT64_T_FMT,
-                   p->lb_workers[i].s->name,
-                   p->lb_workers[i].s->lb_mult);
+                   p->lb_workers[i].name,
+                   p->lb_workers[i].lb_mult);
     }
     JK_TRACE_EXIT(l);
 }
@@ -264,12 +282,16 @@
 }
 
 /* Syncing config values from shm */
-void jk_lb_pull(lb_worker_t * p, jk_logger_t *l) {
+void jk_lb_pull(lb_worker_t * p, jk_logger_t *l)
+{
+    unsigned int i = 0;
+
     JK_TRACE_ENTER(l);
+
     if (JK_IS_DEBUG_LEVEL(l))
         jk_log(l, JK_LOG_DEBUG,
                "syncing mem for lb '%s' from shm",
-               p->s->name);
+               p->name);
     p->sticky_session = p->s->sticky_session;
     p->sticky_session_force = p->s->sticky_session_force;
     p->recover_wait_time = p->s->recover_wait_time;
@@ -277,17 +299,46 @@
     p->retries = p->s->retries;
     p->lbmethod = p->s->lbmethod;
     p->lblock = p->s->lblock;
-    p->sequence = p->s->sequence;
+    p->max_packet_size = p->s->max_packet_size;
+    p->sequence = p->s->h.sequence;
+
+    for (i = 0; i < p->num_of_workers; i++) {
+        lb_sub_worker_t *w = &p->lb_workers[i];
+        if (w->sequence != w->s->h.sequence) {
+            jk_worker_t *jw = w->worker;
+            ajp_worker_t *aw = (ajp_worker_t *)jw->worker_private;
+
+            if (JK_IS_DEBUG_LEVEL(l))
+                jk_log(l, JK_LOG_DEBUG,
+                       "syncing mem for member '%s' of lb '%s' from shm",
+                       w->name, p->name);
+
+            jk_ajp_pull(aw, l);
+            strncpy(w->route, w->s->route, JK_SHM_STR_SIZ);
+            strncpy(w->domain, w->s->domain, JK_SHM_STR_SIZ);
+            strncpy(w->redirect, w->s->redirect, JK_SHM_STR_SIZ);
+            w->distance = w->s->distance;
+            w->activation = w->s->activation;
+            w->lb_factor = w->s->lb_factor;
+            w->lb_mult = w->s->lb_mult;
+            w->sequence = w->s->h.sequence;
+        }
+    }
+
     JK_TRACE_EXIT(l);
 }
 
-/* Syncing config values from shm */
-void jk_lb_push(lb_worker_t * p, jk_logger_t *l) {
+/* Syncing config values to shm */
+void jk_lb_push(lb_worker_t * p, jk_logger_t *l)
+{
+    unsigned int i = 0;
+
     JK_TRACE_ENTER(l);
+
     if (JK_IS_DEBUG_LEVEL(l))
         jk_log(l, JK_LOG_DEBUG,
                "syncing shm for lb '%s' from mem",
-               p->s->name);
+               p->name);
     p->s->sticky_session = p->sticky_session;
     p->s->sticky_session_force = p->sticky_session_force;
     p->s->recover_wait_time = p->recover_wait_time;
@@ -295,7 +346,32 @@
     p->s->retries = p->retries;
     p->s->lbmethod = p->lbmethod;
     p->s->lblock = p->lblock;
-    p->s->sequence = p->sequence;
+    p->s->max_packet_size = p->max_packet_size;
+    p->s->h.sequence = p->sequence;
+
+    for (i = 0; i < p->num_of_workers; i++) {
+        lb_sub_worker_t *w = &p->lb_workers[i];
+        if (w->sequence != w->s->h.sequence) {
+            jk_worker_t *jw = w->worker;
+            ajp_worker_t *aw = (ajp_worker_t *)jw->worker_private;
+
+            if (JK_IS_DEBUG_LEVEL(l))
+                jk_log(l, JK_LOG_DEBUG,
+                       "syncing shm for member '%s' of lb '%s' from mem",
+                       w->name, p->name);
+
+            jk_ajp_push(aw, l);
+            strncpy(w->s->route, w->route, JK_SHM_STR_SIZ);
+            strncpy(w->s->domain, w->domain, JK_SHM_STR_SIZ);
+            strncpy(w->s->redirect, w->redirect, JK_SHM_STR_SIZ);
+            w->s->distance = w->distance;
+            w->s->activation = w->activation;
+            w->s->lb_factor = w->lb_factor;
+            w->s->lb_mult = w->lb_mult;
+            w->s->h.sequence = w->sequence;
+        }
+    }
+
     JK_TRACE_EXIT(l);
 }
 
@@ -358,25 +434,27 @@
                          * Session cookie was found, get it's value
                          */
                         char *id_end;
+                        size_t sz;
                         ++id_start;
-                        id_start = jk_pool_strdup(s->pool, id_start);
-                        if ((id_end = strchr(id_start, ';')) != NULL) {
-                            *id_end = '\0';
+                        if ((id_end = strpbrk(id_start, ";,")) != NULL)
+                            sz = id_end - id_start;
+                        else {
+                            sz = strlen(id_start);
+                            id_end = id_start + sz;
                         }
-                        if ((id_end = strchr(id_start, ',')) != NULL) {
-                            *id_end = '\0';
-                        }
                         if (result == NULL) {
-                            result = id_start;
+                            result = jk_pool_alloc(s->pool, sz + 1);
+                            memcpy(result, id_start, sz);
+                            result[sz] = '\0';
                         }
                         else {
                             size_t osz = strlen(result) + 1;
-                            size_t sz = osz + strlen(id_start) + 1;
                             result =
-                                jk_pool_realloc(s->pool, sz, result, osz);
+                                jk_pool_realloc(s->pool, osz + sz + 1, result, osz);
                             strcat(result, ";");
-                            strcat(result, id_start);
+                            strncat(result, id_start, sz);
                         }
+                        id_start = id_end;
                     }
                 }
             }
@@ -413,7 +491,7 @@
 {
     int i = 0;
     for (i = 0; i < num_of_workers; i++) {
-        p->lb_workers[i].w->destroy(&(p->lb_workers[i].w), l);
+        p->lb_workers[i].worker->destroy(&(p->lb_workers[i].worker), l);
     }
 }
 
@@ -435,29 +513,31 @@
     unsigned int i;
     int non_error = 0;
     int elapsed;
-    worker_record_t *w = NULL;
+    lb_sub_worker_t *w = NULL;
+    ajp_worker_t *aw = NULL;
     JK_TRACE_ENTER(l);
 
-    if (p->sequence != p->s->sequence)
+    if (p->sequence != p->s->h.sequence)
         jk_lb_pull(p, l);
     for (i = 0; i < p->num_of_workers; i++) {
         w = &p->lb_workers[i];
+        aw = (ajp_worker_t *)w->worker->worker_private;
         if (w->s->state == JK_LB_STATE_ERROR) {
             elapsed = (int)difftime(now, w->s->error_time);
-            if (elapsed <= p->s->recover_wait_time) {
+            if (elapsed <= p->recover_wait_time) {
                 if (JK_IS_DEBUG_LEVEL(l))
                     jk_log(l, JK_LOG_DEBUG,
                            "worker %s will recover in %d seconds",
-                           w->s->name, p->s->recover_wait_time - elapsed);
+                           w->name, p->recover_wait_time - elapsed);
             }
             else {
                 if (JK_IS_DEBUG_LEVEL(l))
                     jk_log(l, JK_LOG_DEBUG,
                            "worker %s is marked for recovery",
-                           w->s->name);
+                           w->name);
                 if (p->lbmethod != JK_LB_METHOD_BUSYNESS)
                     w->s->lb_value = curmax;
-                w->s->reply_timeouts = 0;
+                aw->s->reply_timeouts = 0;
                 w->s->state = JK_LB_STATE_RECOVER;
                 non_error++;
             }
@@ -465,10 +545,10 @@
         else {
             non_error++;
             if (w->s->state == JK_LB_STATE_OK &&
-                w->s->elected == w->s->elected_snapshot)
+                aw->s->used == w->s->elected_snapshot)
                 w->s->state = JK_LB_STATE_IDLE;
         }
-        w->s->elected_snapshot = w->s->elected;
+        w->s->elected_snapshot = aw->s->used;
     }
 
     JK_TRACE_EXIT(l);
@@ -480,7 +560,7 @@
 {
     unsigned int i;
     int forced = 0;
-    worker_record_t *w = NULL;
+    lb_sub_worker_t *w = NULL;
     JK_TRACE_ENTER(l);
 
     for (i = 0; i < p->num_of_workers; i++) {
@@ -489,7 +569,7 @@
             if (JK_IS_DEBUG_LEVEL(l))
                 jk_log(l, JK_LOG_INFO,
                        "worker %s is marked for recovery",
-                       w->s->name);
+                       w->name);
             w->s->state = JK_LB_STATE_FORCE;
             forced++;
         }
@@ -513,11 +593,13 @@
     JK_TRACE_ENTER(l);
     if (p->lbmethod != JK_LB_METHOD_BUSYNESS) {
         for (i = 0; i < p->num_of_workers; i++) {
-            p->lb_workers[i].s->lb_value >>= exponent;
-            if (p->lb_workers[i].s->lb_value > curmax) {
-                curmax = p->lb_workers[i].s->lb_value;
+            lb_sub_worker_t *w = &p->lb_workers[i];
+            ajp_worker_t *aw = (ajp_worker_t *)w->worker->worker_private;
+            w->s->lb_value >>= exponent;
+            if (w->s->lb_value > curmax) {
+                curmax = w->s->lb_value;
             }
-            p->lb_workers[i].s->reply_timeouts >>= exponent;
+            aw->s->reply_timeouts >>= exponent;
         }
     }
     JK_TRACE_EXIT(l);
@@ -535,8 +617,8 @@
         lb_worker_t *lb = (lb_worker_t *)p->worker_private;
 
         for (i = 0; i < lb->num_of_workers; i++) {
-            if (lb->lb_workers[i].w->maintain) {
-                lb->lb_workers[i].w->maintain(lb->lb_workers[i].w, now, l);
+            if (lb->lb_workers[i].worker->maintain) {
+                lb->lb_workers[i].worker->maintain(lb->lb_workers[i].worker, now, l);
             }
         }
 
@@ -573,66 +655,71 @@
     return JK_TRUE;
 }
 
-static worker_record_t *find_by_session(lb_worker_t *p,
-                                        const char *name,
-                                        jk_logger_t *l)
+static int find_by_session(jk_ws_service_t *s,
+                           lb_worker_t *p,
+                           const char *name,
+                           jk_logger_t *l)
 {
 
-    worker_record_t *rc = NULL;
+    int rc = -1;
     unsigned int i;
 
     for (i = 0; i < p->num_of_workers; i++) {
-        if (strcmp(p->lb_workers[i].s->route, name) == 0) {
-            rc = &p->lb_workers[i];
-            rc->r = &(rc->s->route[0]);
+        if (strcmp(p->lb_workers[i].route, name) == 0) {
+            rc = i;
             break;
         }
     }
     return rc;
 }
 
-static worker_record_t *find_best_bydomain(lb_worker_t *p,
-                                           const char *domain,
-                                           jk_logger_t *l)
+static int find_best_bydomain(jk_ws_service_t *s,
+                              lb_worker_t *p,
+                              const char *domain,
+                              jk_logger_t *l)
 {
     unsigned int i;
     int d = 0;
     jk_uint64_t curmin = 0;
 
-    worker_record_t *candidate = NULL;
+    int candidate = -1;
+    int activation;
+    lb_sub_worker_t wr;
 
     /* First try to see if we have available candidate */
     for (i = 0; i < p->num_of_workers; i++) {
         /* Skip all workers that are not member of domain */
-        if (strlen(p->lb_workers[i].s->domain) == 0 ||
-            strcmp(p->lb_workers[i].s->domain, domain))
+        wr = p->lb_workers[i];
+        if (strlen(wr.domain) == 0 ||
+            strcmp(wr.domain, domain))
             continue;
         /* Take into calculation only the workers that are
          * not in error state, stopped, disabled or busy.
          */
-        if (JK_WORKER_USABLE(p->lb_workers[i].s)) {
-            if (!candidate || p->lb_workers[i].s->distance < d ||
-                (p->lb_workers[i].s->lb_value < curmin &&
-                p->lb_workers[i].s->distance == d)) {
-                candidate = &p->lb_workers[i];
-                curmin = p->lb_workers[i].s->lb_value;
-                d = p->lb_workers[i].s->distance;
+        activation = s->extension.activation ?
+                     s->extension.activation[i] :
+                     JK_LB_ACTIVATION_UNSET;
+        if (activation == JK_LB_ACTIVATION_UNSET)
+            activation = wr.activation;
+        if (JK_WORKER_USABLE(wr.s, activation)) {
+            if (candidate < 0 || wr.distance < d ||
+                (wr.s->lb_value < curmin &&
+                wr.distance == d)) {
+                candidate = i;
+                curmin = wr.s->lb_value;
+                d = wr.distance;
             }
         }
     }
 
-    if (candidate) {
-        candidate->r = &(candidate->s->domain[0]);
-    }
-
     return candidate;
 }
 
 
-static worker_record_t *find_best_byvalue(lb_worker_t *p,
-                                          jk_logger_t *l)
+static int find_best_byvalue(jk_ws_service_t *s,
+                             lb_worker_t *p,
+                             jk_logger_t *l)
 {
-    static unsigned int next_offset = 0;
     unsigned int i;
     unsigned int j;
     unsigned int offset;
@@ -640,45 +727,63 @@
     jk_uint64_t curmin = 0;
 
     /* find the least busy worker */
-    worker_record_t *candidate = NULL;
+    int candidate = -1;
+    int activation;
+    lb_sub_worker_t wr;
 
-    offset = next_offset;
+    offset = p->next_offset;
 
     /* First try to see if we have available candidate */
     for (j = offset; j < p->num_of_workers + offset; j++) {
         i = j % p->num_of_workers;
+        wr = p->lb_workers[i];
+        activation = s->extension.activation ?
+                     s->extension.activation[i] :
+                     JK_LB_ACTIVATION_UNSET;
+        if (activation == JK_LB_ACTIVATION_UNSET)
+            activation = wr.activation;
 
         /* Take into calculation only the workers that are
          * not in error state, stopped, disabled or busy.
          */
-        if (JK_WORKER_USABLE(p->lb_workers[i].s)) {
-            if (!candidate || p->lb_workers[i].s->distance < d ||
-                (p->lb_workers[i].s->lb_value < curmin &&
-                p->lb_workers[i].s->distance == d)) {
-                candidate = &p->lb_workers[i];
-                curmin = p->lb_workers[i].s->lb_value;
-                d = p->lb_workers[i].s->distance;
-                next_offset = i + 1;
+        if (JK_WORKER_USABLE(wr.s, activation)) {
+            if (candidate < 0 || wr.distance < d ||
+                (wr.s->lb_value < curmin &&
+                wr.distance == d)) {
+                candidate = i;
+                curmin = wr.s->lb_value;
+                d = wr.distance;
+                p->next_offset = i + 1;
             }
         }
     }
     return candidate;
 }
 
-static worker_record_t *find_bysession_route(lb_worker_t *p,
-                                             const char *name,
-                                             jk_logger_t *l)
+static int find_bysession_route(jk_ws_service_t *s,
+                                lb_worker_t *p,
+                                const char *name,
+                                jk_logger_t *l)
 {
     int uses_domain  = 0;
-    worker_record_t *candidate = NULL;
+    int candidate = -1;
 
-    candidate = find_by_session(p, name, l);
-    if (!candidate) {
+    candidate = find_by_session(s, p, name, l);
+    if (candidate < 0) {
         uses_domain = 1;
-        candidate = find_best_bydomain(p, name, l);
+        candidate = find_best_bydomain(s, p, name, l);
     }
-    if (candidate) {
-        if (!JK_WORKER_USABLE_STICKY(candidate->s)) {
+    if (candidate >= 0) {
+        lb_sub_worker_t wr = p->lb_workers[candidate];
+        int activation;
+        if (uses_domain)
+            s->route = wr.domain;
+        activation = s->extension.activation ?
+                     s->extension.activation[candidate] :
+                     JK_LB_ACTIVATION_UNSET;
+        if (activation == JK_LB_ACTIVATION_UNSET)
+            activation = wr.activation;
+        if (!JK_WORKER_USABLE_STICKY(wr.s, activation)) {
             /* We have a worker that is error state or stopped.
              * If it has a redirection set use that redirection worker.
              * This enables to safely remove the member from the
@@ -686,58 +791,68 @@
              * session replication between those two remote.
              */
             if (p->sticky_session_force)
-                candidate = NULL;
-            else if (*candidate->s->redirect)
-                candidate = find_by_session(p, candidate->s->redirect, l);
-            else if (*candidate->s->domain && !uses_domain) {
-                uses_domain = 1;
-                candidate = find_best_bydomain(p, candidate->s->domain, l);
+                candidate = -1;
+            else if (*wr.redirect) {
+                candidate = find_by_session(s, p, wr.redirect, l);
+                s->route = NULL;
             }
-            if (candidate && !JK_WORKER_USABLE_STICKY(candidate->s))
-                candidate = NULL;
+            else if (*wr.domain && !uses_domain) {
+                candidate = find_best_bydomain(s, p, wr.domain, l);
+                s->route = wr.domain;
+            }
+            if (candidate >= 0) {
+                wr = p->lb_workers[candidate];
+                activation = s->extension.activation ?
+                             s->extension.activation[candidate] :
+                             JK_LB_ACTIVATION_UNSET;
+                if (activation == JK_LB_ACTIVATION_UNSET)
+                    activation = wr.activation;
+                if (!JK_WORKER_USABLE_STICKY(wr.s, activation))
+                    candidate = -1;
+            }
         }
     }
     return candidate;
 }
 
-static worker_record_t *find_failover_worker(lb_worker_t * p,
-                                             jk_logger_t *l)
+static int find_failover_worker(jk_ws_service_t *s,
+                                lb_worker_t * p,
+                                jk_logger_t *l)
 {
-    worker_record_t *rc = NULL;
+    int rc = -1;
     unsigned int i;
     const char *redirect = NULL;
 
     for (i = 0; i < p->num_of_workers; i++) {
-        if (strlen(p->lb_workers[i].s->redirect)) {
-            redirect = &(p->lb_workers[i].s->redirect[0]);
+        if (strlen(p->lb_workers[i].redirect)) {
+            redirect = p->lb_workers[i].redirect;
             break;
         }
     }
     if (redirect)
-        rc = find_bysession_route(p, redirect, l);
+        rc = find_bysession_route(s, p, redirect, l);
     return rc;
 }
 
-static worker_record_t *find_best_worker(lb_worker_t * p,
-                                         jk_logger_t *l)
+static int find_best_worker(jk_ws_service_t *s,
+                            lb_worker_t * p,
+                            jk_logger_t *l)
 {
-    worker_record_t *rc = NULL;
+    int rc = -1;
 
-    rc = find_best_byvalue(p, l);
+    rc = find_best_byvalue(s, p, l);
     /* By default use worker route as session route */
-    if (rc)
-        rc->r = &(rc->s->route[0]);
-    else
-        rc = find_failover_worker(p, l);
+    if (rc < 0)
+        rc = find_failover_worker(s, p, l);
     return rc;
 }
 
-static worker_record_t *get_most_suitable_worker(lb_worker_t * p,
+static lb_sub_worker_t *get_most_suitable_worker(jk_ws_service_t *s,
+                                                 lb_worker_t * p,
                                                  char *sessionid,
-                                                 jk_ws_service_t *s,
                                                  jk_logger_t *l)
 {
-    worker_record_t *rc = NULL;
+    int rc = -1;
     int r;
 
     JK_TRACE_ENTER(l);
@@ -745,11 +860,15 @@
         /* No need to find the best worker
          * if there is a single one
          */
-        if (JK_WORKER_USABLE_STICKY(p->lb_workers[0].s)) {
-            if (p->lb_workers[0].s->activation != JK_LB_ACTIVATION_DISABLED) {
-                p->lb_workers[0].r = &(p->lb_workers[0].s->route[0]);
+        int activation = s->extension.activation ?
+                         s->extension.activation[0] :
+                         JK_LB_ACTIVATION_UNSET;
+        if (activation == JK_LB_ACTIVATION_UNSET)
+            activation = p->lb_workers[0].activation;
+        if (JK_WORKER_USABLE_STICKY(p->lb_workers[0].s, activation)) {
+            if (activation != JK_LB_ACTIVATION_DISABLED) {
                 JK_TRACE_EXIT(l);
-                return &p->lb_workers[0];
+                return p->lb_workers;
             }
         }
         else {
@@ -788,8 +907,9 @@
                            session_route);
 
                 /* We have a session route. Whow! */
-                rc = find_bysession_route(p, session_route, l);
-                if (rc) {
+                rc = find_bysession_route(s, p, session_route, l);
+                if (rc >= 0) {
+                    lb_sub_worker_t *wr = &(p->lb_workers[rc]);
                     if (p->lblock == JK_LB_LOCK_PESSIMISTIC)
                         jk_shm_unlock();
                     else {
@@ -798,16 +918,16 @@
                     if (JK_IS_DEBUG_LEVEL(l))
                         jk_log(l, JK_LOG_DEBUG,
                                "found worker %s (%s) for route %s and partial sessionid %s",
-                               rc->s->name, rc->s->route, session_route, sessionid);
-                        JK_TRACE_EXIT(l);
-                    return rc;
+                               wr->name, wr->route, session_route, sessionid);
+                    JK_TRACE_EXIT(l);
+                    return wr;
                 }
             }
             /* Try next partial sessionid if present */
             sessionid = next;
-            rc = NULL;
+            rc = -1;
         }
-        if (!rc && p->sticky_session_force) {
+        if (rc < 0 && p->sticky_session_force) {
             if (p->lblock == JK_LB_LOCK_PESSIMISTIC)
                 jk_shm_unlock();
             else {
@@ -820,44 +940,49 @@
             return NULL;
         }
     }
-    rc = find_best_worker(p, l);
+    rc = find_best_worker(s, p, l);
     if (p->lblock == JK_LB_LOCK_PESSIMISTIC)
         jk_shm_unlock();
     else {
         JK_LEAVE_CS(&(p->cs), r);
     }
-    if (rc && JK_IS_DEBUG_LEVEL(l)) {
-        jk_log(l, JK_LOG_DEBUG,
-               "found best worker %s (%s) using method '%s'",
-               rc->s->name, rc->s->route, jk_lb_get_method(p, l));
+    if (rc >= 0) {
+        lb_sub_worker_t *wr = &(p->lb_workers[rc]);
+        if (JK_IS_DEBUG_LEVEL(l))
+            jk_log(l, JK_LOG_DEBUG,
+                   "found best worker %s (%s) using method '%s'",
+                   wr->name, wr->route, jk_lb_get_method(p, l));
+        JK_TRACE_EXIT(l);
+        return wr;
     }
     JK_TRACE_EXIT(l);
-    return rc;
+    return NULL;
 }
 
 static void lb_add_log_items(jk_ws_service_t *s,
                              const char *const *log_names,
-                             worker_record_t *w,
+                             lb_sub_worker_t *w,
                              jk_logger_t *l)
 {
+    ajp_worker_t *aw = (ajp_worker_t *)w->worker->worker_private;
     const char **log_values = jk_pool_alloc(s->pool, sizeof(char *) * JK_LB_NOTES_COUNT);
     char *buf = jk_pool_alloc(s->pool, sizeof(char *) * JK_LB_NOTES_COUNT * JK_LB_UINT64_STR_SZ);
     if (log_values && buf) {
         /* JK_NOTE_LB_FIRST/LAST_NAME */
-        log_values[0] = w->s->name;
+        log_values[0] = w->name;
         snprintf(buf, JK_LB_UINT64_STR_SZ, "%" JK_UINT64_T_FMT, w->s->lb_value);
         /* JK_NOTE_LB_FIRST/LAST_VALUE */
         log_values[1] = buf;
         buf += JK_LB_UINT64_STR_SZ;
-        snprintf(buf, JK_LB_UINT64_STR_SZ, "%" JK_UINT64_T_FMT, w->s->elected);
+        snprintf(buf, JK_LB_UINT64_STR_SZ, "%" JK_UINT64_T_FMT, aw->s->used);
         /* JK_NOTE_LB_FIRST/LAST_ACCESSED */
         log_values[2] = buf;
         buf += JK_LB_UINT64_STR_SZ;
-        snprintf(buf, JK_LB_UINT64_STR_SZ, "%" JK_UINT64_T_FMT, w->s->readed);
+        snprintf(buf, JK_LB_UINT64_STR_SZ, "%" JK_UINT64_T_FMT, aw->s->readed);
         /* JK_NOTE_LB_FIRST/LAST_READ */
         log_values[3] = buf;
         buf += JK_LB_UINT64_STR_SZ;
-        snprintf(buf, JK_LB_UINT64_STR_SZ, "%" JK_UINT64_T_FMT, w->s->transferred);
+        snprintf(buf, JK_LB_UINT64_STR_SZ, "%" JK_UINT64_T_FMT, aw->s->transferred);
         /* JK_NOTE_LB_FIRST/LAST_TRANSFERRED */
         log_values[4] = buf;
         buf += JK_LB_UINT64_STR_SZ;
@@ -865,7 +990,7 @@
         /* JK_NOTE_LB_FIRST/LAST_ERRORS */
         log_values[5] = buf;
         buf += JK_LB_UINT64_STR_SZ;
-        snprintf(buf, JK_LB_UINT64_STR_SZ, "%d", w->s->busy);
+        snprintf(buf, JK_LB_UINT64_STR_SZ, "%d", aw->s->busy);
         /* JK_NOTE_LB_FIRST/LAST_BUSY */
         log_values[6] = buf;
         /* JK_NOTE_LB_FIRST/LAST_ACTIVATION */
@@ -882,11 +1007,12 @@
 {
     lb_endpoint_t *p;
     int attempt = 1;
-    worker_record_t *prec = NULL;
+    lb_sub_worker_t *prec = NULL;
     int num_of_workers;
     int first = 1;
     int was_forced = 0;
-    int rc = -1;
+    int recoverable = JK_TRUE;
+    int rc = JK_UNSET;
     char *sessionid = NULL;
 
     JK_TRACE_ENTER(l);
@@ -905,6 +1031,11 @@
     /* Set returned error to OK */
     *is_error = JK_HTTP_OK;
 
+    jk_shm_lock();
+    if (p->worker->sequence != p->worker->s->h.sequence)
+        jk_lb_pull(p->worker, l);
+    jk_shm_unlock();
+
     /* set the recovery post, for LB mode */
     s->reco_buf = jk_b_new(s->pool);
     if (!s->reco_buf) {
@@ -924,11 +1055,6 @@
     jk_b_reset(s->reco_buf);
     s->reco_status = RECO_INITED;
 
-    jk_shm_lock();
-    if (p->worker->sequence != p->worker->s->sequence)
-        jk_lb_pull(p->worker, l);
-    jk_shm_unlock();
-
     if (p->worker->sticky_session) {
         /* Use sessionid only if sticky_session is
          * defined for this load balancer
@@ -940,25 +1066,30 @@
                "service sticky_session=%d id='%s'",
                p->worker->sticky_session, sessionid ? sessionid : "empty");
 
-    while (attempt <= num_of_workers && rc == -1) {
-        worker_record_t *rec =
-            get_most_suitable_worker(p->worker, sessionid, s, l);
+    while (attempt <= num_of_workers && recoverable == JK_TRUE) {
+        lb_sub_worker_t *rec =
+            get_most_suitable_worker(s, p->worker, sessionid, l);
+        rc = JK_FALSE;
+        *is_error = JK_HTTP_SERVER_BUSY;
         /* Do not reuse previous worker, because
          * that worker already failed.
          */
         if (rec) {
             int r;
             int is_service_error = JK_HTTP_OK;
+            ajp_worker_t *aw = (ajp_worker_t *)rec->worker->worker_private;
             jk_endpoint_t *end = NULL;
             int retry = 0;
             int retry_wait = JK_LB_MIN_RETRY_WAIT;
-            s->route = rec->r;
+
+            if (!s->route)
+                s->route = rec->route;
             prec = rec;
 
             if (JK_IS_DEBUG_LEVEL(l))
                 jk_log(l, JK_LOG_DEBUG,
                        "service worker=%s route=%s",
-                       rec->s->name, s->route);
+                       rec->name, s->route);
 
             if (p->worker->lblock == JK_LB_LOCK_PESSIMISTIC)
                 jk_shm_lock();
@@ -967,7 +1098,7 @@
             if (p->worker->lblock == JK_LB_LOCK_PESSIMISTIC)
                 jk_shm_unlock();
                        
-            while ((!(r=rec->w->get_endpoint(rec->w, &end, l)) || !end) && (retry < p->worker->s->retries)) {
+            while ((!(r=rec->worker->get_endpoint(rec->worker, &end, l)) || !end) && (retry < p->worker->retries)) {
                 retry++;
                 retry_wait *=2;
 
@@ -999,52 +1130,49 @@
                     jk_shm_unlock();
                 jk_log(l, JK_LOG_INFO,
                        "could not get free endpoint for worker %s (%d retries)",
-                       rec->s->name, retry);
+                       rec->name, retry);
             }
             else {
-                int service_stat = -1;
+                int service_stat = JK_UNSET;
                 jk_uint64_t rd = 0;
                 jk_uint64_t wr = 0;
                 /* Reset endpoint read and write sizes for
                  * this request.
                  */
                 end->rd = end->wr = 0;
+                end->recoverable = JK_TRUE;
                 if (p->worker->lblock == JK_LB_LOCK_PESSIMISTIC)
                     jk_shm_lock();
 
-                rec->s->elected++;
                 /* Increment the number of workers serving request */
                 p->worker->s->busy++;
                 if (p->worker->s->busy > p->worker->s->max_busy)
                     p->worker->s->max_busy = p->worker->s->busy;
-                rec->s->busy++;
-                if (rec->s->busy > rec->s->max_busy)
-                    rec->s->max_busy = rec->s->busy;
                 if ( (p->worker->lbmethod == JK_LB_METHOD_REQUESTS) ||
                      (p->worker->lbmethod == JK_LB_METHOD_BUSYNESS) ||
                      (p->worker->lbmethod == JK_LB_METHOD_SESSIONS &&
                       !sessionid) )
-                    rec->s->lb_value += rec->s->lb_mult;
+                    rec->s->lb_value += rec->lb_mult;
                 if (p->worker->lblock == JK_LB_LOCK_PESSIMISTIC)
                     jk_shm_unlock();
 
                 service_stat = end->service(end, s, l, &is_service_error);
                 rd = end->rd;
                 wr = end->wr;
+                recoverable = end->recoverable;
+                *is_error = is_service_error;
                 end->done(&end, l);
 
                 if (p->worker->lblock == JK_LB_LOCK_PESSIMISTIC)
                     jk_shm_lock();
 
                 /* Update partial reads and writes if any */
-                rec->s->readed += rd;
-                rec->s->transferred += wr;
                 if (p->worker->lbmethod == JK_LB_METHOD_TRAFFIC) {
-                    rec->s->lb_value += (rd+wr)*rec->s->lb_mult;
+                    rec->s->lb_value += (rd+wr)*rec->lb_mult;
                 }
                 else if (p->worker->lbmethod == JK_LB_METHOD_BUSYNESS) {
-                    if (rec->s->lb_value >= rec->s->lb_mult) {
-                        rec->s->lb_value -= rec->s->lb_mult;
+                    if (rec->s->lb_value >= rec->lb_mult) {
+                        rec->s->lb_value -= rec->lb_mult;
                     }
                     else {
                         rec->s->lb_value = 0;
@@ -1056,9 +1184,9 @@
                                    JK_UINT64_T_FMT
                                    ") ",
                                    "- correcting to 0",
-                                   rec->s->name,
+                                   rec->name,
                                    rec->s->lb_value,
-                                   rec->s->lb_mult);
+                                   rec->lb_mult);
                         }
                     }
                 }
@@ -1072,68 +1200,96 @@
                  * Check if the busy was reset to zero by graceful
                  * restart of the server.
                  */
-                if (rec->s->busy)
-                    rec->s->busy--;
                 if (p->worker->s->busy)
                     p->worker->s->busy--;
                 if (service_stat == JK_TRUE) {
                     rec->s->state = JK_LB_STATE_OK;
                     rec->s->error_time = 0;
                     rc = JK_TRUE;
+                    recoverable = JK_UNSET;
                 }
                 else if (service_stat == JK_CLIENT_ERROR) {
                     /*
                     * Client error !!!
                     * Since this is bad request do not fail over.
                     */
-                    rec->s->client_errors++;
                     rec->s->state = JK_LB_STATE_OK;
                     rec->s->error_time = 0;
-                    jk_log(l, JK_LOG_INFO,
-                           "unrecoverable error %d, request failed."
-                           " Client failed in the middle of request,"
-                           " we can't recover to another instance.",
-                           is_service_error);
-                    *is_error = is_service_error;
                     rc = JK_CLIENT_ERROR;
+                    recoverable = JK_FALSE;
                 }
-                else {
-                    if (is_service_error != JK_HTTP_SERVER_BUSY) {
+                else if (service_stat == JK_SERVER_ERROR) {
+                    /*
+                    * Internal JK server error
+                    * Don't mark the node as bad.
+                    * Failing over to another node could help.
+                    */
+                    rec->s->state = JK_LB_STATE_OK;
+                    rec->s->error_time = 0;
+                    rc = JK_FALSE;
+                }
+                else if (service_stat == JK_STATUS_ERROR) {
+                    /*
+                    * Status code configured as service is down.
+                    * Don't mark the node as bad.
+                    * Failing over to another node could help.
+                    */
+                    rec->s->state = JK_LB_STATE_OK;
+                    rec->s->error_time = 0;
+                    rc = JK_FALSE;
+                }
+                else if (service_stat == JK_STATUS_FATAL_ERROR) {
+                    /*
+                    * Status code configured as service is down.
+                    * Mark the node as bad.
+                    * Failing over to another node could help.
+                    */
+                    rec->s->errors++;
+                    rec->s->state = JK_LB_STATE_ERROR;
+                    rec->s->error_time = time(NULL);
+                    rc = JK_FALSE;
+                }
+                else if (service_stat == JK_REPLY_TIMEOUT) {
+                    if (aw->s->reply_timeouts > (unsigned)p->worker->max_reply_timeouts) {
                         /*
-                        * Error is not recoverable - break with an error.
+                        * Service failed - to many reply timeouts
+                        * Take this node out of service.
                         */
-                        jk_log(l, JK_LOG_ERROR,
-                            "unrecoverable error %d, request failed."
-                            " Tomcat failed in the middle of request,"
-                            " we can't recover to another instance.",
-                            is_service_error);
-                        *is_error = is_service_error;
-                        rc = JK_FALSE;
-                    }
-                    if (service_stat == JK_REPLY_TIMEOUT) {
-                        rec->s->reply_timeouts++;
-                    }
-                    if (service_stat != JK_STATUS_ERROR &&
-                        (service_stat != JK_REPLY_TIMEOUT ||
-                        rec->s->reply_timeouts > (unsigned)p->worker->s->max_reply_timeouts)) {
-
-                        /*
-                        * Service failed !!!
-                        * Time for fault tolerance (if possible)...
-                        */
-
                         rec->s->errors++;
                         rec->s->state = JK_LB_STATE_ERROR;
                         rec->s->error_time = time(NULL);
-                        jk_log(l, JK_LOG_INFO,
-                               "service failed, worker %s is in error state",
-                               rec->s->name);
                     }
+                    else {
+                    /*
+                    * XXX: if we want to be able to failover
+                    * to other nodes after a reply timeout,
+                    * but we do not put the timeout node into error,
+                    * how can we make sure, that we actually fail over
+                    * to other nodes?
+                    */
+                        rec->s->state = JK_LB_STATE_OK;
+                        rec->s->error_time = 0;
+                    }
+                    rc = JK_FALSE;
                 }
+                else {
+                    /*
+                    * Service failed !!!
+                    * Time for fault tolerance (if possible)...
+                    */
+                    rec->s->errors++;
+                    rec->s->state = JK_LB_STATE_ERROR;
+                    rec->s->error_time = time(NULL);
+                    rc = JK_FALSE;
+                }
+                if (rec->s->state == JK_LB_STATE_ERROR)
+                    jk_log(l, JK_LOG_INFO,
+                           "service failed, worker %s is in error state",
+                           rec->name);
                 if (p->worker->lblock == JK_LB_LOCK_PESSIMISTIC)
                     jk_shm_unlock();
             }
-            if ( rc == -1 ) {
+            if (recoverable == JK_TRUE) {
                 /*
                  * Error is recoverable by submitting the request to
                  * another worker... Lets try to do that.
@@ -1142,6 +1298,23 @@
                     jk_log(l, JK_LOG_DEBUG,
                            "recoverable error... will try to recover on other worker");
             }
+            else {
+                /*
+                * Error is not recoverable - break with an error.
+                */
+                if (rc == JK_CLIENT_ERROR)
+                    jk_log(l, JK_LOG_INFO,
+                           "unrecoverable error %d, request failed."
+                           " Client failed in the middle of request,"
+                           " we can't recover to another instance.",
+                           *is_error);
+                else if (rc != JK_TRUE)
+                    jk_log(l, JK_LOG_ERROR,
+                           "unrecoverable error %d, request failed."
+                           " Tomcat failed in the middle of request,"
+                           " we can't recover to another instance.",
+                           *is_error);
+            }
             if (first == 1 && s->add_log_items) {
                 first = 0;
                 lb_add_log_items(s, lb_first_log_names, prec, l);
@@ -1163,7 +1336,6 @@
                      * Reset the service loop and go again
                      */
                     prec = NULL;
-                    rc   = -1;
                     jk_log(l, JK_LOG_INFO,
                            "Forcing recovery once for %d workers", nf);
                     continue;
@@ -1187,12 +1359,10 @@
         }
         attempt++;
     }
-    if ( rc == -1 ) {
+    if ( recoverable == JK_TRUE ) {
         jk_log(l, JK_LOG_INFO,
                "All tomcat instances are busy or in error state");
-        /* Set error to Timeout */
-        *is_error = JK_HTTP_SERVER_BUSY;
-        rc = JK_FALSE;
+        /* rc and http error must be set above */
     }
     if (prec && s->add_log_items) {
         lb_add_log_items(s, lb_last_log_names, prec, l);
@@ -1232,12 +1402,12 @@
         unsigned int num_of_workers;
         const char *secret;
 
-        p->sticky_session = jk_get_is_sticky_session(props, p->s->name);
-        p->sticky_session_force = jk_get_is_sticky_session_force(props, p->s->name);
-        secret = jk_get_worker_secret(props, p->s->name);
+        p->sticky_session = jk_get_is_sticky_session(props, p->name);
+        p->sticky_session_force = jk_get_is_sticky_session_force(props, p->name);
+        secret = jk_get_worker_secret(props, p->name);
 
         if (jk_get_lb_worker_list(props,
-                                  p->s->name,
+                                  p->name,
                                   &worker_names,
                                   &num_of_workers) && num_of_workers) {
             unsigned int i = 0;
@@ -1245,17 +1415,17 @@
             p->max_packet_size = DEF_BUFFER_SZ;
             p->lb_workers = jk_pool_alloc(&p->p,
                                           num_of_workers *
-                                          sizeof(worker_record_t));
+                                          sizeof(lb_sub_worker_t));
             if (!p->lb_workers) {
                 JK_TRACE_EXIT(l);
                 return JK_FALSE;
             }
 
             for (i = 0; i < num_of_workers; i++) {
-                p->lb_workers[i].s = jk_shm_alloc_worker(&p->p);
+                p->lb_workers[i].s = jk_shm_alloc_lb_sub_worker(&p->p);
                 if (p->lb_workers[i].s == NULL) {
                     jk_log(l, JK_LOG_ERROR,
-                           "allocating worker record from shared memory");
+                           "allocating lb sub worker record from shared memory");
                     JK_TRACE_EXIT(l);
                     return JK_FALSE;
                 }
@@ -1264,12 +1434,16 @@
             for (i = 0; i < num_of_workers; i++) {
                 const char *s;
                 unsigned int ms;
-                strncpy(p->lb_workers[i].s->name, worker_names[i],
+                strncpy(p->lb_workers[i].name, worker_names[i],
                         JK_SHM_STR_SIZ);
-                p->lb_workers[i].s->lb_factor =
+                strncpy(p->lb_workers[i].s->h.name, worker_names[i],
+                        JK_SHM_STR_SIZ);
+                p->lb_workers[i].sequence = 0;
+                p->lb_workers[i].s->h.sequence = 0;
+                p->lb_workers[i].lb_factor =
                     jk_get_lb_factor(props, worker_names[i]);
-                if (p->lb_workers[i].s->lb_factor < 1) {
-                    p->lb_workers[i].s->lb_factor = 1;
+                if (p->lb_workers[i].lb_factor < 1) {
+                    p->lb_workers[i].lb_factor = 1;
                 }
                 /* Calculate the maximum packet size from all workers
                  * for the recovery buffer.
@@ -1277,31 +1451,31 @@
                 ms = jk_get_max_packet_size(props, worker_names[i]);
                 if (ms > p->max_packet_size)
                     p->max_packet_size = ms;
-                p->lb_workers[i].s->distance =
+                p->lb_workers[i].distance =
                     jk_get_distance(props, worker_names[i]);
                 if ((s = jk_get_worker_route(props, worker_names[i], NULL)))
-                    strncpy(p->lb_workers[i].s->route, s, JK_SHM_STR_SIZ);
+                    strncpy(p->lb_workers[i].route, s, JK_SHM_STR_SIZ);
                 else
-                    strncpy(p->lb_workers[i].s->route, worker_names[i], JK_SHM_STR_SIZ);
+                    strncpy(p->lb_workers[i].route, worker_names[i], JK_SHM_STR_SIZ);
                 if ((s = jk_get_worker_domain(props, worker_names[i], NULL)))
-                    strncpy(p->lb_workers[i].s->domain, s, JK_SHM_STR_SIZ);
+                    strncpy(p->lb_workers[i].domain, s, JK_SHM_STR_SIZ);
                 if ((s = jk_get_worker_redirect(props, worker_names[i], NULL)))
-                    strncpy(p->lb_workers[i].s->redirect, s, JK_SHM_STR_SIZ);
+                    strncpy(p->lb_workers[i].redirect, s, JK_SHM_STR_SIZ);
 
                 p->lb_workers[i].s->lb_value = 0;
                 p->lb_workers[i].s->state = JK_LB_STATE_IDLE;
                 p->lb_workers[i].s->error_time = 0;
-                p->lb_workers[i].s->activation =
+                p->lb_workers[i].activation =
                     jk_get_worker_activation(props, worker_names[i]);
-                if (!wc_create_worker(p->lb_workers[i].s->name, 0,
+                if (!wc_create_worker(p->lb_workers[i].name, 0,
                                       props,
-                                      &(p->lb_workers[i].w),
-                                      we, l) || !p->lb_workers[i].w) {
+                                      &(p->lb_workers[i].worker),
+                                      we, l) || !p->lb_workers[i].worker) {
                     break;
                 }
-                if (secret && (p->lb_workers[i].w->type == JK_AJP13_WORKER_TYPE ||
-                    p->lb_workers[i].w->type == JK_AJP14_WORKER_TYPE)) {
-                    ajp_worker_t *aw = (ajp_worker_t *)p->lb_workers[i].w->worker_private;
+                if (secret && (p->lb_workers[i].worker->type == JK_AJP13_WORKER_TYPE ||
+                    p->lb_workers[i].worker->type == JK_AJP14_WORKER_TYPE)) {
+                    ajp_worker_t *aw = (ajp_worker_t *)p->lb_workers[i].worker->worker_private;
                     if (!aw->secret)
                         aw->secret = secret;
                 }
@@ -1310,17 +1484,17 @@
             if (i != num_of_workers) {
                 jk_log(l, JK_LOG_ERROR,
                        "Failed creating worker %s",
-                       p->lb_workers[i].s->name);
+                       p->lb_workers[i].name);
                 close_workers(p, i, l);
             }
             else {
                 /* Update domain names if route contains period '.' */
                 for (i = 0; i < num_of_workers; i++) {
-                    if (!p->lb_workers[i].s->domain[0]) {
-                        char * id_domain = strchr(p->lb_workers[i].s->route, '.');
+                    if (!p->lb_workers[i].domain[0]) {
+                        char * id_domain = strchr(p->lb_workers[i].route, '.');
                         if (id_domain) {
                             *id_domain = '\0';
-                            strcpy(p->lb_workers[i].s->domain, p->lb_workers[i].s->route);
+                            strcpy(p->lb_workers[i].domain, p->lb_workers[i].route);
                             *id_domain = '.';
                         }
                     }
@@ -1328,23 +1502,23 @@
                         jk_log(l, JK_LOG_DEBUG,
                                "Balanced worker %i has name %s and route %s in domain %s",
                                i,
-                               p->lb_workers[i].s->name,
-                               p->lb_workers[i].s->route,
-                               p->lb_workers[i].s->domain);
+                               p->lb_workers[i].name,
+                               p->lb_workers[i].route,
+                               p->lb_workers[i].domain);
                     }
                 }
                 p->num_of_workers = num_of_workers;
                 update_mult(p, l);
                 for (i = 0; i < num_of_workers; i++) {
                     for (j = 0; j < i; j++) {
-                        if (strcmp(p->lb_workers[i].s->route, p->lb_workers[j].s->route) == 0) {
+                        if (strcmp(p->lb_workers[i].route, p->lb_workers[j].route) == 0) {
                             jk_log(l, JK_LOG_ERROR,
                                    "Balanced workers number %i (%s) and %i (%s) share the same route %s - aborting configuration!",
                                    i,
-                                   p->lb_workers[i].s->name,
+                                   p->lb_workers[i].name,
                                    j,
-                                   p->lb_workers[j].s->name,
-                                   p->lb_workers[i].s->route);
+                                   p->lb_workers[j].name,
+                                   p->lb_workers[i].route);
                             JK_TRACE_EXIT(l);
                             return JK_FALSE;
                         }
@@ -1370,22 +1544,21 @@
     lb_worker_t *p = (lb_worker_t *)pThis->worker_private;
     JK_TRACE_ENTER(log);
 
-    pThis->retries = jk_get_worker_retries(props, p->s->name,
-                                           JK_RETRIES);
-    p->retries = pThis->retries;
-    p->recover_wait_time = jk_get_worker_recover_timeout(props, p->s->name,
+    p->retries = jk_get_worker_retries(props, p->name,
+                                       JK_RETRIES);
+    p->recover_wait_time = jk_get_worker_recover_timeout(props, p->name,
                                                             WAIT_BEFORE_RECOVER);
     if (p->recover_wait_time < 1)
         p->recover_wait_time = 1;
-    p->max_reply_timeouts = jk_get_worker_max_reply_timeouts(props, p->s->name,
+    p->max_reply_timeouts = jk_get_worker_max_reply_timeouts(props, p->name,
                                                              0);
     p->maintain_time = jk_get_worker_maintain_time(props);
     if(p->maintain_time < 0)
         p->maintain_time = 0;
     p->s->last_maintain_time = time(NULL);
 
-    p->lbmethod = jk_get_lb_method(props, p->s->name);
-    p->lblock   = jk_get_lb_lock(props, p->s->name);
+    p->lbmethod = jk_get_lb_method(props, p->name);
+    p->lblock   = jk_get_lb_lock(props, p->name);
 
     JK_INIT_CS(&(p->cs), i);
     if (i == JK_FALSE) {
@@ -1465,13 +1638,14 @@
                         private_data->buf,
                         sizeof(jk_pool_atom_t) * TINY_POOL_SIZE);
 
-        private_data->s = jk_shm_alloc_worker(&private_data->p);
+        private_data->s = jk_shm_alloc_lb_worker(&private_data->p);
         if (!private_data->s) {
             free(private_data);
             JK_TRACE_EXIT(l);
             return 0;
         }
-        strncpy(private_data->s->name, name, JK_SHM_STR_SIZ);
+        strncpy(private_data->name, name, JK_SHM_STR_SIZ);
+        strncpy(private_data->s->h.name, name, JK_SHM_STR_SIZ);
         private_data->lb_workers = NULL;
         private_data->num_of_workers = 0;
         private_data->worker.worker_private = private_data;
@@ -1480,10 +1654,11 @@
         private_data->worker.get_endpoint = get_endpoint;
         private_data->worker.destroy = destroy;
         private_data->worker.maintain = maintain_workers;
-        private_data->worker.retries = JK_RETRIES;
         private_data->recover_wait_time = WAIT_BEFORE_RECOVER;
         private_data->max_reply_timeouts = 0;
         private_data->sequence = 0;
+        private_data->s->h.sequence = 0;
+        private_data->next_offset = 0;
         *w = &private_data->worker;
         JK_TRACE_EXIT(l);
         return JK_LB_WORKER_TYPE;

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_lb_worker.h
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_lb_worker.h	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_lb_worker.h	2008-04-06 12:38:06 UTC (rev 6107)
@@ -19,7 +19,7 @@
  * Description: load balance worker header file                            *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
  * Author:      Rainer Jung <rjung at apache.org>                             *
- * Version:     $Revision: 550272 $                                           *
+ * Version:     $Revision: 613544 $                                           *
  ***************************************************************************/
 
 #ifndef JK_LB_WORKER_H
@@ -37,6 +37,7 @@
 
 #define JK_LB_WORKER_NAME     ("lb")
 #define JK_LB_WORKER_TYPE     (5)
+#define JK_LB_SUB_WORKER_TYPE (7)
 #define JK_LB_DEF_DOMAIN_NAME ("unknown")
 
 #define JK_LB_METHOD_REQUESTS          (0)
@@ -57,26 +58,41 @@
 #define JK_LB_LOCK_TEXT_OPTIMISTIC     ("Optimistic")
 #define JK_LB_LOCK_TEXT_PESSIMISTIC    ("Pessimistic")
 #define JK_LB_LOCK_TEXT_DEF            (JK_LB_LOCK_TEXT_OPTIMISTIC)
+/*
+ * The following definitions for state and activation
+ * need to be kept in sync with the two macros 
+ * JK_WORKER_USABLE() and JK_WORKER_USABLE_STICKY() in jk_lb_worker.c.
+ * Since we use ordered comparisons there instead of multiple
+ * equal/unequal compares, order of the values is critical here.
+ */
 #define JK_LB_STATE_IDLE               (0)
 #define JK_LB_STATE_OK                 (1)
 #define JK_LB_STATE_RECOVER            (2)
-#define JK_LB_STATE_BUSY               (3)
-#define JK_LB_STATE_ERROR              (4)
-#define JK_LB_STATE_FORCE              (5)
+#define JK_LB_STATE_FORCE              (3)
+#define JK_LB_STATE_BUSY               (4)
+#define JK_LB_STATE_ERROR              (5)
 #define JK_LB_STATE_PROBE              (6)
 #define JK_LB_STATE_DEF                (JK_LB_STATE_IDLE)
 #define JK_LB_STATE_TEXT_IDLE          ("OK/IDLE")
 #define JK_LB_STATE_TEXT_OK            ("OK")
 #define JK_LB_STATE_TEXT_RECOVER       ("ERR/REC")
 #define JK_LB_STATE_TEXT_BUSY          ("OK/BUSY")
+#define JK_LB_STATE_TEXT_FORCE         ("ERR/FRC")
 #define JK_LB_STATE_TEXT_ERROR         ("ERR")
-#define JK_LB_STATE_TEXT_FORCE         ("ERR/FRC")
 #define JK_LB_STATE_TEXT_PROBE         ("ERR/PRB")
 #define JK_LB_STATE_TEXT_MAX           (JK_LB_STATE_PROBE)
 #define JK_LB_STATE_TEXT_DEF           (JK_LB_STATE_TEXT_IDLE)
+/* All JK_LB_ACTIVATION_* values must be single digit. */
+/* Otherwise the string encoding of the activation array */
+/* fails e.g. in the isapi redirector. */
+/* JK_LB_ACTIVATION_UNSET is not allowed as an actual worker state. */
+/* It will not work e.g. when the status worker tries to show the state. */
+/* It is only used in rule extension data to indicate, that the */
+/* activation state should not be overwritten. */
 #define JK_LB_ACTIVATION_ACTIVE        (0)
 #define JK_LB_ACTIVATION_DISABLED      (1)
 #define JK_LB_ACTIVATION_STOPPED       (2)
+#define JK_LB_ACTIVATION_UNSET         (9)
 #define JK_LB_ACTIVATION_DEF           (JK_LB_ACTIVATION_ACTIVE)
 #define JK_LB_ACTIVATION_MAX           (JK_LB_ACTIVATION_STOPPED)
 #define JK_LB_ACTIVATION_TEXT_ACTIVE   ("ACT")
@@ -118,21 +134,54 @@
 /* The exponent x is JK_LB_DECAY_MULT*#MAINT_INTV_SINCE_LAST_MAINT */
 #define JK_LB_DECAY_MULT         (1)
 
-struct worker_record
+struct lb_sub_worker
 {
-    jk_worker_t      *w;
+    jk_worker_t *worker;
     /* Shared memory worker data */
-    jk_shm_worker_t  *s;
-    /* Current route. Can be name or domain */
-    const char       *r;
+    jk_shm_lb_sub_worker_t *s;
+
+    char         name[JK_SHM_STR_SIZ+1];
+    /* Sequence counter starting at 0 and increasing
+     * every time we change the config
+     */
+    volatile unsigned int sequence;
+
+    /* route */
+    char    route[JK_SHM_STR_SIZ+1];
+    /* worker domain */
+    char    domain[JK_SHM_STR_SIZ+1];
+    /* worker redirect route */
+    char    redirect[JK_SHM_STR_SIZ+1];
+    /* worker distance */
+    int distance;
+    /* current activation state (config) of the worker */
+    int activation;
+    /* Current lb factor */
+    int lb_factor;
+    /* Current lb reciprocal factor */
+    jk_uint64_t lb_mult;
 };
-typedef struct worker_record worker_record_t;
+typedef struct lb_sub_worker lb_sub_worker_t;
 
 struct lb_worker
 {
-    worker_record_t *lb_workers;
+    jk_worker_t worker;
+    /* Shared memory worker data */
+    jk_shm_lb_worker_t *s;
+
+    char         name[JK_SHM_STR_SIZ+1];
+    /* Sequence counter starting at 0 and increasing
+     * every time we change the config
+     */
+    volatile unsigned int sequence;
+
+    jk_pool_t p;
+    jk_pool_atom_t buf[TINY_POOL_SIZE];
+
+    JK_CRIT_SEC cs;
+
+    lb_sub_worker_t *lb_workers;
     unsigned int num_of_workers;
-    char         name[JK_SHM_STR_SIZ+1];
     int          sticky_session;
     int          sticky_session_force;
     int          recover_wait_time;
@@ -142,16 +191,8 @@
     int          lblock;
     int          maintain_time;
     unsigned int max_packet_size;
-    unsigned int sequence;
+    unsigned int next_offset;
 
-    jk_pool_t p;
-    jk_pool_atom_t buf[TINY_POOL_SIZE];
-
-    jk_worker_t worker;
-    JK_CRIT_SEC cs;
-
-    /* Shared memory worker data */
-    jk_shm_worker_t  *s;
 };
 typedef struct lb_worker lb_worker_t;
 
@@ -162,9 +203,10 @@
 int jk_lb_get_lock_code(const char *v);
 const char *jk_lb_get_method(lb_worker_t *p, jk_logger_t *l);
 int jk_lb_get_method_code(const char *v);
-const char *jk_lb_get_state(worker_record_t *p, jk_logger_t *l);
+const char *jk_lb_get_state(lb_sub_worker_t *p, jk_logger_t *l);
 int jk_lb_get_state_code(const char *v);
-const char *jk_lb_get_activation(worker_record_t *p, jk_logger_t *l);
+const char *jk_lb_get_activation_direct(int activation, jk_logger_t *l);
+const char *jk_lb_get_activation(lb_sub_worker_t *p, jk_logger_t *l);
 int jk_lb_get_activation_code(const char *v);
 void reset_lb_values(lb_worker_t *p, jk_logger_t *l);
 void jk_lb_pull(lb_worker_t * p, jk_logger_t *l);

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_logger.h
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_logger.h	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_logger.h	2008-04-06 12:38:06 UTC (rev 6107)
@@ -18,7 +18,7 @@
 /***************************************************************************
  * Description: Logger object definitions                                  *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
- * Version:     $Revision: 559692 $                                           *
+ * Version:     $Revision: 596813 $                                           *
  ***************************************************************************/
 
 #ifndef JK_LOGGER_H
@@ -31,17 +31,19 @@
 {
 #endif
 
+#define JK_TIME_MAX_SIZE (64)
+
 typedef struct jk_logger jk_logger_t;
 struct jk_logger
 {
     void *logger_private;
     int level;
-    const char *log_fmt;        /* the configured timestamp format for logging */
-    const char *log_fmt_subsec; /* like log_fmt, but milli/micro seconds
-                                   marker replaced, because strftime() doesn't handle those */
-    int    log_fmt_type;        /* do we want milli or microseconds */
-    size_t log_fmt_offset;      /* at which position should we insert */
-    size_t log_fmt_size;        /* how long is this format string */
+    const char *log_fmt;                   /* the configured timestamp format for logging */
+    char log_fmt_subsec[JK_TIME_MAX_SIZE]; /* like log_fmt, but milli/micro seconds marker
+                                              replaced, because strftime() doesn't handle those */
+    int    log_fmt_type;                   /* do we want milli or microseconds */
+    size_t log_fmt_offset;                 /* at which position should we insert */
+    size_t log_fmt_size;                   /* how long is this format string */
 
     int (JK_METHOD * log) (jk_logger_t *l, int level, int used, char *what);
 

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_map.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_map.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_map.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -19,7 +19,7 @@
  * Description: General purpose map object                                 *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
  * Author:      Mladen Turk <mturk at apache.org>                             *
- * Version:     $Revision: 550239 $                                          *
+ * Version:     $Revision: 610534 $                                          *
  ***************************************************************************/
 #if defined(AS400) && !defined(AS400_UTF8)
 #include "apr_xlate.h"
@@ -249,7 +249,7 @@
     const char *l = jk_map_get_string(m, name, def);
     char **ar = NULL;
 
-#ifdef _REENTRANT
+#ifdef _MT_CODE_PTHREAD
     char *lasts;
 #endif
 
@@ -269,7 +269,7 @@
          * GS, in addition to VG's patch, we now need to
          * strtok also by a "*"
          */
-#ifdef _REENTRANT
+#ifdef _MT_CODE_PTHREAD
         for (p = strtok_r(v, " \t,", &lasts);
              p; p = strtok_r(NULL, " \t,", &lasts))
 #else
@@ -305,7 +305,7 @@
 {
     const char *l = jk_map_get_string(m, name, def);
 
-#ifdef _REENTRANT
+#ifdef _MT_CODE_PTHREAD
     char *lasts;
 #endif
 
@@ -326,7 +326,7 @@
          * GS, in addition to VG's patch, we now need to
          * strtok also by a "*"
          */
-#ifdef _REENTRANT
+#ifdef _MT_CODE_PTHREAD
         for (p = strtok_r(v, " \t,", &lasts);
              p; p = strtok_r(NULL, " \t,", &lasts))
 #else
@@ -398,23 +398,20 @@
 
 static int jk_map_validate_property(char *prp, jk_logger_t *l)
 {
-    int off = (int)strlen(prp) - (int)JK_MAP_REFERENCE_SZ;
     /* check the worker properties */
-    if (off <= 0 || strncmp(&prp[off], JK_MAP_REFERENCE, JK_MAP_REFERENCE_SZ) ) {
-        if (!jk_is_valid_property(prp)) {
-            jk_log(l, JK_LOG_ERROR,
-                   "The attribute '%s' is not supported - please check"
-                   " the documentation for the supported attributes.",
-                   prp);
-            return JK_FALSE;
-        }
-        if (jk_is_deprecated_property(prp)) {
-            jk_log(l, JK_LOG_WARNING,
-                   "The attribute '%s' is deprecated - please check"
-                   " the documentation for the correct replacement.",
-                   prp);
-        }
+    if (!jk_is_valid_property(prp)) {
+        jk_log(l, JK_LOG_ERROR,
+               "The attribute '%s' is not supported - please check"
+               " the documentation for the supported attributes.",
+               prp);
+        return JK_FALSE;
     }
+    if (jk_is_deprecated_property(prp)) {
+        jk_log(l, JK_LOG_WARNING,
+               "The attribute '%s' is deprecated - please check"
+               " the documentation for the correct replacement.",
+               prp);
+    }
     return JK_TRUE;
 }
 
@@ -477,9 +474,7 @@
         if (v) {
             *v = '\0';
             v++;
-            trim(prp);
-            trim(v);
-            if (strlen(v) && strlen(prp)) {
+            if (trim(v) && trim(prp)) {
                 if (treatment == JK_MAP_HANDLE_RAW) {
                     v = jk_pool_strdup(&m->p, v);
                 }
@@ -577,18 +572,46 @@
 void jk_map_dump(jk_map_t *m, jk_logger_t *l)
 {
     if (m) {
-        if (JK_IS_DEBUG_LEVEL(l)) {
-            int s = jk_map_size(m);
-            int i;
-            for (i=0;i<s;i++) {
+        int s = jk_map_size(m);
+        int i;
+        for (i=0;i<s;i++) {
+            if (!jk_map_name_at(m, i)) {
+                jk_log(l, JK_LOG_WARNING,
+                       "Map contains empty name at index %d\n", i);
+            }
+            if (!jk_map_value_at(m, i)) {
+                jk_log(l, JK_LOG_WARNING,
+                       "Map contains empty value for name '%s' at index %d\n",
+                       jk_map_name_at(m, i), i);
+            }
+            if (JK_IS_DEBUG_LEVEL(l)) {
                 jk_log(l, JK_LOG_DEBUG,
                        "Dump of map: '%s' -> '%s'",
-                       jk_map_name_at(m, i), jk_map_value_at(m, i));
+                       jk_map_name_at(m, i) ? jk_map_name_at(m, i) : "(null)",
+                       jk_map_value_at(m, i) ? jk_map_value_at(m, i) : "(null)");
             }
         }
     }
 }
 
+int jk_map_copy(jk_map_t *src, jk_map_t *dst)
+{
+    int sz = jk_map_size(src);
+    int i;
+    for (i = 0; i < sz; i++) {
+        const char *name = jk_map_name_at(src, i);
+        if (jk_map_get(dst, name, NULL) == NULL) {
+            if (!jk_map_put(dst, name,
+                            jk_pool_strdup(&dst->p, jk_map_get_string(src, name, NULL)),
+                            NULL)) {
+                return JK_FALSE;
+            }
+        }
+    }
+    return JK_TRUE;
+}
+
+
 static void trim_prp_comment(char *prp)
 {
 #if defined(AS400) && !defined(AS400_UTF8)
@@ -746,14 +769,16 @@
                        "Checking for references with prefix %s with%s wildcard (recursion %d)",
                        prefix, wildcard? "" : "out", depth);
             for (i = 0; i < m->size; i++) {
-                if (m->values[i] && !strncmp(m->names[i], prefix, prelen)) {
+                char *v = (char *)m->values[i];
+                if (v && *v &&
+                    !strncmp(m->names[i], prefix, prelen)) {
                     size_t remain = strlen(m->names[i]) - prelen;
                     if ((remain == JK_MAP_REFERENCE_SZ ) || (wildcard && remain > JK_MAP_REFERENCE_SZ)) {
                         remain = strlen(m->names[i]) - JK_MAP_REFERENCE_SZ;
                         if (!strncmp(m->names[i] + remain, JK_MAP_REFERENCE, JK_MAP_REFERENCE_SZ)) {
                             char *from = jk_pool_alloc(&m->p,
                                                        (sizeof(char) *
-                                                       (strlen(m->values[i]) + 2)));
+                                                       (strlen(v) + 2)));
                             char *to = jk_pool_alloc(&m->p,
                                                      (sizeof(char) *
                                                      (remain + 2)));
@@ -763,14 +788,14 @@
                                 rc = JK_FALSE;
                                 break;
                             }
-                            strcpy(from, m->values[i]);
-                            *(from+strlen(m->values[i]))   = '.';
-                            *(from+strlen(m->values[i])+1) = '\0';
+                            strcpy(from, v);
+                            *(from+strlen(v))   = '.';
+                            *(from+strlen(v)+1) = '\0';
                             strncpy(to, m->names[i], remain);
                             *(to+remain)   = '.';
                             *(to+remain+1) = '\0';
 
-                            rc = jk_map_resolve_references(m, m->values[i], 0, depth+1, l);
+                            rc = jk_map_resolve_references(m, v, 0, depth+1, l);
                             if (rc == JK_FALSE) {
                                 break;
                             }
@@ -782,7 +807,6 @@
                             if (rc == JK_FALSE) {
                                 break;
                             }
-                            m->values[i] = NULL;
                         }
                     }
                 }

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_map.h
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_map.h	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_map.h	2008-04-06 12:38:06 UTC (rev 6107)
@@ -18,7 +18,7 @@
 /***************************************************************************
  * Description: Map object header file                                     *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
- * Version:     $Revision: 550239 $                                           *
+ * Version:     $Revision: 591502 $                                           *
  ***************************************************************************/
 
 #ifndef JK_MAP_H
@@ -82,6 +82,8 @@
 
 void jk_map_dump(jk_map_t *m, jk_logger_t *l);
 
+int jk_map_copy(jk_map_t *src, jk_map_t *dst);
+
 /**
  *  Replace $(property) in value.
  *

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_service.h
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_service.h	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_service.h	2008-04-06 12:38:06 UTC (rev 6107)
@@ -22,7 +22,7 @@
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
  * Author:      Dan Milstein <danmil at shore.net>                            *
  * Author:      Henri Gomez <hgomez at apache.org>                            *
- * Version:     $Revision: 548791 $                                          *
+ * Version:     $Revision: 613546 $                                          *
  ***************************************************************************/
 
 #ifndef JK_SERVICE_H
@@ -51,6 +51,9 @@
 struct jk_worker_env
 {
 
+    /* The original configuration map */
+    jk_map_t *init_data;
+
     /* The URI to WORKER map, will be feeded by AJP14 autoconf feature */
     jk_uri_worker_map_t *uri_to_worker;
 
@@ -72,6 +75,21 @@
 typedef struct jk_endpoint jk_endpoint_t;
 typedef struct jk_worker jk_worker_t;
 
+struct svc_extension
+{
+    /* reply_timeout overwrite */
+    int reply_timeout;
+    /* activation state overwrites for load balancers */
+    /* Dynamically allocated array with one entry per lb member. */
+    int *activation;
+    /* fail_on_status overwrites */
+    /* Number of elements in the array fail_on_status. */
+    int fail_on_status_size;
+    /* Dynamically allocated array with one entry per status. */
+    int *fail_on_status;
+};
+typedef struct svc_extension svc_extension_t;
+
 /*
  * The web server service 'class'.  An instance of this class is created
  * for each request which is forwarded from the web server to the servlet
@@ -208,10 +226,6 @@
     jk_msg_buf_t *reco_buf;
     int reco_status;
 
-    /* Number of retries. Defaults to JK_RETRIES
-     */
-    int retries;
-
     /*
      * If set call flush after each write
      */
@@ -223,6 +237,16 @@
     int flush_header;
 
     /*
+     * service extensions
+     */
+    svc_extension_t extension;
+
+    /*
+     * JK_TRUE if response headers have been sent back
+     */
+    int response_started;
+
+    /*
      * HTTP status sent from container.
      */
     int http_response_status;
@@ -278,6 +302,21 @@
                                       const char *const *log_names,
                                       const char *const *log_values,
                                       unsigned num_of_items);
+
+    /*
+     * Iterate through all vhosts
+     */
+    void *(JK_METHOD * next_vhost) (void *d);
+
+    /*
+     * String representation of a vhost
+     */
+    void (JK_METHOD * vhost_to_text) (void *d, char *buf, size_t len);
+
+    /*
+     * Get uw_map associated with a vhost
+     */
+    jk_uri_worker_map_t *(JK_METHOD * vhost_to_uw_map) (void *d);
 };
 
 /*
@@ -316,6 +355,14 @@
     jk_uint64_t wr;
 
     /*
+     * Flag to pass back recoverability status from
+     * a load balancer member to the load balancer itself.
+     * Depending on the configuration and request status
+     * recovery is not allowed.
+     */
+    int recoverable;
+
+    /*
      * A 'this' pointer which is used by the subclasses of this class to
      * point to data/functions which are specific to a given protocol
      * (e.g. ajp12 or ajp13 or ajp14).
@@ -388,11 +435,6 @@
 {
 
     /*
-     * Public property to enable the number of retry attempts
-     * on this worker.
-     */
-    int retries;
-    /*
      * A 'this' pointer which is used by the subclasses of this class to
      * point to data/functions which are specific to a given protocol
      * (e.g. ajp12 or ajp13 or ajp14).

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_shm.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_shm.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_shm.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -19,13 +19,16 @@
  * Description: Shared Memory support                                      *
  * Author:      Mladen Turk <mturk at jboss.com>                              *
  * Author:      Rainer Jung <rjung at apache.org>                             *
- * Version:     $Revision: 551893 $                                        *
+ * Version:     $Revision: 611595 $                                        *
  ***************************************************************************/
 
 #include "jk_global.h"
 #include "jk_pool.h"
 #include "jk_util.h"
 #include "jk_mt.h"
+#include "jk_lb_worker.h"
+#include "jk_ajp13_worker.h"
+#include "jk_ajp14_worker.h"
 #include "jk_shm.h"
 
 /** jk shm header core data structure */
@@ -58,6 +61,9 @@
 struct jk_shm
 {
     size_t     size;
+    unsigned   ajp_workers;
+    unsigned   lb_sub_workers;
+    unsigned   lb_workers;
     char       *filename;
     char       *lockname;
     int        fd;
@@ -70,13 +76,73 @@
 typedef struct jk_shm jk_shm_t;
 
 static const char shm_signature[] = { JK_SHM_MAGIC };
-static jk_shm_t jk_shmem = { 0, NULL, NULL, -1, -1, 0, NULL};
+static jk_shm_t jk_shmem = { 0, 0, 0, 0, NULL, NULL, -1, -1, 0, NULL};
 static time_t jk_workers_modified_time = 0;
 static time_t jk_workers_access_time = 0;
 #if defined (WIN32)
 static HANDLE jk_shm_map = NULL;
 #endif
 
+/* Calculate needed shm size */
+size_t jk_shm_calculate_size(jk_map_t *init_data, jk_logger_t *l)
+{
+    char **worker_list;
+    unsigned i;
+    unsigned num_of_workers;
+    int num_of_ajp_workers = 0;
+    int num_of_lb_sub_workers = 0;
+    int num_of_lb_workers = 0;
+
+    JK_TRACE_ENTER(l);
+
+    if (jk_get_worker_list(init_data, &worker_list,
+                           &num_of_workers) == JK_FALSE) {
+        jk_log(l, JK_LOG_ERROR,
+               "Could not get worker list from map");
+        JK_TRACE_EXIT(l);
+        return 0;
+    }
+
+    for (i = 0; i < num_of_workers; i++) {
+        const char *type = jk_get_worker_type(init_data, worker_list[i]);
+
+        if (!strcmp(type, JK_AJP13_WORKER_NAME) ||
+            !strcmp(type, JK_AJP14_WORKER_NAME)) {
+            num_of_ajp_workers++;
+        }
+        else if (!strcmp(type, JK_LB_WORKER_NAME)) {
+            char **member_list;
+            unsigned num_of_members;
+            num_of_lb_workers++;
+            if (jk_get_lb_worker_list(init_data, worker_list[i],
+                                      &member_list, &num_of_members) == JK_FALSE) {
+                jk_log(l, JK_LOG_ERROR,
+                       "Could not get member list for lb worker from map");
+            }
+            else {
+                if (JK_IS_DEBUG_LEVEL(l))
+                    jk_log(l, JK_LOG_DEBUG, "worker %s of type %s has %u members",
+                           worker_list[i], JK_LB_WORKER_NAME, num_of_members);
+                num_of_lb_sub_workers += num_of_members;
+            }
+        }
+    }
+    if (JK_IS_DEBUG_LEVEL(l))
+        jk_log(l, JK_LOG_DEBUG, "shared memory will contain %d ajp workers of size %d and %d lb workers of size %d with %d members of size %d+%d",
+               num_of_ajp_workers, JK_SHM_AJP_SIZE(1),
+               num_of_lb_workers, JK_SHM_LB_SIZE(1),
+               num_of_lb_sub_workers, JK_SHM_LB_SUB_SIZE(1), JK_SHM_AJP_SIZE(1));
+    jk_shmem.ajp_workers = num_of_ajp_workers;
+    jk_shmem.lb_sub_workers = num_of_lb_sub_workers;
+    jk_shmem.lb_workers = num_of_lb_workers;
+    JK_TRACE_EXIT(l);
+    return JK_SHM_AJP_SIZE(jk_shmem.ajp_workers) +
+           JK_SHM_LB_SUB_SIZE(jk_shmem.lb_sub_workers) +
+           JK_SHM_AJP_SIZE(jk_shmem.lb_sub_workers) +
+           JK_SHM_LB_SIZE(jk_shmem.lb_workers);
+}
+
+
 #if defined (WIN32) || defined(NETWARE)
 
 /* Use plain memory */
@@ -92,7 +158,7 @@
         return 0;
     }
 
-    jk_shmem.size =  JK_SHM_ALIGN(sizeof(jk_shm_header_t) + sz);
+    jk_shmem.size = JK_SHM_ALIGN(sizeof(jk_shm_header_t) + sz);
 
 #if defined (WIN32)
     if (fname) {
@@ -167,9 +233,11 @@
     JK_INIT_CS(&(jk_shmem.cs), rc);
     if (JK_IS_DEBUG_LEVEL(l))
         jk_log(l, JK_LOG_DEBUG,
-               "%s shared memory size=%u free=%u addr=%#lx",
+               "%s shared memory %s size=%u free=%u addr=%#lx",
                attached ? "Attached" : "Initialized",
-               jk_shmem.size, jk_shmem.hdr->h.data.size, jk_shmem.hdr);
+               jk_shm_name(), jk_shmem.size,
+               jk_shmem.hdr->h.data.size - jk_shmem.hdr->h.data.pos,
+               jk_shmem.hdr);
     JK_TRACE_EXIT(l);
     return 0;
 }
@@ -182,8 +250,8 @@
             jk_shmem.attached = 1;
             if (JK_IS_DEBUG_LEVEL(l)) {
                 jk_log(l, JK_LOG_DEBUG,
-                   "Attached shared memory [%d] size=%u free=%u addr=%#lx",
-                   jk_shmem.hdr->h.data.childs, jk_shmem.hdr->h.data.size,
+                   "Attached shared memory %s [%d] size=%u free=%u addr=%#lx",
+                   jk_shm_name(), jk_shmem.hdr->h.data.childs, jk_shmem.size,
                    jk_shmem.hdr->h.data.size - jk_shmem.hdr->h.data.pos,
                    jk_shmem.hdr);
             }
@@ -445,8 +513,10 @@
         jk_shmem.hdr->h.data.childs = 1;
         if (JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG,
-                   "Initialized shared memory size=%u free=%u addr=%#lx",
-                   jk_shmem.size, jk_shmem.hdr->h.data.size, jk_shmem.hdr);
+                   "Initialized shared memory %s size=%u free=%u addr=%#lx",
+                   jk_shm_name(), jk_shmem.size,
+                   jk_shmem.hdr->h.data.size - jk_shmem.hdr->h.data.pos,
+                   jk_shmem.hdr);
     }
     else {
         unsigned int nchild;
@@ -455,8 +525,8 @@
         nchild = jk_shmem.hdr->h.data.childs;
         if (JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG,
-                   "Attached shared memory [%d] size=%u free=%u addr=%#lx",
-                   nchild, jk_shmem.hdr->h.data.size,
+                   "Attached shared memory %s [%d] size=%u free=%u addr=%#lx",
+                   jk_shm_name(), nchild, jk_shmem.size,
                    jk_shmem.hdr->h.data.size - jk_shmem.hdr->h.data.pos,
                    jk_shmem.hdr);
         /*
@@ -584,7 +654,7 @@
     void *rc = NULL;
 
     if (jk_shmem.hdr) {
-        size = JK_ALIGN_DEFAULT(size);
+        size = JK_SHM_ALIGN(size);
         if ((jk_shmem.hdr->h.data.size - jk_shmem.hdr->h.data.pos) >= size) {
             rc = &(jk_shmem.hdr->buf[jk_shmem.hdr->h.data.pos]);
             jk_shmem.hdr->h.data.pos += size;
@@ -653,17 +723,50 @@
     return rc;
 }
 
-jk_shm_worker_t *jk_shm_alloc_worker(jk_pool_t *p)
+jk_shm_ajp_worker_t *jk_shm_alloc_ajp_worker(jk_pool_t *p)
 {
-    jk_shm_worker_t *w = (jk_shm_worker_t *)jk_shm_alloc(p, sizeof(jk_shm_worker_t));
+    jk_shm_ajp_worker_t *w = (jk_shm_ajp_worker_t *)jk_shm_alloc(p, JK_SHM_AJP_WORKER_SIZE);
     if (w) {
-        memset(w, 0, sizeof(jk_shm_worker_t));
+        memset(w, 0, JK_SHM_AJP_WORKER_SIZE);
         if (jk_shmem.hdr) {
             jk_shmem.hdr->h.data.workers++;
-            w->id = jk_shmem.hdr->h.data.workers;
+            w->h.id = jk_shmem.hdr->h.data.workers;
+            w->h.type = JK_AJP13_WORKER_TYPE;
         }
         else
-            w->id = -1;
+            w->h.id = -1;
     }
     return w;
 }
+
+jk_shm_lb_sub_worker_t *jk_shm_alloc_lb_sub_worker(jk_pool_t *p)
+{
+    jk_shm_lb_sub_worker_t *w = (jk_shm_lb_sub_worker_t *)jk_shm_alloc(p, JK_SHM_LB_SUB_WORKER_SIZE);
+    if (w) {
+        memset(w, 0, JK_SHM_LB_SUB_WORKER_SIZE);
+        if (jk_shmem.hdr) {
+            jk_shmem.hdr->h.data.workers++;
+            w->h.id = jk_shmem.hdr->h.data.workers;
+            w->h.type = JK_LB_SUB_WORKER_TYPE;
+        }
+        else
+            w->h.id = -1;
+    }
+    return w;
+}
+
+jk_shm_lb_worker_t *jk_shm_alloc_lb_worker(jk_pool_t *p)
+{
+    jk_shm_lb_worker_t *w = (jk_shm_lb_worker_t *)jk_shm_alloc(p, JK_SHM_LB_WORKER_SIZE);
+    if (w) {
+        memset(w, 0, JK_SHM_LB_WORKER_SIZE);
+        if (jk_shmem.hdr) {
+            jk_shmem.hdr->h.data.workers++;
+            w->h.id = jk_shmem.hdr->h.data.workers;
+            w->h.type = JK_LB_WORKER_TYPE;
+        }
+        else
+            w->h.id = -1;
+    }
+    return w;
+}

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_shm.h
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_shm.h	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_shm.h	2008-04-06 12:38:06 UTC (rev 6107)
@@ -19,7 +19,7 @@
  * Description: Shared Memory object header file                           *
  * Author:      Mladen Turk <mturk at jboss.com>                              *
  * Author:      Rainer Jung <rjung at apache.org>                             *
- * Version:     $Revision: 550272 $                                           *
+ * Version:     $Revision: 611673 $                                           *
  ***************************************************************************/
 #ifndef _JK_SHM_H
 #define _JK_SHM_H
@@ -41,7 +41,7 @@
  */
 
 #define JK_SHM_MAJOR    '1'
-#define JK_SHM_MINOR    '2'
+#define JK_SHM_MINOR    '3'
 #define JK_SHM_STR_SIZ  63
 #define JK_SHM_URI_SIZ  127
 #define JK_SHM_DYNAMIC  16
@@ -49,28 +49,75 @@
 #define JK_SHM_MAGIC_SIZ  8
 
 /* Really huge numbers, but 64 workers should be enough */
-#define JK_SHM_MAX_WORKERS  64
-#define JK_SHM_WORKER_SIZE  JK_SHM_ALIGN(sizeof(jk_shm_worker_t))
-#define JK_SHM_DEF_SIZE     (JK_SHM_MAX_WORKERS * JK_SHM_WORKER_SIZE)
-#define JK_SHM_ALIGNMENT    64
-#define JK_SHM_ALIGN(x)     JK_ALIGN(x, JK_SHM_ALIGNMENT)
+#define JK_SHM_MAX_WORKERS        64
+#define JK_SHM_ALIGNMENT          64
+#define JK_SHM_ALIGN(x)           JK_ALIGN((x), JK_SHM_ALIGNMENT)
+#define JK_SHM_AJP_WORKER_SIZE    JK_SHM_ALIGN(sizeof(jk_shm_ajp_worker_t))
+#define JK_SHM_LB_SUB_WORKER_SIZE JK_SHM_ALIGN(sizeof(jk_shm_lb_sub_worker_t))
+#define JK_SHM_LB_WORKER_SIZE     JK_SHM_ALIGN(sizeof(jk_shm_lb_worker_t))
+#define JK_SHM_AJP_SIZE(x)        ((x) * JK_SHM_AJP_WORKER_SIZE)
+#define JK_SHM_LB_SUB_SIZE(x)     ((x) * JK_SHM_LB_SUB_WORKER_SIZE)
+#define JK_SHM_LB_SIZE(x)         ((x) * JK_SHM_LB_WORKER_SIZE)
+#define JK_SHM_DEF_SIZE           JK_SHM_AJP_SIZE(JK_SHM_MAX_WORKERS) + JK_SHM_LB_SUB_SIZE(JK_SHM_MAX_WORKERS) + JK_SHM_LB_SIZE(JK_SHM_MAX_WORKERS)
 
-/** jk shm worker record structure */
-struct jk_shm_worker
+/** jk shm generic worker record structure */
+struct jk_shm_worker_header
 {
     int     id;
+    int     type;
+    /* worker name */
+    char    name[JK_SHM_STR_SIZ+1];
     /* Sequence counter starting at 0 and increasing
      * every time we change the config
      */
     volatile unsigned int sequence;
+};
+typedef struct jk_shm_worker_header jk_shm_worker_header_t;
+
+/** jk shm ajp13/ajp14 worker record structure */
+struct jk_shm_ajp_worker
+{
+    jk_shm_worker_header_t h;
+
+    /* Configuration data mirrored from ajp_worker */
+    int cache_timeout;
+    int connect_timeout;
+    int reply_timeout;
+    int prepost_timeout;
+    unsigned int recovery_opts;
+    int retries;
+    unsigned int max_packet_size;
+    /* current error state (runtime) of the worker */
+    volatile int state;
+    /* Statistical data */
     /* Number of currently busy channels */
     volatile int busy;
     /* Maximum number of busy channels */
     volatile int max_busy;
-    /* Number of currently connected channels */
-    volatile int connected;
-    /* worker name */
-    char    name[JK_SHM_STR_SIZ+1];
+    volatile time_t  error_time;
+    /* Number of bytes read from remote */
+    volatile jk_uint64_t readed;
+    /* Number of bytes transferred to remote */
+    volatile jk_uint64_t transferred;
+    /* Number of times the worker was used */
+    volatile jk_uint64_t  used;
+    /* Number of times the worker was used - snapshot during maintenance */
+    volatile jk_uint64_t  used_snapshot;
+    /* Number of non 200 responses */
+    volatile jk_uint32_t  errors;
+    /* Decayed number of reply_timeout errors */
+    volatile jk_uint32_t  reply_timeouts;
+    /* Number of client errors */
+    volatile jk_uint32_t  client_errors;
+    volatile time_t  last_maintain_time;
+};
+typedef struct jk_shm_ajp_worker jk_shm_ajp_worker_t;
+
+/** jk shm lb sub worker record structure */
+struct jk_shm_lb_sub_worker
+{
+    jk_shm_worker_header_t h;
+
     /* route */
     char    route[JK_SHM_STR_SIZ+1];
     /* worker domain */
@@ -89,6 +136,24 @@
     volatile jk_uint64_t lb_mult;
     /* Current lb value  */
     volatile jk_uint64_t lb_value;
+    /* Statistical data */
+    volatile time_t  error_time;
+    /* Number of times the worker was elected - snapshot during maintenance */
+    volatile jk_uint64_t  elected_snapshot;
+    /* Number of non 200 responses */
+    volatile jk_uint32_t  errors;
+};
+typedef struct jk_shm_lb_sub_worker jk_shm_lb_sub_worker_t;
+
+/** jk shm lb worker record structure */
+struct jk_shm_lb_worker
+{
+    jk_shm_worker_header_t h;
+
+    /* Number of currently busy channels */
+    volatile int busy;
+    /* Maximum number of busy channels */
+    volatile int max_busy;
     int     sticky_session;
     int     sticky_session_force;
     int     recover_wait_time;
@@ -97,33 +162,15 @@
     int     lbmethod;
     int     lblock;
     unsigned int max_packet_size;
-    /* Statistical data */
-    volatile time_t  error_time;
-    /* Service transfer rate time */
     volatile time_t  last_maintain_time;
-    /* Number of bytes read from remote */
-    volatile jk_uint64_t readed;
-    /* Number of bytes transferred to remote */
-    volatile jk_uint64_t transferred;
-    /* Number of times the worker was elected */
-    volatile jk_uint64_t  elected;
-    /* Number of times the worker was elected - snapshot during maintenance */
-    volatile jk_uint64_t  elected_snapshot;
-    /* Number of non 200 responses */
-    volatile jk_uint32_t  errors;
-    /* Number of recovery attempts */
-    volatile jk_uint32_t  recoveries;
-    /* Number of recovery failures */
-    volatile jk_uint32_t  recovery_errors;
-    /* Decayed number of reply_timeout errors */
-    volatile jk_uint32_t  reply_timeouts;
-    /* Number of client errors */
-    volatile jk_uint32_t  client_errors;
 };
-typedef struct jk_shm_worker jk_shm_worker_t;
+typedef struct jk_shm_lb_worker jk_shm_lb_worker_t;
 
 const char *jk_shm_name(void);
 
+/* Calculate needed shm size */
+size_t jk_shm_calculate_size(jk_map_t *init_data, jk_logger_t *l);
+
 /* Open the shared memory creating file if needed
  */
 int jk_shm_open(const char *fname, size_t sz, jk_logger_t *l);
@@ -142,11 +189,21 @@
  */
 void *jk_shm_alloc(jk_pool_t *p, size_t size);
 
-/* allocate shm worker record
+/* allocate shm ajp worker record
  * If there is no shm present the pool will be used instead
  */
-jk_shm_worker_t *jk_shm_alloc_worker(jk_pool_t *p);
+jk_shm_ajp_worker_t *jk_shm_alloc_ajp_worker(jk_pool_t *p);
 
+/* allocate shm lb sub worker record
+ * If there is no shm present the pool will be used instead
+ */
+jk_shm_lb_sub_worker_t *jk_shm_alloc_lb_sub_worker(jk_pool_t *p);
+
+/* allocate shm lb worker record
+ * If there is no shm present the pool will be used instead
+ */
+jk_shm_lb_worker_t *jk_shm_alloc_lb_worker(jk_pool_t *p);
+
 /* Return workers.properties last modified time
  */
 time_t jk_shm_get_workers_time(void);

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_status.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_status.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_status.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -19,7 +19,7 @@
  * Description: Status worker, display and manages JK workers              *
  * Author:      Mladen Turk <mturk at jboss.com>                              *
  * Author:      Rainer Jung <rjung at apache.org>                             *
- * Version:     $Revision: 562174 $                                        *
+ * Version:     $Revision: 614517 $                                        *
  ***************************************************************************/
 
 #include "jk_pool.h"
@@ -70,14 +70,17 @@
 #define JK_STATUS_ARG_OPTION_NO_LB         0x0008
 #define JK_STATUS_ARG_OPTION_NO_AJP        0x0010
 #define JK_STATUS_ARG_OPTION_READ_ONLY     0x0020
+#define JK_STATUS_ARG_OPTION_NO_LB_CONF    0x0040
+#define JK_STATUS_ARG_OPTION_NO_LB_SUMMARY 0x0080
+#define JK_STATUS_ARG_OPTION_NO_AJP_CONF   0x0100
 
-#define JK_STATUS_ARG_LB_RETRIES           ("lr")
-#define JK_STATUS_ARG_LB_RECOVER_TIME      ("lt")
-#define JK_STATUS_ARG_LB_MAX_REPLY_TIMEOUTS ("lx")
-#define JK_STATUS_ARG_LB_STICKY            ("ls")
-#define JK_STATUS_ARG_LB_STICKY_FORCE      ("lf")
-#define JK_STATUS_ARG_LB_METHOD            ("lm")
-#define JK_STATUS_ARG_LB_LOCK              ("ll")
+#define JK_STATUS_ARG_LB_RETRIES           ("vlr")
+#define JK_STATUS_ARG_LB_RECOVER_TIME      ("vlt")
+#define JK_STATUS_ARG_LB_MAX_REPLY_TIMEOUTS ("vlx")
+#define JK_STATUS_ARG_LB_STICKY            ("vls")
+#define JK_STATUS_ARG_LB_STICKY_FORCE      ("vlf")
+#define JK_STATUS_ARG_LB_METHOD            ("vlm")
+#define JK_STATUS_ARG_LB_LOCK              ("vll")
 
 #define JK_STATUS_ARG_LB_TEXT_RETRIES      "Retries"
 #define JK_STATUS_ARG_LB_TEXT_RECOVER_TIME "Recover Wait Time"
@@ -87,12 +90,12 @@
 #define JK_STATUS_ARG_LB_TEXT_METHOD       "LB Method"
 #define JK_STATUS_ARG_LB_TEXT_LOCK         "Locking"
 
-#define JK_STATUS_ARG_LBM_ACTIVATION       ("wa")
-#define JK_STATUS_ARG_LBM_FACTOR           ("wf")
-#define JK_STATUS_ARG_LBM_ROUTE            ("wn")
-#define JK_STATUS_ARG_LBM_REDIRECT         ("wr")
-#define JK_STATUS_ARG_LBM_DOMAIN           ("wc")
-#define JK_STATUS_ARG_LBM_DISTANCE         ("wd")
+#define JK_STATUS_ARG_LBM_ACTIVATION       ("vwa")
+#define JK_STATUS_ARG_LBM_FACTOR           ("vwf")
+#define JK_STATUS_ARG_LBM_ROUTE            ("vwn")
+#define JK_STATUS_ARG_LBM_REDIRECT         ("vwr")
+#define JK_STATUS_ARG_LBM_DOMAIN           ("vwc")
+#define JK_STATUS_ARG_LBM_DISTANCE         ("vwd")
 
 #define JK_STATUS_ARG_LBM_TEXT_ACTIVATION  "Activation"
 #define JK_STATUS_ARG_LBM_TEXT_FACTOR      "LB Factor"
@@ -101,6 +104,22 @@
 #define JK_STATUS_ARG_LBM_TEXT_DOMAIN      "Cluster Domain"
 #define JK_STATUS_ARG_LBM_TEXT_DISTANCE    "Distance"
 
+#define JK_STATUS_ARG_AJP_CACHE_TO         "vacpt"
+#define JK_STATUS_ARG_AJP_CONNECT_TO       "vact"
+#define JK_STATUS_ARG_AJP_PREPOST_TO       "vapt"
+#define JK_STATUS_ARG_AJP_REPLY_TO         "vart"
+#define JK_STATUS_ARG_AJP_RETRIES          "var"
+#define JK_STATUS_ARG_AJP_REC_OPTS         "varo"
+#define JK_STATUS_ARG_AJP_MAX_PK_SZ        "vamps"
+
+#define JK_STATUS_ARG_AJP_TEXT_CACHE_TO    "Connection Pool Timeout"
+#define JK_STATUS_ARG_AJP_TEXT_CONNECT_TO  "Connect Timeout"
+#define JK_STATUS_ARG_AJP_TEXT_PREPOST_TO  "Prepost Timeout"
+#define JK_STATUS_ARG_AJP_TEXT_REPLY_TO    "Reply Timeout"
+#define JK_STATUS_ARG_AJP_TEXT_RETRIES     "Retries"
+#define JK_STATUS_ARG_AJP_TEXT_REC_OPTS    "Recovery Options"
+#define JK_STATUS_ARG_AJP_TEXT_MAX_PK_SZ   "Max Packet Size"
+
 #define JK_STATUS_CMD_UNKNOWN              (0)
 #define JK_STATUS_CMD_LIST                 (1)
 #define JK_STATUS_CMD_SHOW                 (2)
@@ -109,8 +128,9 @@
 #define JK_STATUS_CMD_RESET                (5)
 #define JK_STATUS_CMD_VERSION              (6)
 #define JK_STATUS_CMD_RECOVER              (7)
+#define JK_STATUS_CMD_DUMP                 (8)
 #define JK_STATUS_CMD_DEF                  (JK_STATUS_CMD_LIST)
-#define JK_STATUS_CMD_MAX                  (JK_STATUS_CMD_RECOVER)
+#define JK_STATUS_CMD_MAX                  (JK_STATUS_CMD_DUMP)
 #define JK_STATUS_CMD_TEXT_UNKNOWN         ("unknown")
 #define JK_STATUS_CMD_TEXT_LIST            ("list")
 #define JK_STATUS_CMD_TEXT_SHOW            ("show")
@@ -119,8 +139,21 @@
 #define JK_STATUS_CMD_TEXT_RESET           ("reset")
 #define JK_STATUS_CMD_TEXT_VERSION         ("version")
 #define JK_STATUS_CMD_TEXT_RECOVER         ("recover")
+#define JK_STATUS_CMD_TEXT_DUMP            ("dump")
 #define JK_STATUS_CMD_TEXT_DEF             (JK_STATUS_CMD_TEXT_LIST)
 
+#define JK_STATUS_CMD_PROP_CHECK_WORKER    0x00000001
+#define JK_STATUS_CMD_PROP_READONLY        0x00000002
+#define JK_STATUS_CMD_PROP_HEAD            0x00000004
+#define JK_STATUS_CMD_PROP_REFRESH         0x00000008
+#define JK_STATUS_CMD_PROP_BACK_LINK       0x00000010
+#define JK_STATUS_CMD_PROP_BACK_LIST       0x00000020
+#define JK_STATUS_CMD_PROP_FMT             0x00000040
+#define JK_STATUS_CMD_PROP_SWITCH_RO       0x00000080
+#define JK_STATUS_CMD_PROP_DUMP_LINK       0x00000100
+#define JK_STATUS_CMD_PROP_LINK_HELP       0x00000200
+#define JK_STATUS_CMD_PROP_LEGEND          0x00000400
+
 #define JK_STATUS_MIME_UNKNOWN             (0)
 #define JK_STATUS_MIME_HTML                (1)
 #define JK_STATUS_MIME_XML                 (2)
@@ -148,11 +181,17 @@
 
 #define JK_STATUS_WAIT_AFTER_UPDATE        "3"
 #define JK_STATUS_REFRESH_DEF              "10"
-#define JK_STATUS_ESC_CHARS                ("<>?&")
+#define JK_STATUS_ESC_CHARS                ("<>?\"")
+#define JK_STATUS_TIME_FMT_HTML            "%a, %d %b %Y %X %Z"
+#define JK_STATUS_TIME_FMT_TEXT            "%Y%m%d%H%M%S"
+#define JK_STATUS_TIME_FMT_TZ              "%Z"
+#define JK_STATUS_TIME_BUF_SZ              (80)
 
-#define JK_STATUS_HEAD                     "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
-                                           "DTD HTML 3.2 Final//EN\">\n"      \
-                                           "<html><head><title>JK Status Manager</title>"
+#define JK_STATUS_HEAD                     "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" \
+                                           "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"" \
+                                           " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" \
+                                           "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">" \
+                                           "<head><title>JK Status Manager</title>"
 
 #define JK_STATUS_COPYRIGHT                "Copyright &#169; 1999-2007, The Apache Software Foundation<br />" \
                                            "Licensed under the <a href=\"http://www.apache.org/licenses/LICENSE-2.0\">" \
@@ -170,17 +209,49 @@
 #define JK_STATUS_FORM_START               "<form method=\"%s\" action=\"%s\">\n"
 #define JK_STATUS_FORM_HIDDEN_INT          "<input type=\"hidden\" name=\"%s\" value=\"%d\"/>\n"
 #define JK_STATUS_FORM_HIDDEN_STRING       "<input type=\"hidden\" name=\"%s\" value=\"%s\"/>\n"
-#define JK_STATUS_TABLE_HEAD_3_STRING      "<tr><th>%s</th><th>%s</th><th>%s</th></tr>\n"
-#define JK_STATUS_TABLE_ROW_3_STRING       "<tr><td>%s</td><td>%s</td><td>%s</td></tr>\n"
-#define JK_STATUS_SHOW_AJP_HEAD            "<tr>" \
+#define JK_STATUS_URI_MAP_TABLE_HEAD       "<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n"
+#define JK_STATUS_URI_MAP_TABLE_ROW        "<tr><td>%s</td><td>%s</td><td>%s</td><td>%d</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n"
+#define JK_STATUS_URI_MAP_TABLE_HEAD2      "<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n"
+#define JK_STATUS_URI_MAP_TABLE_ROW2       "<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%d</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n"
+#define JK_STATUS_SHOW_AJP_CONF_HEAD       "<tr>" \
                                            "<th>Type</th>" \
-                                           "<th>Host</th>" \
-                                           "<th>Addr</th>" \
+                                           "<th>Host</th><th>Addr</th>" \
+                                           "<th>" JK_STATUS_ARG_AJP_TEXT_CACHE_TO "</th>" \
+                                           "<th>" JK_STATUS_ARG_AJP_TEXT_CONNECT_TO "</th>" \
+                                           "<th>" JK_STATUS_ARG_AJP_TEXT_PREPOST_TO "</th>" \
+                                           "<th>" JK_STATUS_ARG_AJP_TEXT_REPLY_TO "</th>" \
+                                           "<th>" JK_STATUS_ARG_AJP_TEXT_RETRIES "</th>" \
+                                           "<th>" JK_STATUS_ARG_AJP_TEXT_REC_OPTS "</th>" \
+                                           "<th>" JK_STATUS_ARG_AJP_TEXT_MAX_PK_SZ "</th>" \
+                                           "<th>\n"
+#define JK_STATUS_SHOW_AJP_CONF_ROW        "<tr>" \
+                                           "<td>%s</td>" \
+                                           "<td>%s:%d</td>" \
+                                           "<td>%d</td>" \
+                                           "<td>%d</td>" \
+                                           "<td>%d</td>" \
+                                           "<td>%d</td>" \
+                                           "<td>%d</td>" \
+                                           "<td>%u</td>" \
+                                           "<td>%u</td>" \
+                                           "<td></td>" \
                                            "</tr>\n"
+#define JK_STATUS_SHOW_AJP_HEAD            "<tr>" \
+                                           "<th>State</th>" \
+                                           "<th>Acc</th>" \
+                                           "<th>Err</th><th>CE</th><th>RE</th>" \
+                                           "<th>Wr</th><th>Rd</th><th>Busy</th><th>Max</th>" \
+                                           "</tr>\n"
 #define JK_STATUS_SHOW_AJP_ROW             "<tr>" \
                                            "<td>%s</td>" \
-                                           "<td>%s:%d</td>" \
+                                           "<td>%" JK_UINT64_T_FMT "</td>" \
+                                           "<td>%" JK_UINT32_T_FMT "</td>" \
+                                           "<td>%" JK_UINT32_T_FMT "</td>" \
+                                           "<td>%" JK_UINT32_T_FMT "</td>" \
                                            "<td>%s</td>" \
+                                           "<td>%s</td>" \
+                                           "<td>%d</td>" \
+                                           "<td>%d</td>" \
                                            "</tr>\n"
 #define JK_STATUS_SHOW_LB_HEAD             "<tr>" \
                                            "<th>Type</th>" \
@@ -191,7 +262,7 @@
                                            "<th>" JK_STATUS_ARG_LB_TEXT_LOCK "</th>" \
                                            "<th>" JK_STATUS_ARG_LB_TEXT_RECOVER_TIME "</th>" \
                                            "<th>" JK_STATUS_ARG_LB_TEXT_MAX_REPLY_TIMEOUTS "</th>" \
-                                           "</tr>\n"
+                                           "<th>\n"
 #define JK_STATUS_SHOW_LB_ROW              "<tr>" \
                                            "<td>%s</td>" \
                                            "<td>%s</td>" \
@@ -201,10 +272,10 @@
                                            "<td>%s</td>" \
                                            "<td>%d</td>" \
                                            "<td>%d</td>" \
+                                           "<td></td>" \
                                            "</tr>\n"
 #define JK_STATUS_SHOW_MEMBER_HEAD         "<tr>" \
-                                           "<th>&nbsp;</th><th>Name</th><th>Type</th>" \
-                                           "<th>Host</th><th>Addr</th>" \
+                                           "<th>&nbsp;</th><th>Name</th>" \
                                            "<th>Act</th><th>State</th>" \
                                            "<th>D</th><th>F</th><th>M</th>" \
                                            "<th>V</th><th>Acc</th>" \
@@ -215,10 +286,7 @@
                                            "</tr>\n"
 #define JK_STATUS_SHOW_MEMBER_ROW          "<td>%s</td>" \
                                            "<td>%s</td>" \
-                                           "<td>%s:%d</td>" \
                                            "<td>%s</td>" \
-                                           "<td>%s</td>" \
-                                           "<td>%s</td>" \
                                            "<td>%d</td>" \
                                            "<td>%d</td>" \
                                            "<td>%" JK_UINT64_T_FMT "</td>" \
@@ -236,6 +304,31 @@
                                            "<td>%s</td>" \
                                            "<td>%d/%d</td>" \
                                            "</tr>\n"
+#define JK_STATUS_SHOW_MEMBER_CONF_HEAD    "<tr>" \
+                                           "<th>Name</th><th>Type</th>" \
+                                           "<th>Host</th><th>Addr</th>" \
+                                           "<th>" JK_STATUS_ARG_AJP_TEXT_CACHE_TO "</th>" \
+                                           "<th>" JK_STATUS_ARG_AJP_TEXT_CONNECT_TO "</th>" \
+                                           "<th>" JK_STATUS_ARG_AJP_TEXT_PREPOST_TO "</th>" \
+                                           "<th>" JK_STATUS_ARG_AJP_TEXT_REPLY_TO "</th>" \
+                                           "<th>" JK_STATUS_ARG_AJP_TEXT_RETRIES "</th>" \
+                                           "<th>" JK_STATUS_ARG_AJP_TEXT_REC_OPTS "</th>" \
+                                           "<th>" JK_STATUS_ARG_AJP_TEXT_MAX_PK_SZ "</th>" \
+                                           "<th>\n"
+#define JK_STATUS_SHOW_MEMBER_CONF_ROW     "<tr>" \
+                                           "<td>%s</td>" \
+                                           "<td>%s</td>" \
+                                           "<td>%s:%d</td>" \
+                                           "<td>%s</td>" \
+                                           "<td>%d</td>" \
+                                           "<td>%d</td>" \
+                                           "<td>%d</td>" \
+                                           "<td>%d</td>" \
+                                           "<td>%d</td>" \
+                                           "<td>%u</td>" \
+                                           "<td>%u</td>" \
+                                           "<td></td>" \
+                                           "</tr>\n"
 
 typedef struct status_worker status_worker_t;
 
@@ -243,6 +336,7 @@
 {
     status_worker_t *worker;
 
+    char            *query_string;
     jk_map_t        *req_params;
     char            *msg;
 
@@ -299,6 +393,7 @@
     JK_STATUS_CMD_TEXT_RESET,
     JK_STATUS_CMD_TEXT_VERSION,
     JK_STATUS_CMD_TEXT_RECOVER,
+    JK_STATUS_CMD_TEXT_DUMP,
     NULL
 };
 
@@ -427,6 +522,20 @@
     jk_printf(s, "%*s%s=\"%d\"\n", indentation, "", key, value);
 }
 
+static void jk_print_xml_att_uint(jk_ws_service_t *s,
+                                  int indentation,
+                                  const char *key, unsigned int value)
+{
+    jk_printf(s, "%*s%s=\"%u\"\n", indentation, "", key, value);
+}
+
+static void jk_print_xml_att_long(jk_ws_service_t *s,
+                                  int indentation,
+                                  const char *key, long value)
+{
+    jk_printf(s, "%*s%s=\"%ld\"\n", indentation, "", key, value);
+}
+
 static void jk_print_xml_att_uint32(jk_ws_service_t *s,
                                     int indentation,
                                     const char *key, jk_uint32_t value)
@@ -465,6 +574,30 @@
     }
 }
 
+static void jk_print_prop_att_uint(jk_ws_service_t *s, status_worker_t *w,
+                                   const char *name,
+                                   const char *key, unsigned int value)
+{
+    if (name) {
+        jk_printf(s, "%s.%s.%s=%u\n", w->prefix, name, key, value);
+    }
+    else {
+        jk_printf(s, "%s.%s=%u\n", w->prefix, key, value);
+    }
+}
+
+static void jk_print_prop_att_long(jk_ws_service_t *s, status_worker_t *w,
+                                   const char *name,
+                                   const char *key, long value)
+{
+    if (name) {
+        jk_printf(s, "%s.%s.%s=%ld\n", w->prefix, name, key, value);
+    }
+    else {
+        jk_printf(s, "%s.%s=%ld\n", w->prefix, key, value);
+    }
+}
+
 static void jk_print_prop_att_uint32(jk_ws_service_t *s, status_worker_t *w,
                                      const char *name,
                                      const char *key, jk_uint32_t value)
@@ -489,6 +622,18 @@
     }
 }
 
+static void jk_print_prop_item_int(jk_ws_service_t *s, status_worker_t *w,
+                                   const char *name, const char *list, int num,
+                                   const char *key, int value)
+{
+    if (name) {
+        jk_printf(s, "%s.%s.%s.%d.%s=%d\n", w->prefix, name, list, num, key, value);
+    }
+    else {
+        jk_printf(s, "%s.%s.%d.%s=%d\n", w->prefix, list, num, key, value);
+    }
+}
+
 static void jk_print_prop_item_string(jk_ws_service_t *s, status_worker_t *w,
                                       const char *name, const char *list, int num,
                                       const char *key, const char *value)
@@ -536,11 +681,11 @@
     } while (1);
 }
 
-static int status_rate(worker_record_t *wr, status_worker_t *w,
+static int status_rate(lb_sub_worker_t *wr, status_worker_t *w,
                        jk_logger_t *l)
 {
     jk_uint32_t mask = 0;
-    int activation = wr->s->activation;
+    int activation = wr->activation;
     int state = wr->s->state;
     jk_uint32_t good = w->good_mask;
     jk_uint32_t bad = w->bad_mask;
@@ -756,6 +901,8 @@
         return JK_STATUS_CMD_VERSION;
     else if (!strcmp(cmd, JK_STATUS_CMD_TEXT_RECOVER))
         return JK_STATUS_CMD_RECOVER;
+    else if (!strcmp(cmd, JK_STATUS_CMD_TEXT_DUMP))
+        return JK_STATUS_CMD_DUMP;
     return JK_STATUS_CMD_UNKNOWN;
 }
 
@@ -779,10 +926,53 @@
     return JK_STATUS_MIME_UNKNOWN;
 }
 
+static jk_uint32_t status_cmd_props(int cmd)
+{
+  jk_uint32_t props = 0;
+
+  if (cmd == JK_STATUS_CMD_LIST ||
+      cmd == JK_STATUS_CMD_SHOW)
+      props |= JK_STATUS_CMD_PROP_REFRESH |
+               JK_STATUS_CMD_PROP_SWITCH_RO |
+               JK_STATUS_CMD_PROP_LINK_HELP |
+               JK_STATUS_CMD_PROP_LEGEND;
+  if (cmd == JK_STATUS_CMD_LIST ||
+      cmd == JK_STATUS_CMD_SHOW ||
+      cmd == JK_STATUS_CMD_VERSION)
+      props |= JK_STATUS_CMD_PROP_DUMP_LINK;
+  if (cmd == JK_STATUS_CMD_LIST ||
+      cmd == JK_STATUS_CMD_SHOW ||
+      cmd == JK_STATUS_CMD_VERSION ||
+      cmd == JK_STATUS_CMD_DUMP)
+      props |= JK_STATUS_CMD_PROP_HEAD |
+               JK_STATUS_CMD_PROP_FMT;
+  if (cmd == JK_STATUS_CMD_SHOW ||
+      cmd == JK_STATUS_CMD_VERSION ||
+      cmd == JK_STATUS_CMD_DUMP)
+      props |= JK_STATUS_CMD_PROP_BACK_LIST;
+  if (cmd == JK_STATUS_CMD_SHOW ||
+      cmd == JK_STATUS_CMD_EDIT ||
+      cmd == JK_STATUS_CMD_VERSION ||
+      cmd == JK_STATUS_CMD_DUMP)
+      props |= JK_STATUS_CMD_PROP_BACK_LINK;
+  if (cmd != JK_STATUS_CMD_EDIT &&
+      cmd != JK_STATUS_CMD_UPDATE &&
+      cmd != JK_STATUS_CMD_RESET &&
+      cmd != JK_STATUS_CMD_RECOVER)
+      props |= JK_STATUS_CMD_PROP_READONLY;
+  if (cmd != JK_STATUS_CMD_LIST &&
+      cmd != JK_STATUS_CMD_VERSION &&
+      cmd != JK_STATUS_CMD_DUMP)
+      props |= JK_STATUS_CMD_PROP_CHECK_WORKER;
+      
+    return props;
+}
+
 static void status_start_form(jk_ws_service_t *s,
                               status_endpoint_t *p,
                               const char *method,
                               int cmd,
+                              const char *overwrite,
                               jk_logger_t *l)
 {
 
@@ -803,7 +993,10 @@
     for (i = 0; i < sz; i++) {
         const char *k = jk_map_name_at(m, i);
         const char *v = jk_map_value_at(m, i);
-        if (strcmp(k, JK_STATUS_ARG_CMD) || cmd == JK_STATUS_CMD_UNKNOWN) {
+        if ((strcmp(k, JK_STATUS_ARG_CMD) ||
+            cmd == JK_STATUS_CMD_UNKNOWN) &&
+            (!overwrite ||
+            strcmp(k, overwrite))) {
             jk_printf(s, JK_STATUS_FORM_HIDDEN_STRING, k, v);
         }
     }
@@ -862,7 +1055,7 @@
                   JK_STATUS_ARG_WORKER, worker);
         started=1;
     }
-    if (sub_worker && sub_worker[0]) {
+    if (sub_worker && sub_worker[0] && cmd != JK_STATUS_CMD_LIST) {
         jk_printf(s, "%s%s=%s", started ? "&amp;" : "?",
                   JK_STATUS_ARG_SUB_WORKER, sub_worker);
         started=1;
@@ -889,7 +1082,7 @@
         if (!strcmp(k, JK_STATUS_ARG_WORKER) && worker) {
             continue;
         }
-        if (!strcmp(k, JK_STATUS_ARG_SUB_WORKER) && sub_worker) {
+        if (!strcmp(k, JK_STATUS_ARG_SUB_WORKER) && (sub_worker || cmd == JK_STATUS_CMD_LIST)) {
             continue;
         }
         if (!strcmp(k, JK_STATUS_ARG_ATTRIBUTE) && attribute) {
@@ -901,7 +1094,7 @@
         if (!strncmp(k, JK_STATUS_ARG_MULT_VALUE_BASE, 3) && cmd != JK_STATUS_CMD_UPDATE) {
             continue;
         }
-        if (strlen(k) == 2 && (k[0] == 'l' || k[0] == 'w') && cmd != JK_STATUS_CMD_UPDATE) {
+        if (k[0] == 'v' && cmd != JK_STATUS_CMD_UPDATE) {
             continue;
         }
         if (!strcmp(k, JK_STATUS_ARG_OPTIONS)) {
@@ -924,7 +1117,7 @@
 {
     jk_map_t *m;
     status_worker_t *w = p->worker;
-#ifdef _REENTRANT
+#ifdef _MT_CODE_PTHREAD
     char *lasts;
 #endif
     char *param;
@@ -932,13 +1125,6 @@
 
     JK_TRACE_ENTER(l);
 
-    if (!jk_map_alloc(&(p->req_params))) {
-        jk_log(l, JK_LOG_ERROR,
-               "Status worker '%s' could not alloc map for request parameters",
-               w->name);
-        JK_TRACE_EXIT(l);
-        return JK_FALSE;
-    }
     if (!s->query_string) {
         if (JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG,
@@ -947,16 +1133,40 @@
         JK_TRACE_EXIT(l);
         return JK_TRUE;
     }
+
+    p->query_string = jk_pool_strdup(s->pool, s->query_string);
+    if (!p->query_string) {
+        jk_log(l, JK_LOG_ERROR,
+               "Status worker '%s' could not copy query string",
+               w->name);
+        JK_TRACE_EXIT(l);
+        return JK_FALSE;
+    }
+
+    /* XXX We simply mask special chars n the query string with '@' to prevent cross site scripting */
+    query = p->query_string;
+    while ((query = strpbrk(query, JK_STATUS_ESC_CHARS)))
+        query[0] = '@';
+
+    if (!jk_map_alloc(&(p->req_params))) {
+        jk_log(l, JK_LOG_ERROR,
+               "Status worker '%s' could not alloc map for request parameters",
+               w->name);
+        JK_TRACE_EXIT(l);
+        return JK_FALSE;
+    }
     m = p->req_params;
-    query = jk_pool_strdup(s->pool, s->query_string);
+
+    query = jk_pool_strdup(s->pool, p->query_string);
     if (!query) {
         jk_log(l, JK_LOG_ERROR,
-               "Status worker '%s' could not copy string",
+               "Status worker '%s' could not copy query string",
                w->name);
         JK_TRACE_EXIT(l);
         return JK_FALSE;
     }
-#ifdef _REENTRANT
+
+#ifdef _MT_CODE_PTHREAD
     for (param = strtok_r(query, "&", &lasts);
          param; param = strtok_r(NULL, "&", &lasts)) {
 #else
@@ -973,14 +1183,9 @@
         }
         value = strchr(key, '=');
         if (value) {
-            char *off;
             *value = '\0';
             value++;
     /* XXX Depending on the params values, we might need to trim and decode */
-    /* XXX For now we simply mask special chars with '@' to prevent cross code injection */
-            off = value;
-            while ((off = strpbrk(off, JK_STATUS_ESC_CHARS)))
-                off[0] = '@';
             if (strlen(key)) {
                 if (JK_IS_DEBUG_LEVEL(l))
                     jk_log(l, JK_LOG_DEBUG,
@@ -1096,12 +1301,12 @@
                              status_endpoint_t *p,
                              jk_worker_t *jw,
                              const char *worker,
-                             worker_record_t **wrp,
+                             lb_sub_worker_t **wrp,
                              const char *sub_worker,
                              jk_logger_t *l)
 {
     lb_worker_t *lb = NULL;
-    worker_record_t *wr = NULL;
+    lb_sub_worker_t *wr = NULL;
     status_worker_t *w = p->worker;
     unsigned int i;
 
@@ -1125,7 +1330,7 @@
     }
     for (i = 0; i < (int)lb->num_of_workers; i++) {
         wr = &(lb->lb_workers[i]);
-        if (strcmp(sub_worker, wr->s->name) == 0)
+        if (strcmp(sub_worker, wr->name) == 0)
             break;
     }
     *wrp = wr;
@@ -1142,123 +1347,211 @@
     return JK_TRUE;
 }
 
-static int count_maps(jk_ws_service_t *s,
+static int count_map(jk_uri_worker_map_t *uw_map,
                       const char *worker,
                       jk_logger_t *l)
 {
     unsigned int i;
     int count=0;
-    jk_uri_worker_map_t *uw_map = s->uw_map;
 
     JK_TRACE_ENTER(l);
-    for (i = 0; i < uw_map->size; i++) {
-        uri_worker_record_t *uwr = uw_map->maps[i];
-        if (strcmp(uwr->worker_name, worker)) {
-            continue;
+    if (uw_map) {
+        for (i = 0; i < uw_map->size[uw_map->index]; i++) {
+            uri_worker_record_t *uwr = uw_map->maps[uw_map->index][i];
+            if (strcmp(uwr->worker_name, worker) &&
+                strcmp(uwr->worker_name, "*")) {
+                continue;
+            }
+            count++;
         }
-        count++;
     }
     JK_TRACE_EXIT(l);
     return count;
 }
 
-static void display_maps(jk_ws_service_t *s,
-                         status_endpoint_t *p,
-                         const char *worker,
-                         jk_logger_t *l)
+static int count_maps(jk_ws_service_t *s,
+                      const char *worker,
+                      jk_logger_t *l)
 {
+    int count=0;
+
+    JK_TRACE_ENTER(l);
+    if (s->next_vhost) {
+        void *srv;
+        for (srv = s->next_vhost(NULL); srv; srv = s->next_vhost(srv)) {
+            count += count_map(s->vhost_to_uw_map(srv), worker, l);
+        }
+    }
+    else if (s->uw_map)
+        count = count_map(s->uw_map, worker, l);
+    JK_TRACE_EXIT(l);
+    return count;
+}
+
+static void display_map(jk_ws_service_t *s,
+                        status_endpoint_t *p,
+                        jk_uri_worker_map_t *uw_map,
+                        const char *worker,
+                        const char *server_name,
+                        int *count_ptr,
+                        int mime,
+                        jk_logger_t *l)
+{
     char buf[64];
     unsigned int i;
-    int mime;
-    unsigned int hide;
-    int count=0;
-    const char *arg;
+    int count;
     status_worker_t *w = p->worker;
-    jk_uri_worker_map_t *uw_map = s->uw_map;
 
     JK_TRACE_ENTER(l);
-    status_get_string(p, JK_STATUS_ARG_MIME, NULL, &arg, l);
-    mime = status_mime_int(arg);
-    hide = status_get_int(p, JK_STATUS_ARG_OPTIONS, 0, l) &
-                          JK_STATUS_ARG_OPTION_NO_MAPS;
-    count = count_maps(s, worker, l);
 
-    if (count) {
-
-        if (hide) {
-            if (mime == JK_STATUS_MIME_HTML) {
-                jk_puts(s, "<p>\n");
-                status_write_uri(s, p, "Show URI Mappings", JK_STATUS_CMD_UNKNOWN, JK_STATUS_MIME_UNKNOWN,
-                                 NULL, NULL, 0, JK_STATUS_ARG_OPTION_NO_MAPS, NULL, l);
-                jk_puts(s, "</p>\n");
-            }
-        }
-        else {
-            if (mime == JK_STATUS_MIME_HTML) {
-                jk_printf(s, "<hr/><h3>URI Mappings for %s (%d maps) [", worker, count);
-                status_write_uri(s, p, "Hide", JK_STATUS_CMD_UNKNOWN, JK_STATUS_MIME_UNKNOWN,
-                                 NULL, NULL, JK_STATUS_ARG_OPTION_NO_MAPS, 0, NULL, l);
-                jk_puts(s, "]</h3><table>\n");
-                jk_printf(s, JK_STATUS_TABLE_HEAD_3_STRING,
-                          "Match Type", "Uri", "Source");
-            }
-        }
+    if (uw_map->fname) {
+        uri_worker_map_update(uw_map, 1, l);
     }
+    for (i = 0; i < uw_map->size[uw_map->index]; i++) {
+        uri_worker_record_t *uwr = uw_map->maps[uw_map->index][i];
 
-    if (hide) {
-        return;
-        JK_TRACE_EXIT(l);
-    }
-
-    count = 0;
-    for (i = 0; i < uw_map->size; i++) {
-        uri_worker_record_t *uwr = uw_map->maps[i];
-        if (strcmp(uwr->worker_name, worker)) {
+        if (strcmp(uwr->worker_name, worker) &&
+            strcmp(uwr->worker_name, "*")) {
             continue;
         }
-        count++;
+        (*count_ptr)++;
+        count = *count_ptr;
 
         if (mime == JK_STATUS_MIME_HTML) {
-            jk_printf(s, JK_STATUS_TABLE_ROW_3_STRING,
-                      uri_worker_map_get_match(uwr, buf, l), uwr->uri,
-                      uri_worker_map_get_source(uwr, l));
+            if (server_name)
+                jk_printf(s, JK_STATUS_URI_MAP_TABLE_ROW2,
+                          server_name,
+                          uwr->uri,
+                          uri_worker_map_get_match(uwr, buf, l),
+                          uri_worker_map_get_source(uwr, l),
+                          uwr->extensions.reply_timeout,
+                          uwr->extensions.fail_on_status_str ? uwr->extensions.fail_on_status_str : "-",
+                          uwr->extensions.active ? uwr->extensions.active : "-",
+                          uwr->extensions.disabled ? uwr->extensions.disabled : "-",
+                          uwr->extensions.stopped ? uwr->extensions.stopped : "-");
+            else
+                jk_printf(s, JK_STATUS_URI_MAP_TABLE_ROW,
+                          uwr->uri,
+                          uri_worker_map_get_match(uwr, buf, l),
+                          uri_worker_map_get_source(uwr, l),
+                          uwr->extensions.reply_timeout,
+                          uwr->extensions.fail_on_status_str ? uwr->extensions.fail_on_status_str : "-",
+                          uwr->extensions.active ? uwr->extensions.active : "-",
+                          uwr->extensions.disabled ? uwr->extensions.disabled : "-",
+                          uwr->extensions.stopped ? uwr->extensions.stopped : "-");
         }
         else if (mime == JK_STATUS_MIME_XML) {
             jk_print_xml_start_elt(s, w, 6, 0, "map");
             jk_print_xml_att_int(s, 8, "id", count);
+            if (server_name)
+                jk_print_xml_att_string(s, 8, "server", server_name);
+            jk_print_xml_att_string(s, 8, "uri", uwr->uri);
             jk_print_xml_att_string(s, 8, "type", uri_worker_map_get_match(uwr, buf, l));
-            jk_print_xml_att_string(s, 8, "uri", uwr->uri);
             jk_print_xml_att_string(s, 8, "source", uri_worker_map_get_source(uwr, l));
+            jk_print_xml_att_int(s, 8, "reply_timeout", uwr->extensions.reply_timeout);
+            jk_print_xml_att_string(s, 8, "fail_on_status", uwr->extensions.fail_on_status_str);
+            jk_print_xml_att_string(s, 8, "active", uwr->extensions.active);
+            jk_print_xml_att_string(s, 8, "disabled", uwr->extensions.disabled);
+            jk_print_xml_att_string(s, 8, "stopped", uwr->extensions.stopped);
             jk_print_xml_stop_elt(s, 6, 1);
         }
         else if (mime == JK_STATUS_MIME_TXT) {
             jk_puts(s, "Map:");
             jk_printf(s, " id=%d", count);
+            if (server_name)
+                jk_printf(s, " server=\"%s\"", server_name);
+            jk_printf(s, " uri=\"%s\"", uwr->uri);
             jk_printf(s, " type=\"%s\"", uri_worker_map_get_match(uwr, buf, l));
-            jk_printf(s, " uri=\"%s\"", uwr->uri);
             jk_printf(s, " source=\"%s\"", uri_worker_map_get_source(uwr, l));
+            jk_printf(s, " reply_timeout=\"%d\"", uwr->extensions.reply_timeout);
+            jk_printf(s, " fail_on_status=\"%s\"", uwr->extensions.fail_on_status_str ? uwr->extensions.fail_on_status_str : "");
+            jk_printf(s, " active=\"%s\"", uwr->extensions.active);
+            jk_printf(s, " disabled=\"%s\"", uwr->extensions.disabled);
+            jk_printf(s, " stopped=\"%s\"", uwr->extensions.stopped);
             jk_puts(s, "\n");
         }
         else if (mime == JK_STATUS_MIME_PROP) {
-            char *mount = jk_pool_alloc(s->pool, sizeof(char *) * (strlen(uwr->uri)+3));
-            char *off = mount;
-            if (uwr->match_type & MATCH_TYPE_DISABLED) {
-                *off = '-';
-                off++;
-            }
-            if (uwr->match_type & MATCH_TYPE_NO_MATCH) {
-                *off = '!';
-                off++;
-            }
-            strcpy(off, uwr->uri);
-            jk_print_prop_att_string(s, w, worker, "mount", mount);
+            if (server_name)
+               jk_print_prop_item_string(s, w, worker, "map", count, "server", server_name);
+            jk_print_prop_item_string(s, w, worker, "map", count, "uri", uwr->uri);
             jk_print_prop_item_string(s, w, worker, "map", count, "type", uri_worker_map_get_match(uwr, buf, l));
-            jk_print_prop_item_string(s, w, worker, "map", count, "uri", uwr->uri);
             jk_print_prop_item_string(s, w, worker, "map", count, "source", uri_worker_map_get_source(uwr, l));
+            jk_print_prop_item_int(s, w, worker, "map", count, "reply_timeout", uwr->extensions.reply_timeout);
+            jk_print_prop_item_string(s, w, worker, "map", count, "fail_on_status", uwr->extensions.fail_on_status_str);
+            jk_print_prop_item_string(s, w, worker, "map", count, "active", uwr->extensions.active);
+            jk_print_prop_item_string(s, w, worker, "map", count, "disabled", uwr->extensions.disabled);
+            jk_print_prop_item_string(s, w, worker, "map", count, "stopped", uwr->extensions.stopped);
         }
     }
+    JK_TRACE_EXIT(l);
+}
+
+static void display_maps(jk_ws_service_t *s,
+                         status_endpoint_t *p,
+                         const char *worker,
+                         jk_logger_t *l)
+{
+    int mime;
+    unsigned int hide;
+    int has_server_iterator = 0;
+    int count=0;
+    const char *arg;
+    status_worker_t *w = p->worker;
+    jk_uri_worker_map_t *uw_map;
+    char server_name[80];
+    void *srv;
+
+    JK_TRACE_ENTER(l);
+    status_get_string(p, JK_STATUS_ARG_MIME, NULL, &arg, l);
+    mime = status_mime_int(arg);
+    hide = status_get_int(p, JK_STATUS_ARG_OPTIONS, 0, l) &
+                          JK_STATUS_ARG_OPTION_NO_MAPS;
+    if (s->next_vhost)
+        has_server_iterator = 1;
+
+    count = count_maps(s, worker, l);
+
+    if (hide) {
+        if (count && mime == JK_STATUS_MIME_HTML) {
+            jk_puts(s, "<p>\n");
+            status_write_uri(s, p, "Show URI Mappings", JK_STATUS_CMD_UNKNOWN, JK_STATUS_MIME_UNKNOWN,
+                             NULL, NULL, 0, JK_STATUS_ARG_OPTION_NO_MAPS, NULL, l);
+            jk_puts(s, "</p>\n");
+        }
+        JK_TRACE_EXIT(l);
+        return;
+    }
+
     if (count) {
         if (mime == JK_STATUS_MIME_HTML) {
+            jk_printf(s, "<hr/><h3>URI Mappings for %s (%d maps) [", worker, count);
+            status_write_uri(s, p, "Hide", JK_STATUS_CMD_UNKNOWN, JK_STATUS_MIME_UNKNOWN,
+                             NULL, NULL, JK_STATUS_ARG_OPTION_NO_MAPS, 0, NULL, l);
+            jk_puts(s, "]</h3><table>\n");
+            if (has_server_iterator)
+                jk_printf(s, JK_STATUS_URI_MAP_TABLE_HEAD2,
+                          "Server", "URI", "Match Type", "Source", "Reply Timeout", "Fail on Status", "Active", "Disabled", "Stopped");
+            else
+                jk_printf(s, JK_STATUS_URI_MAP_TABLE_HEAD,
+                          "URI", "Match Type", "Source", "Reply Timeout", "Fail on Status", "Active", "Disabled", "Stopped");
+        }
+        count = 0;
+        if (has_server_iterator) {
+            for (srv = s->next_vhost(NULL); srv; srv = s->next_vhost(srv)) {
+                uw_map = s->vhost_to_uw_map(srv);
+                if (uw_map) {
+                    s->vhost_to_text(srv, server_name, 80);
+                    display_map(s, p, uw_map, worker, server_name, &count, mime, l);
+                }
+            }
+        }
+        else {
+            uw_map = s->uw_map;
+            if (uw_map) {
+                display_map(s, p, uw_map, worker, NULL, &count, mime, l);
+            }
+        }
+        if (mime == JK_STATUS_MIME_HTML) {
             jk_puts(s, "</table>\n");
         }
     }
@@ -1275,19 +1568,311 @@
     JK_TRACE_EXIT(l);
 }
 
+static void display_worker_ajp_conf_details(jk_ws_service_t *s,
+                                            status_endpoint_t *p,
+                                            ajp_worker_t *aw,
+                                            int is_member,
+                                            int type,
+                                            jk_logger_t *l)
+{
+    char buf[32];
+
+    JK_TRACE_ENTER(l);
+
+    if (is_member)
+        jk_printf(s, JK_STATUS_SHOW_MEMBER_CONF_ROW,
+                  aw->name,
+                  status_worker_type(type),
+                  aw->host, aw->port,
+                  jk_dump_hinfo(&aw->worker_inet_addr, buf),
+                  aw->cache_timeout,
+                  aw->connect_timeout,
+                  aw->prepost_timeout,
+                  aw->reply_timeout,
+                  aw->retries,
+                  aw->recovery_opts,
+                  aw->max_packet_size);
+    else
+        jk_printf(s, JK_STATUS_SHOW_AJP_CONF_ROW,
+                  status_worker_type(type),
+                  aw->host, aw->port,
+                  jk_dump_hinfo(&aw->worker_inet_addr, buf),
+                  aw->cache_timeout,
+                  aw->connect_timeout,
+                  aw->prepost_timeout,
+                  aw->reply_timeout,
+                  aw->retries,
+                  aw->recovery_opts,
+                  aw->max_packet_size);
+    JK_TRACE_EXIT(l);
+
+}
+
+static void display_worker_ajp_details(jk_ws_service_t *s,
+                                       status_endpoint_t *p,
+                                       ajp_worker_t *aw,
+                                       lb_sub_worker_t *wr,
+                                       lb_worker_t *lb,
+                                       int ms_min,
+                                       int ms_max,
+                                       int map_count,
+                                       jk_logger_t *l)
+{
+    char buf[32];
+    char buf_rd[32];
+    char buf_wr[32];
+    int mime;
+    const char *arg;
+    time_t now = time(NULL);
+    const char *name = NULL;
+    const char *sub_name = NULL;
+    const char *ajp_name = NULL;
+    status_worker_t *w = p->worker;
+    int rs_min = 0;
+    int rs_max = 0;
+
+    JK_TRACE_ENTER(l);
+
+    status_get_string(p, JK_STATUS_ARG_MIME, NULL, &arg, l);
+    mime = status_mime_int(arg);
+
+    if (lb) {
+        name = lb->name;
+        sub_name = wr->name;
+        ajp_name = wr->name;
+        if (wr->s->state == JK_LB_STATE_ERROR) {
+            rs_min = lb->recover_wait_time - (int)difftime(now, wr->s->error_time);
+            if (rs_min < 0) {
+                rs_min = 0;
+            }
+            rs_max = rs_min + lb->maintain_time;
+            if (rs_min < ms_min) {
+                rs_min = ms_min;
+            }
+        }
+    }
+    else {
+        name = aw->name;
+        sub_name = NULL;
+        ajp_name = aw->name;
+    }
+
+    if (mime == JK_STATUS_MIME_HTML) {
+
+        if (lb)
+            jk_printf(s, JK_STATUS_SHOW_MEMBER_ROW,
+                      sub_name,
+                      jk_lb_get_activation(wr, l),
+                      jk_lb_get_state(wr, l),
+                      wr->distance,
+                      wr->lb_factor,
+                      wr->lb_mult,
+                      wr->s->lb_value,
+                      aw->s->used,
+                      wr->s->errors,
+                      aw->s->client_errors,
+                      aw->s->reply_timeouts,
+                      status_strfsize(aw->s->transferred, buf_wr),
+                      status_strfsize(aw->s->readed, buf_rd),
+                      aw->s->busy,
+                      aw->s->max_busy,
+                      wr->route,
+                      wr->redirect ? (*wr->redirect ? wr->redirect : "&nbsp;") : "&nbsp",
+                      wr->domain ? (*wr->domain ? wr->domain : "&nbsp;") : "&nbsp",
+                      rs_min,
+                      rs_max);
+        else
+            jk_printf(s, JK_STATUS_SHOW_AJP_ROW,
+                      jk_ajp_get_state(aw, l),
+                      aw->s->used,
+                      aw->s->errors,
+                      aw->s->client_errors,
+                      aw->s->reply_timeouts,
+                      status_strfsize(aw->s->transferred, buf_wr),
+                      status_strfsize(aw->s->readed, buf_rd),
+                      aw->s->busy,
+                      aw->s->max_busy);
+
+    }
+    else if (mime == JK_STATUS_MIME_XML) {
+
+        int off = 2;
+        if (lb)
+            off = 6;
+        if (lb) {
+            jk_print_xml_start_elt(s, w, off, 0, "member");
+            jk_print_xml_att_string(s, off+2, "name", sub_name);
+            jk_print_xml_att_string(s, off+2, "type", status_worker_type(wr->worker->type));
+        }
+        else {
+            jk_print_xml_start_elt(s, w, off, 0, "ajp");
+            jk_print_xml_att_string(s, off+2, "name", ajp_name);
+            jk_print_xml_att_string(s, off+2, "type", status_worker_type(aw->worker.type));
+        }
+        jk_print_xml_att_string(s, off+2, "host", aw->host);
+        jk_print_xml_att_int(s, off+2, "port", aw->port);
+        jk_print_xml_att_string(s, off+2, "address", jk_dump_hinfo(&aw->worker_inet_addr, buf));
+        jk_print_xml_att_int(s, off+2, "connection_pool_timeout", aw->cache_timeout);
+        jk_print_xml_att_int(s, off+2, "connect_timeout", aw->connect_timeout);
+        jk_print_xml_att_int(s, off+2, "prepost_timeout", aw->prepost_timeout);
+        jk_print_xml_att_int(s, off+2, "reply_timeout", aw->reply_timeout);
+        jk_print_xml_att_int(s, off+2, "retries", aw->retries);
+        jk_print_xml_att_uint(s, off+2, "recovery_options", aw->recovery_opts);
+        jk_print_xml_att_uint(s, off+2, "max_packet_size", aw->max_packet_size);
+        if (lb) {
+            jk_print_xml_att_string(s, off+2, "activation", jk_lb_get_activation(wr, l));
+            jk_print_xml_att_int(s, off+2, "lbfactor", wr->lb_factor);
+            jk_print_xml_att_string(s, off+2, "route", wr->route);
+            jk_print_xml_att_string(s, off+2, "redirect", wr->redirect);
+            jk_print_xml_att_string(s, off+2, "domain", wr->domain);
+            jk_print_xml_att_int(s, off+2, "distance", wr->distance);
+            jk_print_xml_att_string(s, off+2, "state", jk_lb_get_state(wr, l));
+            jk_print_xml_att_uint64(s, off+2, "lbmult", wr->lb_mult);
+            jk_print_xml_att_uint64(s, off+2, "lbvalue", wr->s->lb_value);
+            jk_print_xml_att_uint64(s, off+2, "elected", aw->s->used);
+            jk_print_xml_att_uint32(s, off+2, "errors", wr->s->errors);
+        }
+        else {
+            jk_print_xml_att_uint64(s, off+2, "used", aw->s->used);
+            jk_print_xml_att_uint32(s, off+2, "errors", aw->s->errors);
+        }
+        jk_print_xml_att_uint32(s, off+2, "client_errors", aw->s->client_errors);
+        jk_print_xml_att_uint32(s, off+2, "reply_timeouts", aw->s->reply_timeouts);
+        jk_print_xml_att_uint64(s, off+2, "transferred", aw->s->transferred);
+        jk_print_xml_att_uint64(s, off+2, "read", aw->s->readed);
+        jk_print_xml_att_int(s, off+2, "busy", aw->s->busy);
+        jk_print_xml_att_int(s, off+2, "max_busy", aw->s->max_busy);
+        if (lb) {
+            jk_print_xml_att_int(s, off+2, "time_to_recover_min", rs_min);
+            jk_print_xml_att_int(s, off+2, "time_to_recover_max", rs_max);
+        }
+        else
+            jk_print_xml_att_int(s, off+2, "map_count", map_count);
+        /* Terminate the tag */
+        jk_print_xml_stop_elt(s, off, 1);
+
+    }
+    else if (mime == JK_STATUS_MIME_TXT) {
+
+        if (lb) {
+            jk_puts(s, "Member:");
+            jk_printf(s, " name=%s", sub_name);
+            jk_printf(s, " type=%s", status_worker_type(wr->worker->type));
+        }
+        else {
+            jk_puts(s, "AJP Worker:");
+            jk_printf(s, " name=%s", ajp_name);
+            jk_printf(s, " type=%s", status_worker_type(aw->worker.type));
+        }
+        jk_printf(s, " host=%s", aw->host);
+        jk_printf(s, " port=%d", aw->port);
+        jk_printf(s, " address=%s", jk_dump_hinfo(&aw->worker_inet_addr, buf));
+        jk_printf(s, " connection_pool_timeout=%d", aw->cache_timeout);
+        jk_printf(s, " connect_timeout=%d", aw->connect_timeout);
+        jk_printf(s, " prepost_timeout=%d", aw->prepost_timeout);
+        jk_printf(s, " reply_timeout=%d", aw->reply_timeout);
+        jk_printf(s, " retries=%d", aw->retries);
+        jk_printf(s, " recovery_options=%u", aw->recovery_opts);
+        jk_printf(s, " max_packet_size=%u", aw->max_packet_size);
+        if (lb) {
+            jk_printf(s, " activation=%s", jk_lb_get_activation(wr, l));
+            jk_printf(s, " lbfactor=%d", wr->lb_factor);
+            jk_printf(s, " route=\"%s\"", wr->route ? wr->route : "");
+            jk_printf(s, " redirect=\"%s\"", wr->redirect ? wr->redirect : "");
+            jk_printf(s, " domain=\"%s\"", wr->domain ? wr->domain : "");
+            jk_printf(s, " distance=%d", wr->distance);
+            jk_printf(s, " state=%s", jk_lb_get_state(wr, l));
+            jk_printf(s, " lbmult=%" JK_UINT64_T_FMT, wr->lb_mult);
+            jk_printf(s, " lbvalue=%" JK_UINT64_T_FMT, wr->s->lb_value);
+            jk_printf(s, " elected=%" JK_UINT64_T_FMT, aw->s->used);
+            jk_printf(s, " errors=%" JK_UINT32_T_FMT, wr->s->errors);
+        }
+        else {
+            jk_printf(s, " used=%" JK_UINT64_T_FMT, aw->s->used);
+            jk_printf(s, " errors=%" JK_UINT32_T_FMT, aw->s->errors);
+        }
+        jk_printf(s, " client_errors=%" JK_UINT32_T_FMT, aw->s->client_errors);
+        jk_printf(s, " reply_timeouts=%" JK_UINT32_T_FMT, aw->s->reply_timeouts);
+        jk_printf(s, " transferred=%" JK_UINT64_T_FMT, aw->s->transferred);
+        jk_printf(s, " read=%" JK_UINT64_T_FMT, aw->s->readed);
+        jk_printf(s, " busy=%d", aw->s->busy);
+        jk_printf(s, " max_busy=%d", aw->s->max_busy);
+        if (lb) {
+            jk_printf(s, " time_to_recover_min=%d", rs_min);
+            jk_printf(s, " time_to_recover_max=%d", rs_max);
+        }
+        else 
+            jk_printf(s, " map_count=%d", map_count);
+        jk_puts(s, "\n");
+
+    }
+    else if (mime == JK_STATUS_MIME_PROP) {
+
+        if (lb) {
+            jk_print_prop_att_string(s, w, name, "balance_workers", sub_name);
+            jk_print_prop_att_string(s, w, ajp_name, "type", status_worker_type(wr->worker->type));
+        }
+        else {
+            jk_print_prop_att_string(s, w, name, "list", ajp_name);
+            jk_print_prop_att_string(s, w, ajp_name, "type", status_worker_type(aw->worker.type));
+        }
+        jk_print_prop_att_string(s, w, ajp_name, "host", aw->host);
+        jk_print_prop_att_int(s, w, ajp_name, "port", aw->port);
+        jk_print_prop_att_string(s, w, ajp_name, "address", jk_dump_hinfo(&aw->worker_inet_addr, buf));
+        jk_print_prop_att_int(s, w, ajp_name, "connection_pool_timeout", aw->cache_timeout);
+        jk_print_prop_att_int(s, w, ajp_name, "connect_timeout", aw->connect_timeout);
+        jk_print_prop_att_int(s, w, ajp_name, "prepost_timeout", aw->prepost_timeout);
+        jk_print_prop_att_int(s, w, ajp_name, "reply_timeout", aw->reply_timeout);
+        jk_print_prop_att_int(s, w, ajp_name, "retries", aw->retries);
+        jk_print_prop_att_uint(s, w, ajp_name, "recovery_options", aw->recovery_opts);
+        jk_print_prop_att_uint(s, w, ajp_name, "max_packet_size", aw->max_packet_size);
+        if (lb) {
+            jk_print_prop_att_string(s, w, ajp_name, "activation", jk_lb_get_activation(wr, l));
+            jk_print_prop_att_int(s, w, ajp_name, "lbfactor", wr->lb_factor);
+            jk_print_prop_att_string(s, w, ajp_name, "route", wr->route);
+            jk_print_prop_att_string(s, w, ajp_name, "redirect", wr->redirect);
+            jk_print_prop_att_string(s, w, ajp_name, "domain", wr->domain);
+            jk_print_prop_att_int(s, w, ajp_name, "distance", wr->distance);
+            jk_print_prop_att_string(s, w, ajp_name, "state", jk_lb_get_state(wr, l));
+            jk_print_prop_att_uint64(s, w, ajp_name, "lbmult", wr->lb_mult);
+            jk_print_prop_att_uint64(s, w, ajp_name, "lbvalue", wr->s->lb_value);
+            jk_print_prop_att_uint64(s, w, ajp_name, "elected", aw->s->used);
+            jk_print_prop_att_uint32(s, w, ajp_name, "errors", wr->s->errors);
+        }
+        else
+            jk_print_prop_att_uint64(s, w, ajp_name, "used", aw->s->used);
+            jk_print_prop_att_uint32(s, w, ajp_name, "errors", aw->s->errors);
+        jk_print_prop_att_uint32(s, w, ajp_name, "client_errors", aw->s->client_errors);
+        jk_print_prop_att_uint32(s, w, ajp_name, "reply_timeouts", aw->s->reply_timeouts);
+        jk_print_prop_att_uint64(s, w, ajp_name, "transferred", aw->s->transferred);
+        jk_print_prop_att_uint64(s, w, ajp_name, "read", aw->s->readed);
+        jk_print_prop_att_int(s, w, ajp_name, "busy", aw->s->busy);
+        jk_print_prop_att_int(s, w, ajp_name, "max_busy", aw->s->max_busy);
+        if (lb) {
+            jk_print_prop_att_int(s, w, ajp_name, "time_to_recover_min", rs_min);
+            jk_print_prop_att_int(s, w, ajp_name, "time_to_recover_max", rs_max);
+        }
+        else
+            jk_print_prop_att_int(s, w, name, "map_count", map_count);
+
+    }
+    JK_TRACE_EXIT(l);
+
+}
+
 static void display_worker_lb(jk_ws_service_t *s,
                               status_endpoint_t *p,
                               lb_worker_t *lb,
                               jk_logger_t *l)
 {
-    char buf[32];
-    char buf_rd[32];
-    char buf_wr[32];
     int cmd;
     int mime;
     int read_only = 0;
     int single = 0;
     unsigned int hide_members;
+    unsigned int hide_lb_conf;
+    unsigned int hide_lb_summary;
+    unsigned int hide_ajp_conf;
     const char *arg;
     time_t now = time(NULL);
     unsigned int good = 0;
@@ -1297,7 +1882,8 @@
     int ms_min;
     int ms_max;
     unsigned int j;
-    const char *name = lb->s->name;
+    int pstart = JK_FALSE;
+    const char *name = lb->name;
     status_worker_t *w = p->worker;
 
     JK_TRACE_ENTER(l);
@@ -1306,7 +1892,13 @@
     status_get_string(p, JK_STATUS_ARG_MIME, NULL, &arg, l);
     mime = status_mime_int(arg);
     hide_members = status_get_int(p, JK_STATUS_ARG_OPTIONS, 0, l) &
-                                JK_STATUS_ARG_OPTION_NO_MEMBERS;
+                                  JK_STATUS_ARG_OPTION_NO_MEMBERS;
+    hide_lb_conf = status_get_int(p, JK_STATUS_ARG_OPTIONS, 0, l) &
+                                  JK_STATUS_ARG_OPTION_NO_LB_CONF;
+    hide_lb_summary = status_get_int(p, JK_STATUS_ARG_OPTIONS, 0, l) &
+                                     JK_STATUS_ARG_OPTION_NO_LB_SUMMARY;
+    hide_ajp_conf = status_get_int(p, JK_STATUS_ARG_OPTIONS, 0, l) &
+                                   JK_STATUS_ARG_OPTION_NO_AJP_CONF;
     if (w->read_only) {
         read_only = 1;
     }
@@ -1319,12 +1911,12 @@
     }
 
     jk_shm_lock();
-    if (lb->sequence != lb->s->sequence)
+    if (lb->sequence != lb->s->h.sequence)
         jk_lb_pull(lb, l);
     jk_shm_unlock();
 
     for (j = 0; j < lb->num_of_workers; j++) {
-        worker_record_t *wr = &(lb->lb_workers[j]);
+        lb_sub_worker_t *wr = &(lb->lb_workers[j]);
         int rate;
         rate = status_rate(wr, w, l);
         if (rate > 0 )
@@ -1366,29 +1958,98 @@
         }
         jk_puts(s, "]&nbsp;&nbsp;");
         jk_putv(s, "Worker Status for ", name, "</h3>\n", NULL);
-        jk_puts(s, "<table>" JK_STATUS_SHOW_LB_HEAD);
-        jk_printf(s, JK_STATUS_SHOW_LB_ROW,
-                  status_worker_type(JK_LB_WORKER_TYPE),
-                  jk_get_bool(lb->sticky_session),
-                  jk_get_bool(lb->sticky_session_force),
-                  lb->retries,
-                  jk_lb_get_method(lb, l),
-                  jk_lb_get_lock(lb, l),
-                  lb->recover_wait_time,
-                  lb->max_reply_timeouts);
-        jk_puts(s, "</table>\n<br/>\n");
+        if (hide_lb_conf) {
+            pstart = JK_TRUE;
+            jk_puts(s, "<p>\n");
+            if (single) {
+                status_write_uri(s, p, "Show LB Configuration", JK_STATUS_CMD_SHOW, JK_STATUS_MIME_UNKNOWN,
+                                 NULL, NULL, 0, JK_STATUS_ARG_OPTION_NO_LB_CONF, "", l);
+            }
+            else {
+                status_write_uri(s, p, "Show LB Configuration", JK_STATUS_CMD_LIST, JK_STATUS_MIME_UNKNOWN,
+                                 NULL, NULL, 0, JK_STATUS_ARG_OPTION_NO_LB_CONF, "", l);
+            }
+        }
+        if (hide_lb_summary) {
+            if (pstart == JK_FALSE)
+                jk_puts(s, "<p>\n");
+            else
+                jk_puts(s, "&nbsp;&nbsp;|&nbsp;&nbsp;");
+            pstart = JK_TRUE;
+            if (single) {
+                status_write_uri(s, p, "Show LB Summary", JK_STATUS_CMD_SHOW, JK_STATUS_MIME_UNKNOWN,
+                                 NULL, NULL, 0, JK_STATUS_ARG_OPTION_NO_LB_SUMMARY, "", l);
+            }
+            else {
+                status_write_uri(s, p, "Show LB Summary", JK_STATUS_CMD_LIST, JK_STATUS_MIME_UNKNOWN,
+                                 NULL, NULL, 0, JK_STATUS_ARG_OPTION_NO_LB_SUMMARY, "", l);
+            }
+        }
+        if (!hide_members && hide_ajp_conf) {
+            if (pstart == JK_FALSE)
+                jk_puts(s, "<p>\n");
+            else
+                jk_puts(s, "&nbsp;&nbsp;|&nbsp;&nbsp;");
+            pstart = JK_TRUE;
+            if (single) {
+                status_write_uri(s, p, "Show AJP Configuration", JK_STATUS_CMD_SHOW, JK_STATUS_MIME_UNKNOWN,
+                                 NULL, NULL, 0, JK_STATUS_ARG_OPTION_NO_AJP_CONF, "", l);
+            }
+            else {
+                status_write_uri(s, p, "Show AJP Configuration", JK_STATUS_CMD_LIST, JK_STATUS_MIME_UNKNOWN,
+                                 NULL, NULL, 0, JK_STATUS_ARG_OPTION_NO_AJP_CONF, "", l);
+            }
+        }
+        if (hide_members) {
+            if (pstart == JK_FALSE)
+                jk_puts(s, "<p>\n");
+            else
+                jk_puts(s, "&nbsp;&nbsp;|&nbsp;&nbsp;");
+            pstart = JK_TRUE;
+            if (single) {
+                status_write_uri(s, p, "Show Balancer Members", JK_STATUS_CMD_SHOW, JK_STATUS_MIME_UNKNOWN,
+                                 NULL, NULL, 0, JK_STATUS_ARG_OPTION_NO_MEMBERS, "", l);
+            }
+            else {
+                status_write_uri(s, p, "Show Balancer Members", JK_STATUS_CMD_LIST, JK_STATUS_MIME_UNKNOWN,
+                                 NULL, NULL, 0, JK_STATUS_ARG_OPTION_NO_MEMBERS, "", l);
+            }
+        }
+        if (pstart == JK_TRUE)
+            jk_puts(s, "</p>\n");
 
-        jk_puts(s, "<table><tr>"
-                "<th>Good</th><th>Degraded</th><th>Bad/Stopped</th><th>Busy</th><th>Max Busy</th><th>Next Maintenance</th>"
-                "</tr>\n<tr>");
-        jk_printf(s, "<td>%d</td>", good);
-        jk_printf(s, "<td>%d</td>", degraded);
-        jk_printf(s, "<td>%d</td>", bad);
-        jk_printf(s, "<td>%d</td>", lb->s->busy);
-        jk_printf(s, "<td>%d</td>", lb->s->max_busy);
-        jk_printf(s, "<td>%d/%d</td>", ms_min, ms_max);
-        jk_puts(s, "</tr>\n</table>\n\n");
+        if (!hide_lb_conf) {
+            jk_puts(s, "<table>" JK_STATUS_SHOW_LB_HEAD);
+            jk_puts(s, "[");
+            status_write_uri(s, p, "Hide", JK_STATUS_CMD_UNKNOWN, JK_STATUS_MIME_UNKNOWN,
+                             NULL, NULL, JK_STATUS_ARG_OPTION_NO_LB_CONF, 0, NULL, l);
+            jk_puts(s, "]</th></tr>");
+            jk_printf(s, JK_STATUS_SHOW_LB_ROW,
+                      status_worker_type(JK_LB_WORKER_TYPE),
+                      jk_get_bool(lb->sticky_session),
+                      jk_get_bool(lb->sticky_session_force),
+                      lb->retries,
+                      jk_lb_get_method(lb, l),
+                      jk_lb_get_lock(lb, l),
+                      lb->recover_wait_time,
+                      lb->max_reply_timeouts);
+            jk_puts(s, "</table>\n<br/>\n");
+        }
 
+        if (!hide_lb_summary) {
+            jk_puts(s, "<table><tr>"
+                    "<th>Good</th><th>Degraded</th><th>Bad/Stopped</th><th>Busy</th><th>Max Busy</th><th>Next Maintenance</th><th>[");
+            status_write_uri(s, p, "Hide", JK_STATUS_CMD_UNKNOWN, JK_STATUS_MIME_UNKNOWN,
+                             NULL, NULL, JK_STATUS_ARG_OPTION_NO_LB_SUMMARY, 0, NULL, l);
+            jk_puts(s, "]</th></tr>\n<tr>");
+            jk_printf(s, "<td>%d</td>", good);
+            jk_printf(s, "<td>%d</td>", degraded);
+            jk_printf(s, "<td>%d</td>", bad);
+            jk_printf(s, "<td>%d</td>", lb->s->busy);
+            jk_printf(s, "<td>%d</td>", lb->s->max_busy);
+            jk_printf(s, "<td>%d/%d</td>", ms_min, ms_max);
+            jk_puts(s, "<td></td></tr>\n</table>\n\n");
+        }
     }
     else if (mime == JK_STATUS_MIME_XML) {
 
@@ -1475,207 +2136,83 @@
                                  NULL, NULL, JK_STATUS_ARG_OPTION_NO_MEMBERS, 0, "", l);
             }
             jk_puts(s, "]</h4>\n");
+            if (!hide_ajp_conf) {
+                jk_puts(s, "<table>" JK_STATUS_SHOW_MEMBER_CONF_HEAD);
+                jk_puts(s, "[");
+                status_write_uri(s, p, "Hide", JK_STATUS_CMD_UNKNOWN, JK_STATUS_MIME_UNKNOWN,
+                                 NULL, NULL, JK_STATUS_ARG_OPTION_NO_AJP_CONF, 0, NULL, l);
+                jk_puts(s, "]</td></tr>");
+                for (j = 0; j < lb->num_of_workers; j++) {
+                    lb_sub_worker_t *wr = &(lb->lb_workers[j]);
+                    jk_worker_t *jw = (jk_worker_t *)wr->worker;
+                    ajp_worker_t *aw = (ajp_worker_t *)jw->worker_private;
+                    display_worker_ajp_conf_details(s, p, aw, 1, jw->type, l);
+                }
+                jk_puts(s, "</table>\n<br/>\n");
+            }
             jk_puts(s, "<table>" JK_STATUS_SHOW_MEMBER_HEAD);
 
         }
 
         for (j = 0; j < lb->num_of_workers; j++) {
-            worker_record_t *wr = &(lb->lb_workers[j]);
-            ajp_worker_t *a = (ajp_worker_t *)wr->w->worker_private;
-            int rs_min = 0;
-            int rs_max = 0;
-            if (wr->s->state == JK_LB_STATE_ERROR) {
-                rs_min = lb->recover_wait_time - (int)difftime(now, wr->s->error_time);
-                if (rs_min < 0) {
-                    rs_min = 0;
-                }
-                rs_max = rs_min + lb->maintain_time;
-                if (rs_min < ms_min) {
-                    rs_min = ms_min;
-                }
-            }
+            lb_sub_worker_t *wr = &(lb->lb_workers[j]);
+            const char *sub_name = wr->name;
+            ajp_worker_t *aw = (ajp_worker_t *)wr->worker->worker_private;
 
             if (mime == JK_STATUS_MIME_HTML) {
-
                 jk_puts(s, "<tr>\n<td>");
                 if (!read_only) {
                     jk_puts(s, "[");
                     status_write_uri(s, p, "E", JK_STATUS_CMD_EDIT, JK_STATUS_MIME_UNKNOWN,
-                                     name, wr->s->name, 0, 0, "", l);
+                                     name, sub_name, 0, 0, "", l);
                     jk_puts(s, "|");
                     status_write_uri(s, p, "R", JK_STATUS_CMD_RESET, JK_STATUS_MIME_UNKNOWN,
-                                     name, wr->s->name, 0, 0, "", l);
+                                     name, sub_name, 0, 0, "", l);
                     if (wr->s->state == JK_LB_STATE_ERROR) {
                         jk_puts(s, "|");
                         status_write_uri(s, p, "T", JK_STATUS_CMD_RECOVER, JK_STATUS_MIME_UNKNOWN,
-                                         name, wr->s->name, 0, 0, "", l);
+                                         name, sub_name, 0, 0, "", l);
                     }
                     jk_puts(s, "]");
                 }
                 jk_puts(s, "&nbsp;</td>");
-                jk_printf(s, JK_STATUS_SHOW_MEMBER_ROW,
-                          wr->s->name,
-                          status_worker_type(wr->w->type),
-                          a->host, a->port,
-                          jk_dump_hinfo(&a->worker_inet_addr, buf),
-                          jk_lb_get_activation(wr, l),
-                          jk_lb_get_state(wr, l),
-                          wr->s->distance,
-                          wr->s->lb_factor,
-                          wr->s->lb_mult,
-                          wr->s->lb_value,
-                          wr->s->elected,
-                          wr->s->errors,
-                          wr->s->client_errors,
-                          wr->s->reply_timeouts,
-                          status_strfsize(wr->s->transferred, buf_wr),
-                          status_strfsize(wr->s->readed, buf_rd),
-                          wr->s->busy,
-                          wr->s->max_busy,
-                          wr->s->route,
-                          wr->s->redirect ? (*wr->s->redirect ? wr->s->redirect : "&nbsp;") : "&nbsp",
-                          wr->s->domain ? (*wr->s->domain ? wr->s->domain : "&nbsp;") : "&nbsp",
-                          rs_min,
-                          rs_max);
-
             }
-            else if (mime == JK_STATUS_MIME_XML) {
-
-                jk_print_xml_start_elt(s, w, 6, 0, "member");
-                jk_print_xml_att_string(s, 8, "name", wr->s->name);
-                jk_print_xml_att_string(s, 8, "type", status_worker_type(wr->w->type));
-                jk_print_xml_att_string(s, 8, "host", a->host);
-                jk_print_xml_att_int(s, 8, "port", a->port);
-                jk_print_xml_att_string(s, 8, "address", jk_dump_hinfo(&a->worker_inet_addr, buf));
-                jk_print_xml_att_string(s, 8, "activation", jk_lb_get_activation(wr, l));
-                jk_print_xml_att_int(s, 8, "lbfactor", wr->s->lb_factor);
-                jk_print_xml_att_string(s, 8, "route", wr->s->route);
-                jk_print_xml_att_string(s, 8, "redirect", wr->s->redirect);
-                jk_print_xml_att_string(s, 8, "domain", wr->s->domain);
-                jk_print_xml_att_int(s, 8, "distance", wr->s->distance);
-                jk_print_xml_att_string(s, 8, "state", jk_lb_get_state(wr, l));
-                jk_print_xml_att_uint64(s, 8, "lbmult", wr->s->lb_mult);
-                jk_print_xml_att_uint64(s, 8, "lbvalue", wr->s->lb_value);
-                jk_print_xml_att_uint64(s, 8, "elected", wr->s->elected);
-                jk_print_xml_att_uint32(s, 8, "errors", wr->s->errors);
-                jk_print_xml_att_uint32(s, 8, "client_errors", wr->s->client_errors);
-                jk_print_xml_att_uint32(s, 8, "reply_timeouts", wr->s->reply_timeouts);
-                jk_print_xml_att_uint64(s, 8, "transferred", wr->s->transferred);
-                jk_print_xml_att_uint64(s, 8, "read", wr->s->readed);
-                jk_print_xml_att_int(s, 8, "busy", wr->s->busy);
-                jk_print_xml_att_int(s, 8, "max_busy", wr->s->max_busy);
-                jk_print_xml_att_int(s, 8, "time_to_recover_min", rs_min);
-                jk_print_xml_att_int(s, 8, "time_to_recover_max", rs_max);
-                /* Terminate the tag */
-                jk_print_xml_stop_elt(s, 6, 1);
-
-            }
-            else if (mime == JK_STATUS_MIME_TXT) {
-
-                jk_puts(s, "Member:");
-                jk_printf(s, " name=%s", wr->s->name);
-                jk_printf(s, " type=%s", status_worker_type(wr->w->type));
-                jk_printf(s, " host=%s", a->host);
-                jk_printf(s, " port=%d", a->port);
-                jk_printf(s, " address=%s", jk_dump_hinfo(&a->worker_inet_addr, buf));
-                jk_printf(s, " activation=%s", jk_lb_get_activation(wr, l));
-                jk_printf(s, " lbfactor=%d", wr->s->lb_factor);
-                jk_printf(s, " route=\"%s\"", wr->s->route ? wr->s->route : "");
-                jk_printf(s, " redirect=\"%s\"", wr->s->redirect ? wr->s->redirect : "");
-                jk_printf(s, " domain=\"%s\"", wr->s->domain ? wr->s->domain : "");
-                jk_printf(s, " distance=%d", wr->s->distance);
-                jk_printf(s, " state=%s", jk_lb_get_state(wr, l));
-                jk_printf(s, " lbmult=%" JK_UINT64_T_FMT, wr->s->lb_mult);
-                jk_printf(s, " lbvalue=%" JK_UINT64_T_FMT, wr->s->lb_value);
-                jk_printf(s, " elected=%" JK_UINT64_T_FMT, wr->s->elected);
-                jk_printf(s, " errors=%" JK_UINT32_T_FMT, wr->s->errors);
-                jk_printf(s, " client_errors=%" JK_UINT32_T_FMT, wr->s->client_errors);
-                jk_printf(s, " reply_timeouts=%" JK_UINT32_T_FMT, wr->s->reply_timeouts);
-                jk_printf(s, " transferred=%" JK_UINT64_T_FMT, wr->s->transferred);
-                jk_printf(s, " read=%" JK_UINT64_T_FMT, wr->s->readed);
-                jk_printf(s, " busy=%d", wr->s->busy);
-                jk_printf(s, " max_busy=%d", wr->s->max_busy);
-                jk_printf(s, " time_to_recover_min=%d", rs_min);
-                jk_printf(s, " time_to_recover_max=%d", rs_max);
-                jk_puts(s, "\n");
-
-            }
-            else if (mime == JK_STATUS_MIME_PROP) {
-
-                jk_print_prop_att_string(s, w, name, "balance_workers", wr->s->name);
-                jk_print_prop_att_string(s, w, wr->s->name, "type", status_worker_type(wr->w->type));
-                jk_print_prop_att_string(s, w, wr->s->name, "host", a->host);
-                jk_print_prop_att_int(s, w, wr->s->name, "port", a->port);
-                jk_print_prop_att_string(s, w, wr->s->name, "address", jk_dump_hinfo(&a->worker_inet_addr, buf));
-                jk_print_prop_att_string(s, w, wr->s->name, "activation", jk_lb_get_activation(wr, l));
-                jk_print_prop_att_int(s, w, wr->s->name, "lbfactor", wr->s->lb_factor);
-                jk_print_prop_att_string(s, w, wr->s->name, "route", wr->s->route);
-                jk_print_prop_att_string(s, w, wr->s->name, "redirect", wr->s->redirect);
-                jk_print_prop_att_string(s, w, wr->s->name, "domain", wr->s->domain);
-                jk_print_prop_att_int(s, w, wr->s->name, "distance", wr->s->distance);
-                jk_print_prop_att_string(s, w, wr->s->name, "state", jk_lb_get_state(wr, l));
-                jk_print_prop_att_uint64(s, w, wr->s->name, "lbmult", wr->s->lb_mult);
-                jk_print_prop_att_uint64(s, w, wr->s->name, "lbvalue", wr->s->lb_value);
-                jk_print_prop_att_uint64(s, w, wr->s->name, "elected", wr->s->elected);
-                jk_print_prop_att_uint32(s, w, wr->s->name, "errors", wr->s->errors);
-                jk_print_prop_att_uint32(s, w, wr->s->name, "client_errors", wr->s->client_errors);
-                jk_print_prop_att_uint32(s, w, wr->s->name, "reply_timeouts", wr->s->reply_timeouts);
-                jk_print_prop_att_uint64(s, w, wr->s->name, "transferred", wr->s->transferred);
-                jk_print_prop_att_uint64(s, w, wr->s->name, "read", wr->s->readed);
-                jk_print_prop_att_int(s, w, wr->s->name, "busy", wr->s->busy);
-                jk_print_prop_att_int(s, w, wr->s->name, "max_busy", wr->s->max_busy);
-                jk_print_prop_att_int(s, w, wr->s->name, "time_to_recover_min", rs_min);
-                jk_print_prop_att_int(s, w, wr->s->name, "time_to_recover_max", rs_max);
-
-            }
+            display_worker_ajp_details(s, p, aw, wr, lb, ms_min, ms_max, 0, l);
         }
 
         if (mime == JK_STATUS_MIME_HTML) {
 
             jk_puts(s, "</table><br/>\n");
             if (!read_only) {
-                jk_puts(s, "<b>E</b>dit one attribute for all members: [");
-                status_write_uri(s, p, JK_STATUS_ARG_LBM_TEXT_ACTIVATION, JK_STATUS_CMD_EDIT, JK_STATUS_MIME_UNKNOWN,
-                                 name, "", 0, 0, JK_STATUS_ARG_LBM_ACTIVATION, l);
-                jk_puts(s, "\n|");
-                status_write_uri(s, p, JK_STATUS_ARG_LBM_TEXT_FACTOR, JK_STATUS_CMD_EDIT, JK_STATUS_MIME_UNKNOWN,
-                                 name, "", 0, 0, JK_STATUS_ARG_LBM_FACTOR, l);
-                jk_puts(s, "\n|");
-                status_write_uri(s, p, JK_STATUS_ARG_LBM_TEXT_ROUTE, JK_STATUS_CMD_EDIT, JK_STATUS_MIME_UNKNOWN,
-                                 name, "", 0, 0, JK_STATUS_ARG_LBM_ROUTE, l);
-                jk_puts(s, "\n|");
-                status_write_uri(s, p, JK_STATUS_ARG_LBM_TEXT_REDIRECT, JK_STATUS_CMD_EDIT, JK_STATUS_MIME_UNKNOWN,
-                                 name, "", 0, 0, JK_STATUS_ARG_LBM_REDIRECT, l);
-                jk_puts(s, "\n|");
-                status_write_uri(s, p, JK_STATUS_ARG_LBM_TEXT_DOMAIN, JK_STATUS_CMD_EDIT, JK_STATUS_MIME_UNKNOWN,
-                                 name, "", 0, 0, JK_STATUS_ARG_LBM_DOMAIN, l);
-                jk_puts(s, "\n|");
-                status_write_uri(s, p, JK_STATUS_ARG_LBM_TEXT_DISTANCE, JK_STATUS_CMD_EDIT, JK_STATUS_MIME_UNKNOWN,
-                                 name, "", 0, 0, JK_STATUS_ARG_LBM_DISTANCE, l);
-                jk_puts(s, "\n]<br/>\n");
+                const char *arg;
+                status_get_string(p, JK_STATUS_ARG_CMD, NULL, &arg, l);
+                status_start_form(s, p, "get", JK_STATUS_CMD_EDIT, NULL, l);
+                jk_printf(s, JK_STATUS_FORM_HIDDEN_STRING, JK_STATUS_ARG_WORKER, name);
+                if (arg)
+                    jk_printf(s, JK_STATUS_FORM_HIDDEN_STRING, JK_STATUS_ARG_FROM, arg);
+                jk_puts(s, "<table><tr><td><b>E</b>dit this attribute for all members:</td><td>");
+                jk_putv(s, "<select name=\"", JK_STATUS_ARG_ATTRIBUTE,
+                        "\" size=\"1\">\n", NULL);
+                jk_putv(s, "<option value=\"", JK_STATUS_ARG_LBM_ACTIVATION, "\">", JK_STATUS_ARG_LBM_TEXT_ACTIVATION, "</option>\n", NULL);
+                jk_putv(s, "<option value=\"", JK_STATUS_ARG_LBM_FACTOR, "\">", JK_STATUS_ARG_LBM_TEXT_FACTOR, "</option>\n", NULL);
+                jk_putv(s, "<option value=\"", JK_STATUS_ARG_LBM_ROUTE, "\">", JK_STATUS_ARG_LBM_TEXT_ROUTE, "</option>\n", NULL);
+                jk_putv(s, "<option value=\"", JK_STATUS_ARG_LBM_REDIRECT, "\">", JK_STATUS_ARG_LBM_TEXT_REDIRECT, "</option>\n", NULL);
+                jk_putv(s, "<option value=\"", JK_STATUS_ARG_LBM_DOMAIN, "\">", JK_STATUS_ARG_LBM_TEXT_DOMAIN, "</option>\n", NULL);
+                jk_putv(s, "<option value=\"", JK_STATUS_ARG_LBM_DISTANCE, "\">", JK_STATUS_ARG_LBM_TEXT_DISTANCE, "</option>\n", NULL);
+                jk_putv(s, "<option value=\"", JK_STATUS_ARG_AJP_CACHE_TO, "\">", JK_STATUS_ARG_AJP_TEXT_CACHE_TO, "</option>\n", NULL);
+                jk_putv(s, "<option value=\"", JK_STATUS_ARG_AJP_CONNECT_TO, "\">", JK_STATUS_ARG_AJP_TEXT_CONNECT_TO, "</option>\n", NULL);
+                jk_putv(s, "<option value=\"", JK_STATUS_ARG_AJP_PREPOST_TO, "\">", JK_STATUS_ARG_AJP_TEXT_PREPOST_TO, "</option>\n", NULL);
+                jk_putv(s, "<option value=\"", JK_STATUS_ARG_AJP_REPLY_TO, "\">", JK_STATUS_ARG_AJP_TEXT_REPLY_TO, "</option>\n", NULL);
+                jk_putv(s, "<option value=\"", JK_STATUS_ARG_AJP_RETRIES, "\">", JK_STATUS_ARG_AJP_TEXT_RETRIES, "</option>\n", NULL);
+                jk_putv(s, "<option value=\"", JK_STATUS_ARG_AJP_REC_OPTS, "\">", JK_STATUS_ARG_AJP_TEXT_REC_OPTS, "</option>\n", NULL);
+                jk_putv(s, "<option value=\"", JK_STATUS_ARG_AJP_MAX_PK_SZ, "\">", JK_STATUS_ARG_AJP_TEXT_MAX_PK_SZ, "</option>\n", NULL);
+                jk_puts(s, "</select></td><td><input type=\"submit\" value=\"Go\"/></tr></table></form>\n");
             }
 
         }
 
     }
-    else {
 
-        if (mime == JK_STATUS_MIME_HTML) {
-
-            jk_puts(s, "<p>\n");
-            if (single) {
-                status_write_uri(s, p, "Show Balancer Members", JK_STATUS_CMD_SHOW, JK_STATUS_MIME_UNKNOWN,
-                                 NULL, NULL, 0, JK_STATUS_ARG_OPTION_NO_MEMBERS, "", l);
-            }
-            else {
-                status_write_uri(s, p, "Show Balancer Members", JK_STATUS_CMD_LIST, JK_STATUS_MIME_UNKNOWN,
-                                 NULL, NULL, 0, JK_STATUS_ARG_OPTION_NO_MEMBERS, "", l);
-            }
-            jk_puts(s, "</p>\n");
-        }
-
-    }
-
     if (name)
         display_maps(s, p, name, l);
 
@@ -1689,12 +2226,14 @@
 static void display_worker_ajp(jk_ws_service_t *s,
                                status_endpoint_t *p,
                                ajp_worker_t *aw,
+                               int type,
                                jk_logger_t *l)
 {
-    char buf[32];
     int cmd;
     int mime;
+    int read_only = 0;
     int single = 0;
+    unsigned int hide_ajp_conf;
     const char *arg;
     int map_count;
     const char *name = aw->name;
@@ -1705,10 +2244,24 @@
     cmd = status_cmd_int(arg);
     status_get_string(p, JK_STATUS_ARG_MIME, NULL, &arg, l);
     mime = status_mime_int(arg);
+    hide_ajp_conf = status_get_int(p, JK_STATUS_ARG_OPTIONS, 0, l) &
+                                   JK_STATUS_ARG_OPTION_NO_AJP_CONF;
+    if (w->read_only) {
+        read_only = 1;
+    }
+    else {
+        read_only = status_get_int(p, JK_STATUS_ARG_OPTIONS, 0, l) &
+                    JK_STATUS_ARG_OPTION_READ_ONLY;
+    }
     if (cmd == JK_STATUS_CMD_SHOW) {
         single = 1;
     }
 
+    jk_shm_lock();
+    if (aw->sequence != aw->s->h.sequence)
+        jk_ajp_pull(aw, l);
+    jk_shm_unlock();
+
     map_count = count_maps(s, name, l);
 
     if (mime == JK_STATUS_MIME_HTML) {
@@ -1719,58 +2272,47 @@
         else
             status_write_uri(s, p, "S", JK_STATUS_CMD_SHOW, JK_STATUS_MIME_UNKNOWN,
                              name, "", 0, 0, "", l);
+        if (!read_only) {
+            jk_puts(s, "|");
+            status_write_uri(s, p, "E", JK_STATUS_CMD_EDIT, JK_STATUS_MIME_UNKNOWN,
+                             name, "", 0, 0, "", l);
+            jk_puts(s, "|");
+            status_write_uri(s, p, "R", JK_STATUS_CMD_RESET, JK_STATUS_MIME_UNKNOWN,
+                             name, "", 0, 0, "", l);
+        }
         jk_puts(s, "]&nbsp;&nbsp;");
         jk_putv(s, "Worker Status for ", name, "</h3>\n", NULL);
+        if (!hide_ajp_conf) {
+            jk_puts(s, "<table>" JK_STATUS_SHOW_AJP_CONF_HEAD);
+            jk_puts(s, "[");
+            status_write_uri(s, p, "Hide", JK_STATUS_CMD_UNKNOWN, JK_STATUS_MIME_UNKNOWN,
+                             NULL, NULL, JK_STATUS_ARG_OPTION_NO_AJP_CONF, 0, NULL, l);
+            jk_puts(s, "]</td></tr>");
+            display_worker_ajp_conf_details(s, p, aw, 0, type, l);
+            jk_puts(s, "</table>\n<br/>\n");
+        }
+        else {
+            jk_puts(s, "<p>\n");
+            if (single) {
+                status_write_uri(s, p, "Show AJP Configuration", JK_STATUS_CMD_SHOW, JK_STATUS_MIME_UNKNOWN,
+                                 NULL, NULL, 0, JK_STATUS_ARG_OPTION_NO_AJP_CONF, "", l);
+            }
+            else {
+                status_write_uri(s, p, "Show AJP Configuration", JK_STATUS_CMD_LIST, JK_STATUS_MIME_UNKNOWN,
+                                 NULL, NULL, 0, JK_STATUS_ARG_OPTION_NO_AJP_CONF, "", l);
+            }
+            jk_puts(s, "</p>\n");
+        }
         jk_puts(s, "<table>" JK_STATUS_SHOW_AJP_HEAD);
-        jk_printf(s, JK_STATUS_SHOW_AJP_ROW,
-                  status_worker_type(aw->worker.type),
-                  aw->host, aw->port,
-                  jk_dump_hinfo(&aw->worker_inet_addr, buf));
-        jk_puts(s, "</table>\n");
-
     }
-    else if (mime == JK_STATUS_MIME_XML) {
+    display_worker_ajp_details(s, p, aw, NULL, NULL, 0, 0, map_count, l);
 
-        jk_print_xml_start_elt(s, w, 0, 0, "ajp");
-        jk_print_xml_att_string(s, 2, "name", name);
-        jk_print_xml_att_string(s, 2, "type", status_worker_type(aw->worker.type));
-        jk_print_xml_att_string(s, 2, "host", aw->host);
-        jk_print_xml_att_int(s, 2, "port", aw->port);
-        jk_print_xml_att_string(s, 2, "address", jk_dump_hinfo(&aw->worker_inet_addr, buf));
-        jk_print_xml_att_int(s, 2, "map_count", map_count);
-        /* Terminate the tag */
-        jk_print_xml_stop_elt(s, 0, 0);
-
+    if (mime == JK_STATUS_MIME_HTML) {
+        jk_puts(s, "</table>\n");
     }
-    else if (mime == JK_STATUS_MIME_TXT) {
-
-        jk_puts(s, "AJP Worker:");
-        jk_printf(s, " name=%s", name);
-        jk_printf(s, " type=%s", status_worker_type(aw->worker.type));
-        jk_printf(s, " host=%s", aw->host);
-        jk_printf(s, " port=%d", aw->port);
-        jk_printf(s, " address=%s", jk_dump_hinfo(&aw->worker_inet_addr, buf));
-        jk_printf(s, " map_count=%d", map_count);
-        jk_puts(s, "\n");
-
-    }
-    else if (mime == JK_STATUS_MIME_PROP) {
-
-        jk_print_prop_att_string(s, w, NULL, "list", name);
-        jk_print_prop_att_string(s, w, name, "type", status_worker_type(aw->worker.type));
-        jk_print_prop_att_string(s, w, name, "host", aw->host);
-        jk_print_prop_att_int(s, w, name, "port", aw->port);
-        jk_print_prop_att_string(s, w, name, "address", jk_dump_hinfo(&aw->worker_inet_addr, buf));
-        jk_print_prop_att_int(s, w, name, "map_count", map_count);
-
-    }
     if (name)
         display_maps(s, p, name, l);
 
-    if (mime == JK_STATUS_MIME_XML) {
-        jk_print_xml_close_elt(s, w, 0, "ajp");
-    }
-
     JK_TRACE_EXIT(l);
 }
 
@@ -1788,7 +2330,7 @@
             if (JK_IS_DEBUG_LEVEL(l))
                 jk_log(l, JK_LOG_DEBUG,
                        "Status worker '%s' %s lb worker '%s'",
-                       w->name, "displaying", lb->s->name);
+                       w->name, "displaying", lb->name);
             display_worker_lb(s, p, lb, l);
         }
         else {
@@ -1805,7 +2347,7 @@
                 jk_log(l, JK_LOG_DEBUG,
                        "Status worker '%s' %s ajp worker '%s'",
                        w->name, "displaying", aw->name);
-            display_worker_ajp(s, p, aw, l);
+            display_worker_ajp(s, p, aw, jw->type, l);
         }
         else {
             jk_log(l, JK_LOG_WARNING,
@@ -1835,7 +2377,7 @@
     JK_TRACE_ENTER(l);
     if (jw->type == JK_LB_WORKER_TYPE) {
         lb = (lb_worker_t *)jw->worker_private;
-        name = lb->s->name;
+        name = lb->name;
         if (JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG,
                    "Status worker '%s' producing edit form for lb worker '%s'",
@@ -1857,15 +2399,10 @@
         return;
     }
 
-    jk_shm_lock();
-    if (lb->sequence != lb->s->sequence)
-        jk_lb_pull(lb, l);
-    jk_shm_unlock();
-
     jk_putv(s, "<hr/><h3>Edit load balancer settings for ",
             name, "</h3>\n", NULL);
 
-    status_start_form(s, p, "GET", JK_STATUS_CMD_UPDATE, l);
+    status_start_form(s, p, "get", JK_STATUS_CMD_UPDATE, NULL, l);
 
     jk_putv(s, "<table>\n<tr><td>", JK_STATUS_ARG_LB_TEXT_RETRIES,
             ":</td><td><input name=\"",
@@ -1939,66 +2476,107 @@
 
 static void form_member(jk_ws_service_t *s,
                         status_endpoint_t *p,
-                        worker_record_t *wr,
+                        lb_sub_worker_t *wr,
+                        ajp_worker_t *aw,
                         const char *lb_name,
                         jk_logger_t *l)
 {
     status_worker_t *w = p->worker;
 
     JK_TRACE_ENTER(l);
+
     if (JK_IS_DEBUG_LEVEL(l))
         jk_log(l, JK_LOG_DEBUG,
                "Status worker '%s' producing edit form for sub worker '%s' of lb worker '%s'",
-               w->name, wr->s->name, lb_name);
+               w->name, wr? wr->name : aw->name, lb_name);
 
     jk_putv(s, "<hr/><h3>Edit worker settings for ",
-            wr->s->name, "</h3>\n", NULL);
-    status_start_form(s, p, "GET", JK_STATUS_CMD_UPDATE, l);
+            wr? wr->name : aw->name, "</h3>\n", NULL);
+    status_start_form(s, p, "get", JK_STATUS_CMD_UPDATE, NULL, l);
 
+    if (wr) {
+        jk_puts(s, "<table><tbody valign=\"baseline\"><tr><th>Balancing related settings</th>\n");
+        jk_puts(s, "<th>&nbsp;&nbsp;</th><th>AJP settings</th>\n");
+        jk_puts(s, "</tr>\n");
+        jk_puts(s, "<tr><td><table>\n");
+        jk_putv(s, "<tr><td>", JK_STATUS_ARG_LBM_TEXT_ACTIVATION,
+                ":</td><td></td></tr>\n", NULL);
+        jk_putv(s, "<tr><td>&nbsp;&nbsp;Active</td><td><input name=\"",
+                JK_STATUS_ARG_LBM_ACTIVATION, "\" type=\"radio\"", NULL);
+        jk_printf(s, " value=\"%d\"", JK_LB_ACTIVATION_ACTIVE);
+        if (wr->activation == JK_LB_ACTIVATION_ACTIVE)
+            jk_puts(s, " checked=\"checked\"");
+        jk_puts(s, "/></td></tr>\n");
+        jk_putv(s, "<tr><td>&nbsp;&nbsp;Disabled</td><td><input name=\"",
+                JK_STATUS_ARG_LBM_ACTIVATION, "\" type=\"radio\"", NULL);
+        jk_printf(s, " value=\"%d\"", JK_LB_ACTIVATION_DISABLED);
+        if (wr->activation == JK_LB_ACTIVATION_DISABLED)
+            jk_puts(s, " checked=\"checked\"");
+        jk_puts(s, "/></td></tr>\n");
+        jk_putv(s, "<tr><td>&nbsp;&nbsp;Stopped</td><td><input name=\"",
+                JK_STATUS_ARG_LBM_ACTIVATION, "\" type=\"radio\"", NULL);
+        jk_printf(s, " value=\"%d\"", JK_LB_ACTIVATION_STOPPED);
+        if (wr->activation == JK_LB_ACTIVATION_STOPPED)
+            jk_puts(s, " checked=\"checked\"");
+        jk_puts(s, "/></td></tr>\n");
+        jk_putv(s, "<tr><td>", JK_STATUS_ARG_LBM_TEXT_FACTOR,
+                ":</td><td><input name=\"",
+                JK_STATUS_ARG_LBM_FACTOR, "\" type=\"text\" ", NULL);
+        jk_printf(s, "value=\"%d\"/></td></tr>\n", wr->lb_factor);
+        jk_putv(s, "<tr><td>", JK_STATUS_ARG_LBM_TEXT_ROUTE,
+                ":</td><td><input name=\"",
+                JK_STATUS_ARG_LBM_ROUTE, "\" type=\"text\" ", NULL);
+        jk_printf(s, "value=\"%s\"/></td></tr>\n", wr->route);
+        jk_putv(s, "<tr><td>", JK_STATUS_ARG_LBM_TEXT_REDIRECT,
+                ":</td><td><input name=\"",
+                JK_STATUS_ARG_LBM_REDIRECT, "\" type=\"text\" ", NULL);
+        jk_putv(s, "value=\"", wr->redirect, NULL);
+        jk_puts(s, "\"/></td></tr>\n");
+        jk_putv(s, "<tr><td>", JK_STATUS_ARG_LBM_TEXT_DOMAIN,
+                ":</td><td><input name=\"",
+                JK_STATUS_ARG_LBM_DOMAIN, "\" type=\"text\" ", NULL);
+        jk_putv(s, "value=\"", wr->domain, NULL);
+        jk_puts(s, "\"/></td></tr>\n");
+        jk_putv(s, "<tr><td>", JK_STATUS_ARG_LBM_TEXT_DISTANCE,
+                ":</td><td><input name=\"",
+                JK_STATUS_ARG_LBM_DISTANCE, "\" type=\"text\" ", NULL);
+        jk_printf(s, "value=\"%d\"/></td></tr>\n", wr->distance);
+        jk_puts(s, "</table>\n");
+        jk_puts(s, "</td><td></td><td>\n");
+    }
+
     jk_puts(s, "<table>\n");
-    jk_putv(s, "<tr><td>", JK_STATUS_ARG_LBM_TEXT_ACTIVATION,
-            ":</td><td></td></tr>\n", NULL);
-    jk_putv(s, "<tr><td>&nbsp;&nbsp;Active</td><td><input name=\"",
-            JK_STATUS_ARG_LBM_ACTIVATION, "\" type=\"radio\"", NULL);
-    jk_printf(s, " value=\"%d\"", JK_LB_ACTIVATION_ACTIVE);
-    if (wr->s->activation == JK_LB_ACTIVATION_ACTIVE)
-        jk_puts(s, " checked=\"checked\"");
-    jk_puts(s, "/></td></tr>\n");
-    jk_putv(s, "<tr><td>&nbsp;&nbsp;Disabled</td><td><input name=\"",
-            JK_STATUS_ARG_LBM_ACTIVATION, "\" type=\"radio\"", NULL);
-    jk_printf(s, " value=\"%d\"", JK_LB_ACTIVATION_DISABLED);
-    if (wr->s->activation == JK_LB_ACTIVATION_DISABLED)
-        jk_puts(s, " checked=\"checked\"");
-    jk_puts(s, "/></td></tr>\n");
-    jk_putv(s, "<tr><td>&nbsp;&nbsp;Stopped</td><td><input name=\"",
-            JK_STATUS_ARG_LBM_ACTIVATION, "\" type=\"radio\"", NULL);
-    jk_printf(s, " value=\"%d\"", JK_LB_ACTIVATION_STOPPED);
-    if (wr->s->activation == JK_LB_ACTIVATION_STOPPED)
-        jk_puts(s, " checked=\"checked\"");
-    jk_puts(s, "/></td></tr>\n");
-    jk_putv(s, "<tr><td>", JK_STATUS_ARG_LBM_TEXT_FACTOR,
+    jk_putv(s, "<tr><td>", JK_STATUS_ARG_AJP_TEXT_CACHE_TO,
             ":</td><td><input name=\"",
-            JK_STATUS_ARG_LBM_FACTOR, "\" type=\"text\" ", NULL);
-    jk_printf(s, "value=\"%d\"/></td></tr>\n", wr->s->lb_factor);
-    jk_putv(s, "<tr><td>", JK_STATUS_ARG_LBM_TEXT_ROUTE,
+            JK_STATUS_ARG_AJP_CACHE_TO, "\" type=\"text\" ", NULL);
+    jk_printf(s, "value=\"%d\"/></td></tr>\n", aw->cache_timeout);
+    jk_putv(s, "<tr><td>", JK_STATUS_ARG_AJP_TEXT_CONNECT_TO,
             ":</td><td><input name=\"",
-            JK_STATUS_ARG_LBM_ROUTE, "\" type=\"text\" ", NULL);
-    jk_printf(s, "value=\"%s\"/></td></tr>\n", wr->s->route);
-    jk_putv(s, "<tr><td>", JK_STATUS_ARG_LBM_TEXT_REDIRECT,
+            JK_STATUS_ARG_AJP_CONNECT_TO, "\" type=\"text\" ", NULL);
+    jk_printf(s, "value=\"%d\"/></td></tr>\n", aw->connect_timeout);
+    jk_putv(s, "<tr><td>", JK_STATUS_ARG_AJP_TEXT_PREPOST_TO,
             ":</td><td><input name=\"",
-            JK_STATUS_ARG_LBM_REDIRECT, "\" type=\"text\" ", NULL);
-    jk_putv(s, "value=\"", wr->s->redirect, NULL);
-    jk_puts(s, "\"/></td></tr>\n");
-    jk_putv(s, "<tr><td>", JK_STATUS_ARG_LBM_TEXT_DOMAIN,
+            JK_STATUS_ARG_AJP_PREPOST_TO, "\" type=\"text\" ", NULL);
+    jk_printf(s, "value=\"%d\"/></td></tr>\n", aw->prepost_timeout);
+    jk_putv(s, "<tr><td>", JK_STATUS_ARG_AJP_TEXT_REPLY_TO,
             ":</td><td><input name=\"",
-            JK_STATUS_ARG_LBM_DOMAIN, "\" type=\"text\" ", NULL);
-    jk_putv(s, "value=\"", wr->s->domain, NULL);
-    jk_puts(s, "\"/></td></tr>\n");
-    jk_putv(s, "<tr><td>", JK_STATUS_ARG_LBM_TEXT_DISTANCE,
+            JK_STATUS_ARG_AJP_REPLY_TO, "\" type=\"text\" ", NULL);
+    jk_printf(s, "value=\"%d\"/></td></tr>\n", aw->reply_timeout);
+    jk_putv(s, "<tr><td>", JK_STATUS_ARG_AJP_TEXT_RETRIES,
             ":</td><td><input name=\"",
-            JK_STATUS_ARG_LBM_DISTANCE, "\" type=\"text\" ", NULL);
-    jk_printf(s, "value=\"%d\"/></td></tr>\n", wr->s->distance);
+            JK_STATUS_ARG_AJP_RETRIES, "\" type=\"text\" ", NULL);
+    jk_printf(s, "value=\"%d\"/></td></tr>\n", aw->retries);
+    jk_putv(s, "<tr><td>", JK_STATUS_ARG_AJP_TEXT_REC_OPTS,
+            ":</td><td><input name=\"",
+            JK_STATUS_ARG_AJP_REC_OPTS, "\" type=\"text\" ", NULL);
+    jk_printf(s, "value=\"%d\"/></td></tr>\n", aw->recovery_opts);
+    jk_putv(s, "<tr><td>", JK_STATUS_ARG_AJP_TEXT_MAX_PK_SZ,
+            ":</td><td><input name=\"",
+            JK_STATUS_ARG_AJP_MAX_PK_SZ, "\" type=\"text\" ", NULL);
+    jk_printf(s, "value=\"%d\"/></td></tr>\n", aw->max_packet_size);
     jk_puts(s, "</table>\n");
+    if (wr)
+        jk_puts(s, "</td></tr></table>\n");
     jk_puts(s, "<br/><input type=\"submit\" value=\"Update Worker\"/>\n</form>\n");
     JK_TRACE_EXIT(l);
 }
@@ -2036,6 +2614,20 @@
             aname=JK_STATUS_ARG_LBM_TEXT_DOMAIN;
         else if (!strcmp(attribute, JK_STATUS_ARG_LBM_DISTANCE))
             aname=JK_STATUS_ARG_LBM_TEXT_DISTANCE;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CACHE_TO))
+            aname=JK_STATUS_ARG_AJP_TEXT_CACHE_TO;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CONNECT_TO))
+            aname=JK_STATUS_ARG_AJP_TEXT_CONNECT_TO;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_PREPOST_TO))
+            aname=JK_STATUS_ARG_AJP_TEXT_PREPOST_TO;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_REPLY_TO))
+            aname=JK_STATUS_ARG_AJP_TEXT_REPLY_TO;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_RETRIES))
+            aname=JK_STATUS_ARG_AJP_TEXT_RETRIES;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_REC_OPTS))
+            aname=JK_STATUS_ARG_AJP_TEXT_REC_OPTS;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_MAX_PK_SZ))
+            aname=JK_STATUS_ARG_AJP_TEXT_MAX_PK_SZ;
         else {
             jk_log(l, JK_LOG_WARNING,
                    "Status worker '%s' unknown attribute '%s'",
@@ -2046,7 +2638,7 @@
     }
     if (jw->type == JK_LB_WORKER_TYPE) {
         lb = (lb_worker_t *)jw->worker_private;
-        name = lb->s->name;
+        name = lb->name;
         if (JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG,
                    "Status worker '%s' producing edit form for attribute '%s' [%s] of all members of lb worker '%s'",
@@ -2065,56 +2657,86 @@
                 "' for all members of load balancer ",
                 name, "</h3>\n", NULL);
 
-        status_start_form(s, p, "GET", JK_STATUS_CMD_UPDATE, l);
+        status_start_form(s, p, "get", JK_STATUS_CMD_UPDATE, NULL, l);
 
         jk_putv(s, "<table><tr>"
                 "<th>Balanced Worker</th><th>", aname, "</th>"
                 "</tr>", NULL);
 
         for (i = 0; i < lb->num_of_workers; i++) {
-            worker_record_t *wr = &(lb->lb_workers[i]);
+            lb_sub_worker_t *wr = &(lb->lb_workers[i]);
+            jk_worker_t *jw = wr->worker;
+            ajp_worker_t *aw = (ajp_worker_t *)jw->worker_private;;
 
-            jk_putv(s, "<tr><td>", wr->s->name, "</td><td>\n", NULL);
+            jk_putv(s, "<tr><td>", wr->name, "</td><td>\n", NULL);
 
             if (!strcmp(attribute, JK_STATUS_ARG_LBM_ACTIVATION)) {
 
                 jk_printf(s, "Active:&nbsp;<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"radio\"", i);
                 jk_printf(s, " value=\"%d\"", JK_LB_ACTIVATION_ACTIVE);
-                if (wr->s->activation == JK_LB_ACTIVATION_ACTIVE)
+                if (wr->activation == JK_LB_ACTIVATION_ACTIVE)
                     jk_puts(s, " checked=\"checked\"");
                 jk_puts(s, "/>&nbsp;|&nbsp;\n");
                 jk_printf(s, "Disabled:&nbsp;<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"radio\"", i);
                 jk_printf(s, " value=\"%d\"", JK_LB_ACTIVATION_DISABLED);
-                if (wr->s->activation == JK_LB_ACTIVATION_DISABLED)
+                if (wr->activation == JK_LB_ACTIVATION_DISABLED)
                     jk_puts(s, " checked=\"checked\"");
                 jk_puts(s, "/>&nbsp;|&nbsp;\n");
                 jk_printf(s, "Stopped:&nbsp;<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"radio\"", i);
                 jk_printf(s, " value=\"%d\"", JK_LB_ACTIVATION_STOPPED);
-                if (wr->s->activation == JK_LB_ACTIVATION_STOPPED)
+                if (wr->activation == JK_LB_ACTIVATION_STOPPED)
                     jk_puts(s, " checked=\"checked\"");
                 jk_puts(s, "/>\n");
 
             }
             else if (!strcmp(attribute, JK_STATUS_ARG_LBM_FACTOR)) {
                 jk_printf(s, "<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"text\"", i);
-                jk_printf(s, "value=\"%d\"/>\n", wr->s->lb_factor);
+                jk_printf(s, "value=\"%d\"/>\n", wr->lb_factor);
             }
             else if (!strcmp(attribute, JK_STATUS_ARG_LBM_ROUTE)) {
                 jk_printf(s, "<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"text\"", i);
-                jk_putv(s, "value=\"", wr->s->route, "\"/>\n", NULL);
+                jk_putv(s, "value=\"", wr->route, "\"/>\n", NULL);
             }
             else if (!strcmp(attribute, JK_STATUS_ARG_LBM_REDIRECT)) {
                 jk_printf(s, "<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"text\"", i);
-                jk_putv(s, "value=\"", wr->s->redirect, "\"/>\n", NULL);
+                jk_putv(s, "value=\"", wr->redirect, "\"/>\n", NULL);
             }
             else if (!strcmp(attribute, JK_STATUS_ARG_LBM_DOMAIN)) {
                 jk_printf(s, "<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"text\"", i);
-                jk_putv(s, "value=\"", wr->s->domain, "\"/>\n", NULL);
+                jk_putv(s, "value=\"", wr->domain, "\"/>\n", NULL);
             }
             else if (!strcmp(attribute, JK_STATUS_ARG_LBM_DISTANCE)) {
                 jk_printf(s, "<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"text\"", i);
-                jk_printf(s, "value=\"%d\"/>\n", wr->s->distance);
+                jk_printf(s, "value=\"%d\"/>\n", wr->distance);
             }
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CACHE_TO)) {
+                jk_printf(s, "<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"text\"", i);
+                jk_printf(s, "value=\"%d\"/>\n", aw->cache_timeout);
+            }
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CONNECT_TO)) {
+                jk_printf(s, "<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"text\"", i);
+                jk_printf(s, "value=\"%d\"/>\n", aw->connect_timeout);
+            }
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_PREPOST_TO)) {
+                jk_printf(s, "<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"text\"", i);
+                jk_printf(s, "value=\"%d\"/>\n", aw->prepost_timeout);
+            }
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_REPLY_TO)) {
+                jk_printf(s, "<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"text\"", i);
+                jk_printf(s, "value=\"%d\"/>\n", aw->reply_timeout);
+            }
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_RETRIES)) {
+                jk_printf(s, "<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"text\"", i);
+                jk_printf(s, "value=\"%d\"/>\n", aw->retries);
+            }
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_REC_OPTS)) {
+                jk_printf(s, "<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"text\"", i);
+                jk_printf(s, "value=\"%d\"/>\n", aw->recovery_opts);
+            }
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_MAX_PK_SZ)) {
+                jk_printf(s, "<input name=\"" JK_STATUS_ARG_MULT_VALUE_BASE "%d\" type=\"text\"", i);
+                jk_printf(s, "value=\"%d\"/>\n", aw->max_packet_size);
+            }
 
             jk_puts(s, "</td></tr>");
         }
@@ -2134,12 +2756,13 @@
     lb_worker_t *lb = NULL;
     status_worker_t *w = p->worker;
     const char *arg;
+    int sync_needed = JK_FALSE;
     int i;
 
     JK_TRACE_ENTER(l);
     if (jw->type == JK_LB_WORKER_TYPE) {
         lb = (lb_worker_t *)jw->worker_private;
-        name = lb->s->name;
+        name = lb->name;
         if (JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG,
                    "Status worker '%s' committing changes for lb worker '%s'",
@@ -2161,9 +2784,6 @@
         return;
     }
 
-    if (lb->sequence != lb->s->sequence)
-        jk_lb_pull(lb, l);
-
     i = status_get_int(p, JK_STATUS_ARG_LB_RETRIES,
                        lb->retries, l);
     if (i != lb->retries && i > 0) {
@@ -2171,6 +2791,7 @@
                "Status worker '%s' setting 'retries' for lb worker '%s' to '%i'",
                w->name, name, i);
         lb->retries = i;
+        sync_needed = JK_TRUE;
     }
     i = status_get_int(p, JK_STATUS_ARG_LB_RECOVER_TIME,
                        lb->recover_wait_time, l);
@@ -2179,6 +2800,7 @@
                "Status worker '%s' setting 'recover_time' for lb worker '%s' to '%i'",
                w->name, name, i);
         lb->recover_wait_time = i;
+        sync_needed = JK_TRUE;
     }
     i = status_get_int(p, JK_STATUS_ARG_LB_MAX_REPLY_TIMEOUTS,
                        lb->max_reply_timeouts, l);
@@ -2187,6 +2809,7 @@
                "Status worker '%s' setting 'max_reply_timeouts' for lb worker '%s' to '%i'",
                w->name, name, i);
         lb->max_reply_timeouts = i;
+        sync_needed = JK_TRUE;
     }
     i = status_get_bool(p, JK_STATUS_ARG_LB_STICKY, 0, l);
     if (i != lb->sticky_session) {
@@ -2194,6 +2817,7 @@
                "Status worker '%s' setting 'sticky_session' for lb worker '%s' to '%i'",
                w->name, name, i);
         lb->sticky_session = i;
+        sync_needed = JK_TRUE;
     }
     i = status_get_bool(p, JK_STATUS_ARG_LB_STICKY_FORCE, 0, l);
     if (i != lb->sticky_session_force) {
@@ -2201,110 +2825,212 @@
                "Status worker '%s' setting 'sticky_session_force' for lb worker '%s' to '%i'",
                w->name, name, i);
         lb->sticky_session_force = i;
+        sync_needed = JK_TRUE;
     }
     if (status_get_string(p, JK_STATUS_ARG_LB_METHOD, NULL, &arg, l) == JK_TRUE) {
         i = jk_lb_get_method_code(arg);
         if (i != lb->lbmethod && i >= 0 && i <= JK_LB_METHOD_MAX) {
-            lb->lbmethod = i;
             jk_log(l, JK_LOG_INFO,
                    "Status worker '%s' setting 'method' for lb worker '%s' to '%s'",
                    w->name, name, jk_lb_get_method(lb, l));
+            lb->lbmethod = i;
+            sync_needed = JK_TRUE;
         }
     }
     if (status_get_string(p, JK_STATUS_ARG_LB_LOCK, NULL, &arg, l) == JK_TRUE) {
         i = jk_lb_get_lock_code(arg);
         if (i != lb->lblock && i >= 0 && i <= JK_LB_LOCK_MAX) {
-            lb->lblock = i;
             jk_log(l, JK_LOG_INFO,
                    "Status worker '%s' setting 'lock' for lb worker '%s' to '%s'",
                    w->name, name, jk_lb_get_lock(lb, l));
+            lb->lblock = i;
+            sync_needed = JK_TRUE;
         }
     }
-    lb->sequence++;
-    jk_lb_push(lb, l);
+    if (sync_needed == JK_TRUE) {
+        lb->sequence++;
+        jk_lb_push(lb, l);
+    }
 }
 
+static int set_int_if_changed(status_endpoint_t *p,
+                              const char *name,
+                              const char *att,
+                              const char *arg,
+                              int min,
+                              int max,
+                              int *param,
+                              const char *lb_name,
+                              jk_logger_t *l)
+{
+    int i;
+    status_worker_t *w = p->worker;
+    i = status_get_int(p, arg, *param, l);
+    if (i != *param && i >= min && i <= max) {
+        if (lb_name)
+            jk_log(l, JK_LOG_INFO,
+                   "Status worker '%s' setting '%s' for sub worker '%s' of lb worker '%s' to '%i'",
+                   w->name, att, name, lb_name, i);
+        else
+            jk_log(l, JK_LOG_INFO,
+                   "Status worker '%s' setting '%s' for ajp worker '%s' to '%i'",
+                   w->name, att, name, i);
+        *param = i;
+        return JK_TRUE;
+    }
+    return JK_FALSE;
+}
+
+static int set_uint_if_changed(status_endpoint_t *p,
+                               const char *name,
+                               const char *att,
+                               const char *arg,
+                               unsigned int min,
+                               unsigned int max,
+                               unsigned int *param,
+                               const char *lb_name,
+                              jk_logger_t *l)
+{
+    unsigned i;
+    status_worker_t *w = p->worker;
+    i = (unsigned)status_get_int(p, arg, *param, l);
+    if (i != *param && i >= min && i <= max) {
+        if (lb_name)
+            jk_log(l, JK_LOG_INFO,
+                   "Status worker '%s' setting '%s' for sub worker '%s' of lb worker '%s' to '%u'",
+                   w->name, att, name, lb_name, i);
+        else
+            jk_log(l, JK_LOG_INFO,
+                   "Status worker '%s' setting '%s' for ajp worker '%s' to '%u'",
+                   w->name, att, name, i);
+        *param = i;
+        return JK_TRUE;
+    }
+    return JK_FALSE;
+}
+
 static int commit_member(jk_ws_service_t *s,
-                          status_endpoint_t *p,
-                          worker_record_t *wr,
-                          const char *lb_name,
-                          jk_logger_t *l)
+                         status_endpoint_t *p,
+                         lb_worker_t *lb,
+                         lb_sub_worker_t *wr,
+                         ajp_worker_t *aw,
+                         jk_logger_t *l)
 {
     const char *arg;
+    const char *lb_name = NULL;
     status_worker_t *w = p->worker;
     int rc = 0;
     int rv;
     int i;
+    int old;
 
     JK_TRACE_ENTER(l);
-    if (JK_IS_DEBUG_LEVEL(l))
-        jk_log(l, JK_LOG_DEBUG,
-               "Status worker '%s' committing changes for sub worker '%s' of lb worker '%s'",
-               w->name, wr->s->name, lb_name);
+    if (lb) {
+        lb_name = lb->name;
+        if (JK_IS_DEBUG_LEVEL(l))
+            jk_log(l, JK_LOG_DEBUG,
+                   "Status worker '%s' committing changes for sub worker '%s' of lb worker '%s'",
+                   w->name, wr->name, lb_name);
+    }
+    else {
+        if (JK_IS_DEBUG_LEVEL(l))
+            jk_log(l, JK_LOG_DEBUG,
+                   "Status worker '%s' committing changes for ajp worker '%s'",
+                   w->name, aw->name);
+    }
 
-    if (status_get_string(p, JK_STATUS_ARG_LBM_ACTIVATION, NULL, &arg, l) == JK_TRUE) {
-        i = jk_lb_get_activation_code(arg);
-        if (i != wr->s->activation && i >= 0 && i <= JK_LB_ACTIVATION_MAX) {
-            wr->s->activation = i;
-            jk_log(l, JK_LOG_INFO,
-                   "Status worker '%s' setting 'activation' for sub worker '%s' of lb worker '%s' to '%s'",
-                   w->name, wr->s->name, lb_name, jk_lb_get_activation(wr, l));
-            rc |= 1;
+    if (lb) {
+        if (status_get_string(p, JK_STATUS_ARG_LBM_ACTIVATION, NULL, &arg, l) == JK_TRUE) {
+            i = jk_lb_get_activation_code(arg);
+            if (i != wr->activation && i >= 0 && i <= JK_LB_ACTIVATION_MAX) {
+                wr->activation = i;
+                jk_log(l, JK_LOG_INFO,
+                       "Status worker '%s' setting 'activation' for sub worker '%s' of lb worker '%s' to '%s'",
+                       w->name, wr->name, lb_name, jk_lb_get_activation(wr, l));
+                rc |= 1;
+            }
         }
-    }
-    i = status_get_int(p, JK_STATUS_ARG_LBM_FACTOR,
-                       wr->s->lb_factor, l);
-    if (i != wr->s->lb_factor && i > 0) {
-        jk_log(l, JK_LOG_INFO,
-               "Status worker '%s' setting 'lbfactor' for sub worker '%s' of lb worker '%s' to '%i'",
-               w->name, wr->s->name, lb_name, i);
-        wr->s->lb_factor = i;
-        /* Recalculate the load multiplicators wrt. lb_factor */
-        rc |= 2;
-    }
-    if ((rv = status_get_string(p, JK_STATUS_ARG_LBM_ROUTE,
-                                NULL, &arg, l)) == JK_TRUE) {
-        if (strncmp(wr->s->route, arg, JK_SHM_STR_SIZ)) {
-            jk_log(l, JK_LOG_INFO,
-                   "Status worker '%s' setting 'route' for sub worker '%s' of lb worker '%s' to '%s'",
-                   w->name, wr->s->name, lb_name, arg);
-            strncpy(wr->s->route, arg, JK_SHM_STR_SIZ);
-            if (!wr->s->domain[0]) {
-                char * id_domain = strchr(wr->s->route, '.');
-                if (id_domain) {
-                    *id_domain = '\0';
-                    strcpy(wr->s->domain, wr->s->route);
-                    *id_domain = '.';
+        if (set_int_if_changed(p, wr->name, "lbfactor", JK_STATUS_ARG_LBM_FACTOR,
+                               1, INT_MAX, &wr->lb_factor, lb_name, l))
+            /* Recalculate the load multiplicators wrt. lb_factor */
+            rc |= 2;
+        if ((rv = status_get_string(p, JK_STATUS_ARG_LBM_ROUTE,
+                                    NULL, &arg, l)) == JK_TRUE) {
+            if (strncmp(wr->route, arg, JK_SHM_STR_SIZ)) {
+                jk_log(l, JK_LOG_INFO,
+                       "Status worker '%s' setting 'route' for sub worker '%s' of lb worker '%s' to '%s'",
+                       w->name, wr->name, lb_name, arg);
+                strncpy(wr->route, arg, JK_SHM_STR_SIZ);
+                rc |= 4;
+                if (!wr->domain[0]) {
+                    char * id_domain = strchr(wr->route, '.');
+                    if (id_domain) {
+                        *id_domain = '\0';
+                        strcpy(wr->domain, wr->route);
+                        *id_domain = '.';
+                    }
                 }
             }
         }
+        if ((rv = status_get_string(p, JK_STATUS_ARG_LBM_REDIRECT,
+                                    NULL, &arg, l)) == JK_TRUE) {
+            if (strncmp(wr->redirect, arg, JK_SHM_STR_SIZ)) {
+                jk_log(l, JK_LOG_INFO,
+                       "Status worker '%s' setting 'redirect' for sub worker '%s' of lb worker '%s' to '%s'",
+                       w->name, wr->name, lb_name, arg);
+                strncpy(wr->redirect, arg, JK_SHM_STR_SIZ);
+                rc |= 4;
+            }
+        }
+        if ((rv = status_get_string(p, JK_STATUS_ARG_LBM_DOMAIN,
+                                    NULL, &arg, l)) == JK_TRUE) {
+            if (strncmp(wr->domain, arg, JK_SHM_STR_SIZ)) {
+                jk_log(l, JK_LOG_INFO,
+                       "Status worker '%s' setting 'domain' for sub worker '%s' of lb worker '%s' to '%s'",
+                       w->name, wr->name, lb_name, arg);
+                strncpy(wr->domain, arg, JK_SHM_STR_SIZ);
+                rc |= 4;
+            }
+        }
+        if (set_int_if_changed(p, wr->name, "distance", JK_STATUS_ARG_LBM_DISTANCE,
+                               0, INT_MAX, &wr->distance, lb_name, l))
+            rc |= 4;
     }
-    if ((rv = status_get_string(p, JK_STATUS_ARG_LBM_REDIRECT,
-                                NULL, &arg, l)) == JK_TRUE) {
-        if (strncmp(wr->s->redirect, arg, JK_SHM_STR_SIZ)) {
-            jk_log(l, JK_LOG_INFO,
-                   "Status worker '%s' setting 'redirect' for sub worker '%s' of lb worker '%s' to '%s'",
-                   w->name, wr->s->name, lb_name, arg);
-            strncpy(wr->s->redirect, arg, JK_SHM_STR_SIZ);
+    old = aw->cache_timeout;
+    if (set_int_if_changed(p, aw->name, "connection_pool_timeout", JK_STATUS_ARG_AJP_CACHE_TO,
+                           0, INT_MAX, &aw->cache_timeout, lb_name, l)) {
+        rc |= 4;
+        if (old == 0) {
+            unsigned int i;
+            for (i = 0; i < aw->ep_cache_sz; i++) {
+                ajp_endpoint_t *ae = (ajp_endpoint_t *) aw->ep_cache[i];
+                if (ae)
+                    ae->last_access = time(NULL);
+            }
         }
     }
-    if ((rv = status_get_string(p, JK_STATUS_ARG_LBM_DOMAIN,
-                                NULL, &arg, l)) == JK_TRUE) {
-        if (strncmp(wr->s->domain, arg, JK_SHM_STR_SIZ)) {
-            jk_log(l, JK_LOG_INFO,
-                   "Status worker '%s' setting 'domain' for sub worker '%s' of lb worker '%s' to '%s'",
-                   w->name, wr->s->name, lb_name, arg);
-            strncpy(wr->s->domain, arg, JK_SHM_STR_SIZ);
+    if (set_int_if_changed(p, aw->name, "connect_timeout", JK_STATUS_ARG_AJP_CONNECT_TO,
+                           0, INT_MAX, &aw->connect_timeout, lb_name, l))
+        rc |= 4;
+    if (set_int_if_changed(p, aw->name, "prepost_timeout", JK_STATUS_ARG_AJP_PREPOST_TO,
+                           0, INT_MAX, &aw->prepost_timeout, lb_name, l))
+        rc |= 4;
+    if (set_int_if_changed(p, aw->name, "reply_timeout", JK_STATUS_ARG_AJP_REPLY_TO,
+                           0, INT_MAX, &aw->reply_timeout, lb_name, l))
+        rc |= 4;
+    if (set_int_if_changed(p, aw->name, "retries", JK_STATUS_ARG_AJP_RETRIES,
+                           1, INT_MAX, &aw->retries, lb_name, l))
+        rc |= 4;
+    if (set_uint_if_changed(p, aw->name, "recovery_options", JK_STATUS_ARG_AJP_REC_OPTS,
+                           0, INT_MAX, &aw->recovery_opts, lb_name, l))
+        rc |= 4;
+    if (set_uint_if_changed(p, aw->name, "max_packet_size", JK_STATUS_ARG_AJP_MAX_PK_SZ,
+                           8*1024, 64*1024, &aw->max_packet_size, lb_name, l)) {
+        rc |= 4;
+        if (aw->max_packet_size > lb->max_packet_size) {
+            lb->max_packet_size = aw->max_packet_size;
         }
     }
-    i = status_get_int(p, JK_STATUS_ARG_LBM_DISTANCE,
-                       wr->s->distance, l);
-    if (i != wr->s->distance && i > 0) {
-        jk_log(l, JK_LOG_INFO,
-               "Status worker '%s' setting 'distance' for sub worker '%s' of lb worker '%s' to '%i'",
-               w->name, wr->s->name, lb_name, i);
-        wr->s->distance = i;
-    }
     return rc;
 }
 
@@ -2345,6 +3071,20 @@
             aname=JK_STATUS_ARG_LBM_TEXT_DOMAIN;
         else if (!strcmp(attribute, JK_STATUS_ARG_LBM_DISTANCE))
             aname=JK_STATUS_ARG_LBM_TEXT_DISTANCE;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CACHE_TO))
+            aname=JK_STATUS_ARG_AJP_TEXT_CACHE_TO;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CONNECT_TO))
+            aname=JK_STATUS_ARG_AJP_TEXT_CONNECT_TO;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_PREPOST_TO))
+            aname=JK_STATUS_ARG_AJP_TEXT_PREPOST_TO;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_REPLY_TO))
+            aname=JK_STATUS_ARG_AJP_TEXT_REPLY_TO;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_RETRIES))
+            aname=JK_STATUS_ARG_AJP_TEXT_RETRIES;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_REC_OPTS))
+            aname=JK_STATUS_ARG_AJP_TEXT_REC_OPTS;
+        else if (!strcmp(attribute, JK_STATUS_ARG_AJP_MAX_PK_SZ))
+            aname=JK_STATUS_ARG_AJP_TEXT_MAX_PK_SZ;
         else {
             jk_log(l, JK_LOG_WARNING,
                    "Status worker '%s' unknown attribute '%s'",
@@ -2355,7 +3095,7 @@
     }
     if (jw->type == JK_LB_WORKER_TYPE) {
         lb = (lb_worker_t *)jw->worker_private;
-        name = lb->s->name;
+        name = lb->name;
         if (JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG,
                    "Status worker '%s' committing changes for attribute '%s' [%s] of all members of lb worker '%s'",
@@ -2371,54 +3111,101 @@
 
     if (lb) {
         for (j = 0; j < lb->num_of_workers; j++) {
-            worker_record_t *wr = &(lb->lb_workers[j]);
+            int sync_needed = JK_FALSE;
+            lb_sub_worker_t *wr = &(lb->lb_workers[j]);
+            jk_worker_t *jw = wr->worker;
+            ajp_worker_t *aw = (ajp_worker_t *)jw->worker_private;;
             snprintf(vname, 32-1, "" JK_STATUS_ARG_MULT_VALUE_BASE "%d", j);
 
             if (!strcmp(attribute, JK_STATUS_ARG_LBM_FACTOR)) {
-                i = status_get_int(p, vname, wr->s->lb_factor, l);
-                if (i != wr->s->lb_factor && i > 0) {
-                    jk_log(l, JK_LOG_INFO,
-                           "Status worker '%s' setting 'lbfactor' for sub worker '%s' of lb worker '%s' to '%i'",
-                           w->name, wr->s->name, name, i);
-                    wr->s->lb_factor = i;
+                if (set_int_if_changed(p, wr->name, "lbfactor", vname,
+                                       1, INT_MAX, &wr->lb_factor, name, l)) {
                     rc = 2;
+                    sync_needed = JK_TRUE;
                 }
             }
             else if (!strcmp(attribute, JK_STATUS_ARG_LBM_DISTANCE)) {
-                i = status_get_int(p, vname, wr->s->distance, l);
-                if (i != wr->s->distance && i > 0) {
-                    jk_log(l, JK_LOG_INFO,
-                           "Status worker '%s' setting 'distance' for sub worker '%s' of lb worker '%s' to '%i'",
-                           w->name, wr->s->name, name, i);
-                    wr->s->lb_factor = i;
+                if (set_int_if_changed(p, wr->name, "distance", vname,
+                                       0, INT_MAX, &wr->distance, name, l))
+                    sync_needed = JK_TRUE;
+            }
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CACHE_TO)) {
+                int old = aw->cache_timeout;
+                if (set_int_if_changed(p, aw->name, "connection_pool_timeout", vname,
+                                       0, INT_MAX, &aw->cache_timeout, name, l)) {
+                    sync_needed = JK_TRUE;
+                    if (old == 0) {
+                        unsigned int i;
+                        for (i = 0; i < aw->ep_cache_sz; i++) {
+                            ajp_endpoint_t *ae = (ajp_endpoint_t *) aw->ep_cache[i];
+                            if (ae)
+                                ae->last_access = time(NULL);
+                        }
+                    }
                 }
             }
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_CONNECT_TO)) {
+                if (set_int_if_changed(p, aw->name, "connect_timeout", vname,
+                                       0, INT_MAX, &aw->connect_timeout, name, l))
+                    sync_needed = JK_TRUE;
+            }
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_PREPOST_TO)) {
+                if (set_int_if_changed(p, aw->name, "prepost_timeout", vname,
+                                       0, INT_MAX, &aw->prepost_timeout, name, l))
+                    sync_needed = JK_TRUE;
+            }
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_REPLY_TO)) {
+                if (set_int_if_changed(p, aw->name, "reply_timeout", vname,
+                                       0, INT_MAX, &aw->reply_timeout, name, l))
+                    sync_needed = JK_TRUE;
+            }
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_RETRIES)) {
+                if (set_int_if_changed(p, aw->name, "retries", vname,
+                                       1, INT_MAX, &aw->retries, name, l))
+                    sync_needed = JK_TRUE;
+            }
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_REC_OPTS)) {
+                if (set_uint_if_changed(p, aw->name, "recovery_options", vname,
+                                       0, INT_MAX, &aw->recovery_opts, name, l))
+                    sync_needed = JK_TRUE;
+            }
+            else if (!strcmp(attribute, JK_STATUS_ARG_AJP_MAX_PK_SZ)) {
+                if (set_uint_if_changed(p, aw->name, "max_packet_size", vname,
+                                       8*1024, 64*1024, &aw->max_packet_size, name, l)) {
+                    sync_needed = JK_TRUE;
+                    if (aw->max_packet_size > lb->max_packet_size) {
+                        lb->max_packet_size = aw->max_packet_size;
+                    }
+                }
+            }
             else {
                 int rv = status_get_string(p, vname, NULL, &arg, l);
                 if (!strcmp(attribute, JK_STATUS_ARG_LBM_ACTIVATION)) {
                     if (rv == JK_TRUE) {
                         i = jk_lb_get_activation_code(arg);
-                        if (i != wr->s->activation && i >= 0 && i <= JK_LB_ACTIVATION_MAX) {
-                            wr->s->activation = i;
+                        if (i != wr->activation && i >= 0 && i <= JK_LB_ACTIVATION_MAX) {
                             jk_log(l, JK_LOG_INFO,
                                    "Status worker '%s' setting 'activation' for sub worker '%s' of lb worker '%s' to '%s'",
-                                   w->name, wr->s->name, name, jk_lb_get_activation(wr, l));
+                                   w->name, wr->name, name, jk_lb_get_activation(wr, l));
+                            wr->activation = i;
                             rc = 1;
+                            sync_needed = JK_TRUE;
                         }
                     }
                 }
                 else if (!strcmp(attribute, JK_STATUS_ARG_LBM_ROUTE)) {
                     if (rv == JK_TRUE) {
-                        if (strncmp(wr->s->route, arg, JK_SHM_STR_SIZ)) {
+                        if (strncmp(wr->route, arg, JK_SHM_STR_SIZ)) {
                             jk_log(l, JK_LOG_INFO,
                                    "Status worker '%s' setting 'route' for sub worker '%s' of lb worker '%s' to '%s'",
-                                   w->name, wr->s->name, name, arg);
-                            strncpy(wr->s->route, arg, JK_SHM_STR_SIZ);
-                            if (!wr->s->domain[0]) {
-                                char * id_domain = strchr(wr->s->route, '.');
+                                   w->name, wr->name, name, arg);
+                            strncpy(wr->route, arg, JK_SHM_STR_SIZ);
+                            sync_needed = JK_TRUE;
+                            if (!wr->domain[0]) {
+                                char * id_domain = strchr(wr->route, '.');
                                 if (id_domain) {
                                     *id_domain = '\0';
-                                    strcpy(wr->s->domain, wr->s->route);
+                                    strcpy(wr->domain, wr->route);
                                     *id_domain = '.';
                                 }
                             }
@@ -2427,31 +3214,42 @@
                 }
                 else if (!strcmp(attribute, JK_STATUS_ARG_LBM_REDIRECT)) {
                     if (rv == JK_TRUE) {
-                        if (strncmp(wr->s->redirect, arg, JK_SHM_STR_SIZ)) {
+                        if (strncmp(wr->redirect, arg, JK_SHM_STR_SIZ)) {
                             jk_log(l, JK_LOG_INFO,
                                    "Status worker '%s' setting 'redirect' for sub worker '%s' of lb worker '%s' to '%s'",
-                                   w->name, wr->s->name, name, arg);
-                            strncpy(wr->s->redirect, arg, JK_SHM_STR_SIZ);
+                                   w->name, wr->name, name, arg);
+                            strncpy(wr->redirect, arg, JK_SHM_STR_SIZ);
+                            sync_needed = JK_TRUE;
                         }
                     }
                 }
                 else if (!strcmp(attribute, JK_STATUS_ARG_LBM_DOMAIN)) {
                     if (rv == JK_TRUE) {
-                        if (strncmp(wr->s->domain, arg, JK_SHM_STR_SIZ)) {
+                        if (strncmp(wr->domain, arg, JK_SHM_STR_SIZ)) {
                             jk_log(l, JK_LOG_INFO,
                                    "Status worker '%s' setting 'domain' for sub worker '%s' of lb worker '%s' to '%s'",
-                                   w->name, wr->s->name, name, arg);
-                            strncpy(wr->s->domain, arg, JK_SHM_STR_SIZ);
+                                   w->name, wr->name, name, arg);
+                            strncpy(wr->domain, arg, JK_SHM_STR_SIZ);
+                            sync_needed = JK_TRUE;
                         }
                     }
                 }
             }
+            if (sync_needed == JK_TRUE) {
+                wr->sequence++;
+                if (!rc)
+                    rc = 3;
+            }
         }
         if (rc == 1)
             reset_lb_values(lb, l);
         else if (rc == 2)
             /* Recalculate the load multiplicators wrt. lb_factor */
             update_mult(lb, l);
+        if (rc) {
+            lb->sequence++;
+            jk_lb_push(lb, l);
+        }
     }
     JK_TRACE_EXIT(l);
 }
@@ -2527,7 +3325,7 @@
     const char *worker;
     const char *sub_worker;
     jk_worker_t *jw = NULL;
-    worker_record_t *wr = NULL;
+    lb_sub_worker_t *wr = NULL;
 
     JK_TRACE_ENTER(l);
     fetch_worker_and_sub_worker(p, "checking", &worker, &sub_worker, l);
@@ -2723,8 +3521,6 @@
         list_workers_type(s, p, 0, ajp_cnt, l);
     }
 
-    display_legend(s, p, l);
-
     JK_TRACE_EXIT(l);
     return JK_TRUE;
 }
@@ -2744,7 +3540,6 @@
         return JK_FALSE;
     }
     display_worker(s, p, jw, l);
-    display_legend(s, p, l);
 
     JK_TRACE_EXIT(l);
     return JK_TRUE;
@@ -2756,8 +3551,11 @@
 {
     const char *worker;
     const char *sub_worker;
+    status_worker_t *w = p->worker;
     jk_worker_t *jw = NULL;
-    status_worker_t *w = p->worker;
+    lb_worker_t *lb = NULL;
+    lb_sub_worker_t *wr = NULL;
+    ajp_worker_t *aw = NULL;
 
     JK_TRACE_ENTER(l);
     fetch_worker_and_sub_worker(p, "editing", &worker, &sub_worker, l);
@@ -2766,32 +3564,81 @@
         return JK_FALSE;
     }
 
-    if (!sub_worker || !sub_worker[0]) {
-        const char *arg;
-
-        if (status_get_string(p, JK_STATUS_ARG_ATTRIBUTE,
-                              NULL, &arg, l) == JK_TRUE)
-            form_all_members(s, p, jw, arg, l);
-        else
-            form_worker(s, p, jw, l);
-    }
-    else  {
-        worker_record_t *wr = NULL;
-        if (jw->type != JK_LB_WORKER_TYPE) {
-            jk_log(l, JK_LOG_WARNING,
-                   "Status worker '%s' worker type not implemented",
-                   w->name);
+    if (jw->type == JK_LB_WORKER_TYPE) {
+        if (check_valid_lb(s, p, jw, worker, &lb, 0, l) == JK_FALSE) {
             JK_TRACE_EXIT(l);
             return JK_FALSE;
         }
-        if(search_sub_worker(s, p, jw, worker, &wr, sub_worker, l) == JK_FALSE) {
+
+        jk_shm_lock();
+        if (lb->sequence != lb->s->h.sequence)
+            jk_lb_pull(lb, l);
+        jk_shm_unlock();
+        if (!sub_worker || !sub_worker[0]) {
+            const char *arg;
+            if (status_get_string(p, JK_STATUS_ARG_ATTRIBUTE,
+                                  NULL, &arg, l) == JK_TRUE) {
+                if (JK_IS_DEBUG_LEVEL(l))
+                    jk_log(l, JK_LOG_DEBUG,
+                           "Status worker '%s' %s lb worker '%s' with all sub workers",
+                           w->name, "editing", lb->name);
+                form_all_members(s, p, jw, arg, l);
+            }
+            else {
+                if (JK_IS_DEBUG_LEVEL(l))
+                    jk_log(l, JK_LOG_DEBUG,
+                           "Status worker '%s' %s lb worker '%s'",
+                           w->name, "editing", lb->name);
+                form_worker(s, p, jw, l);
+            }
             JK_TRACE_EXIT(l);
-            return JK_FALSE;
+            return JK_TRUE;
         }
-        form_member(s, p, wr, worker, l);
+        else  {
+            if(search_sub_worker(s, p, jw, worker, &wr, sub_worker, l) == JK_FALSE) {
+                JK_TRACE_EXIT(l);
+                return JK_FALSE;
+            }
+            if (JK_IS_DEBUG_LEVEL(l))
+                jk_log(l, JK_LOG_DEBUG,
+                       "Status worker '%s' %s lb worker '%s' sub worker '%s'",
+                       w->name, "editing", lb->name, wr->name);
+            aw = (ajp_worker_t *)wr->worker->worker_private;
+            form_member(s, p, wr, aw, worker, l);
+            JK_TRACE_EXIT(l);
+            return JK_TRUE;
+        }
     }
+    else if (jw->type == JK_AJP13_WORKER_TYPE ||
+             jw->type == JK_AJP14_WORKER_TYPE) {
+        ajp_worker_t *aw = (ajp_worker_t *)jw->worker_private;
+        if (aw) {
+            if (JK_IS_DEBUG_LEVEL(l))
+                jk_log(l, JK_LOG_DEBUG,
+                       "Status worker '%s' %s ajp worker '%s'",
+                       w->name, "editing", aw->name);
+            jk_shm_lock();
+            if (aw->sequence != aw->s->h.sequence)
+                jk_ajp_pull(aw, l);
+            jk_shm_unlock();
+            form_member(s, p, NULL, aw, worker, l);
+            JK_TRACE_EXIT(l);
+            return JK_TRUE;
+        }
+        else {
+            jk_log(l, JK_LOG_WARNING,
+                   "Status worker '%s' aw worker is (null)",
+                   w->name);
+        }
+    }
+    else {
+        if (JK_IS_DEBUG_LEVEL(l))
+            jk_log(l, JK_LOG_DEBUG,
+                   "Status worker '%s' worker type not implemented",
+                   w->name);
+    }
     JK_TRACE_EXIT(l);
-    return JK_TRUE;
+    return JK_FALSE;
 }
 
 static int update_worker(jk_ws_service_t *s,
@@ -2800,7 +3647,12 @@
 {
     const char *worker;
     const char *sub_worker;
+    status_worker_t *w = p->worker;
     jk_worker_t *jw = NULL;
+    lb_worker_t *lb = NULL;
+    lb_sub_worker_t *wr = NULL;
+    ajp_worker_t *aw = NULL;
+    int rc;
 
     JK_TRACE_ENTER(l);
     fetch_worker_and_sub_worker(p, "updating", &worker, &sub_worker, l);
@@ -2809,36 +3661,90 @@
         return JK_FALSE;
     }
 
-    if (!sub_worker || !sub_worker[0]) {
-        const char *arg;
-
-        if (status_get_string(p, JK_STATUS_ARG_ATTRIBUTE,
-                              NULL, &arg, l) == JK_TRUE)
-            commit_all_members(s, p, jw, arg, l);
-        else
-            commit_worker(s, p, jw, l);
-    }
-    else  {
-        lb_worker_t *lb = NULL;
-        worker_record_t *wr = NULL;
-        int rc = 0;
+    if (jw->type == JK_LB_WORKER_TYPE) {
         if (check_valid_lb(s, p, jw, worker, &lb, 0, l) == JK_FALSE) {
             JK_TRACE_EXIT(l);
             return JK_FALSE;
         }
-        if(search_sub_worker(s, p, jw, worker, &wr, sub_worker, l) == JK_FALSE) {
+
+        if (lb->sequence != lb->s->h.sequence)
+            jk_lb_pull(lb, l);
+        if (!sub_worker || !sub_worker[0]) {
+            const char *arg;
+            if (status_get_string(p, JK_STATUS_ARG_ATTRIBUTE,
+                                  NULL, &arg, l) == JK_TRUE) {
+                if (JK_IS_DEBUG_LEVEL(l))
+                    jk_log(l, JK_LOG_DEBUG,
+                           "Status worker '%s' %s lb worker '%s' with all sub workers",
+                           w->name, "updating", lb->name);
+                commit_all_members(s, p, jw, arg, l);
+            }
+            else {
+                if (JK_IS_DEBUG_LEVEL(l))
+                    jk_log(l, JK_LOG_DEBUG,
+                           "Status worker '%s' %s lb worker '%s'",
+                           w->name, "updating", lb->name);
+                commit_worker(s, p, jw, l);
+            }
             JK_TRACE_EXIT(l);
-            return JK_FALSE;
+            return JK_TRUE;
         }
-        rc = commit_member(s, p, wr, lb->s->name, l);
-        if (rc & 1)
-            reset_lb_values(lb, l);
-        if (rc & 2)
-            /* Recalculate the load multiplicators wrt. lb_factor */
-            update_mult(lb, l);
+        else  {
+            if(search_sub_worker(s, p, jw, worker, &wr, sub_worker, l) == JK_FALSE) {
+                JK_TRACE_EXIT(l);
+                return JK_FALSE;
+            }
+            if (JK_IS_DEBUG_LEVEL(l))
+                jk_log(l, JK_LOG_DEBUG,
+                       "Status worker '%s' %s lb worker '%s' sub worker '%s'",
+                       w->name, "updating", lb->name, wr->name);
+            aw = (ajp_worker_t *)wr->worker->worker_private;
+            rc = commit_member(s, p, lb, wr, aw, l);
+            if (rc) {
+                wr->sequence++;
+                lb->sequence++;
+                jk_lb_push(lb, l);
+            }
+            if (rc & 1)
+                reset_lb_values(lb, l);
+            if (rc & 2)
+                /* Recalculate the load multiplicators wrt. lb_factor */
+                update_mult(lb, l);
+            JK_TRACE_EXIT(l);
+            return JK_TRUE;
+        }
     }
+    else if (jw->type == JK_AJP13_WORKER_TYPE ||
+             jw->type == JK_AJP14_WORKER_TYPE) {
+        ajp_worker_t *aw = (ajp_worker_t *)jw->worker_private;
+        if (aw) {
+            if (JK_IS_DEBUG_LEVEL(l))
+                jk_log(l, JK_LOG_DEBUG,
+                       "Status worker '%s' %s ajp worker '%s'",
+                       w->name, "updating", aw->name);
+            if (aw->sequence != aw->s->h.sequence)
+                jk_ajp_pull(aw, l);
+            if (commit_member(s, p, NULL, NULL, aw, l)) {
+                aw->sequence++;
+                jk_ajp_push(aw, l);
+            }
+            JK_TRACE_EXIT(l);
+            return JK_TRUE;
+        }
+        else {
+            jk_log(l, JK_LOG_WARNING,
+                   "Status worker '%s' aw worker is (null)",
+                   w->name);
+        }
+    }
+    else {
+        if (JK_IS_DEBUG_LEVEL(l))
+            jk_log(l, JK_LOG_DEBUG,
+                   "Status worker '%s' worker type not implemented",
+                   w->name);
+    }
     JK_TRACE_EXIT(l);
-    return JK_TRUE;
+    return JK_FALSE;
 }
 
 static int reset_worker(jk_ws_service_t *s,
@@ -2848,9 +3754,11 @@
     unsigned int i;
     const char *worker;
     const char *sub_worker;
+    status_worker_t *w = p->worker;
     jk_worker_t *jw = NULL;
     lb_worker_t *lb = NULL;
-    worker_record_t *wr = NULL;
+    lb_sub_worker_t *wr = NULL;
+    ajp_worker_t *aw = NULL;
 
     JK_TRACE_ENTER(l);
     fetch_worker_and_sub_worker(p, "resetting", &worker, &sub_worker, l);
@@ -2858,54 +3766,92 @@
         JK_TRACE_EXIT(l);
         return JK_FALSE;
     }
-    /* XXX Until now, we only have something to reset for lb workers or their members */
-    if (check_valid_lb(s, p, jw, worker, &lb, 0, l) == JK_FALSE) {
-        JK_TRACE_EXIT(l);
-        return JK_FALSE;
-    }
 
-    if (!sub_worker || !sub_worker[0]) {
-        lb->s->max_busy = 0;
-        for (i = 0; i < lb->num_of_workers; i++) {
-            wr = &(lb->lb_workers[i]);
-            wr->s->client_errors    = 0;
-            wr->s->reply_timeouts   = 0;
-            wr->s->elected          = 0;
+    if (jw->type == JK_LB_WORKER_TYPE) {
+        if (check_valid_lb(s, p, jw, worker, &lb, 0, l) == JK_FALSE) {
+            JK_TRACE_EXIT(l);
+            return JK_FALSE;
+        }
+    
+        if (!sub_worker || !sub_worker[0]) {
+            if (JK_IS_DEBUG_LEVEL(l))
+                jk_log(l, JK_LOG_DEBUG,
+                       "Status worker '%s' %s lb worker '%s' with all sub workers",
+                       w->name, "resetting", lb->name);
+            lb->s->max_busy = 0;
+            for (i = 0; i < lb->num_of_workers; i++) {
+                wr = &(lb->lb_workers[i]);
+                aw = (ajp_worker_t *)wr->worker->worker_private;
+                wr->s->state            = JK_LB_STATE_IDLE;
+                wr->s->elected_snapshot = 0;
+                wr->s->error_time       = 0;
+                wr->s->errors           = 0;
+                wr->s->lb_value         = 0;
+                aw->s->used             = 0;
+                aw->s->client_errors    = 0;
+                aw->s->reply_timeouts   = 0;
+                aw->s->transferred      = 0;
+                aw->s->readed           = 0;
+                aw->s->max_busy         = 0;
+            }
+            JK_TRACE_EXIT(l);
+            return JK_TRUE;
+        }
+        else  {
+            if(search_sub_worker(s, p, jw, worker, &wr, sub_worker, l) == JK_FALSE) {
+                JK_TRACE_EXIT(l);
+                return JK_FALSE;
+            }
+            if (JK_IS_DEBUG_LEVEL(l))
+                jk_log(l, JK_LOG_DEBUG,
+                       "Status worker '%s' %s lb worker '%s' sub worker '%s'",
+                       w->name, "resetting", lb->name, wr->name);
+            aw = (ajp_worker_t *)wr->worker->worker_private;
+            wr->s->state            = JK_LB_STATE_IDLE;
             wr->s->elected_snapshot = 0;
             wr->s->error_time       = 0;
             wr->s->errors           = 0;
             wr->s->lb_value         = 0;
-            wr->s->max_busy         = 0;
-            wr->s->recoveries       = 0;
-            wr->s->recovery_errors  = 0;
-            wr->s->readed           = 0;
-            wr->s->transferred      = 0;
-            wr->s->state            = JK_LB_STATE_IDLE;
+            aw->s->used             = 0;
+            aw->s->client_errors    = 0;
+            aw->s->reply_timeouts   = 0;
+            aw->s->transferred      = 0;
+            aw->s->readed           = 0;
+            aw->s->max_busy         = 0;
+            JK_TRACE_EXIT(l);
+            return JK_TRUE;
         }
-        JK_TRACE_EXIT(l);
-        return JK_TRUE;
     }
-    else  {
-        if(search_sub_worker(s, p, jw, worker, &wr, sub_worker, l) == JK_FALSE) {
+    else if (jw->type == JK_AJP13_WORKER_TYPE ||
+             jw->type == JK_AJP14_WORKER_TYPE) {
+        ajp_worker_t *aw = (ajp_worker_t *)jw->worker_private;
+        if (aw) {
+            if (JK_IS_DEBUG_LEVEL(l))
+                jk_log(l, JK_LOG_DEBUG,
+                       "Status worker '%s' %s ajp worker '%s'",
+                       w->name, "resetting", aw->name);
+            aw->s->errors           = 0;
+            aw->s->used             = 0;
+            aw->s->client_errors    = 0;
+            aw->s->reply_timeouts   = 0;
+            aw->s->transferred      = 0;
+            aw->s->readed           = 0;
+            aw->s->max_busy         = 0;
             JK_TRACE_EXIT(l);
-            return JK_FALSE;
+            return JK_TRUE;
         }
-        wr->s->client_errors    = 0;
-        wr->s->reply_timeouts   = 0;
-        wr->s->elected          = 0;
-        wr->s->elected_snapshot = 0;
-        wr->s->error_time       = 0;
-        wr->s->errors           = 0;
-        wr->s->lb_value         = 0;
-        wr->s->max_busy         = 0;
-        wr->s->recoveries       = 0;
-        wr->s->recovery_errors  = 0;
-        wr->s->readed           = 0;
-        wr->s->transferred      = 0;
-        wr->s->state            = JK_LB_STATE_IDLE;
-        JK_TRACE_EXIT(l);
-        return JK_TRUE;
+        else {
+            jk_log(l, JK_LOG_WARNING,
+                   "Status worker '%s' aw worker is (null)",
+                   w->name);
+        }
     }
+    else {
+        if (JK_IS_DEBUG_LEVEL(l))
+            jk_log(l, JK_LOG_DEBUG,
+                   "Status worker '%s' worker type not implemented",
+                   w->name);
+    }
     JK_TRACE_EXIT(l);
     return JK_FALSE;
 }
@@ -2917,7 +3863,8 @@
     const char *worker;
     const char *sub_worker;
     jk_worker_t *jw = NULL;
-    worker_record_t *wr = NULL;
+    lb_sub_worker_t *wr = NULL;
+    ajp_worker_t *aw = NULL;
     status_worker_t *w = p->worker;
 
     JK_TRACE_ENTER(l);
@@ -2932,6 +3879,7 @@
         return JK_FALSE;
     }
 
+    aw = (ajp_worker_t *)wr->worker->worker_private;
     if (wr->s->state == JK_LB_STATE_ERROR) {
         lb_worker_t *lb = NULL;
 
@@ -2953,7 +3901,7 @@
             wr->s->lb_value = curmax;
         }
 
-        wr->s->reply_timeouts = 0;
+        aw->s->reply_timeouts = 0;
         wr->s->state = JK_LB_STATE_RECOVER;
         jk_log(l, JK_LOG_INFO,
                "Status worker '%s' marked worker '%s' sub worker '%s' for recovery",
@@ -2969,11 +3917,75 @@
     return JK_FALSE;
 }
 
+static int dump_config(jk_ws_service_t *s,
+                       status_endpoint_t *p,
+                       int mime, jk_logger_t *l)
+{
+    status_worker_t *w = p->worker;
+    jk_worker_env_t *we = w->we;
+    jk_map_t *init_data = we->init_data;
+
+    JK_TRACE_ENTER(l);
+
+    if (init_data) {
+        int l = jk_map_size(init_data);
+        int i;
+        if (mime == JK_STATUS_MIME_HTML) {
+            jk_puts(s, "<hr/><h2>Configuration Data</h2><hr/>\n");
+            jk_puts(s, "This dump does not include any changes applied by the status worker\n");
+            jk_puts(s, "to the configuration after the initial startup\n");
+            jk_puts(s, "<PRE>\n");
+        }
+        else if (mime == JK_STATUS_MIME_XML) {
+            jk_print_xml_start_elt(s, w, 2, 0, "configuration");
+        }
+        else if (mime == JK_STATUS_MIME_TXT) {
+            jk_puts(s, "Configuration:\n");
+        }
+        for (i=0;i<l;i++) {
+            const char *name = jk_map_name_at(init_data, i);
+            if (name) {
+                const char *value = jk_map_value_at(init_data, i);
+                if (!value)
+                    value = "(null)";
+                if (mime == JK_STATUS_MIME_HTML ||
+                    mime == JK_STATUS_MIME_PROP ||
+                    mime == JK_STATUS_MIME_TXT) {
+                    jk_putv(s, name, "=", value, "\n", NULL);
+                }
+                else if (mime == JK_STATUS_MIME_XML) {
+                     jk_print_xml_att_string(s, 4, name, value);
+                }
+            }
+        }
+        if (mime == JK_STATUS_MIME_HTML) {
+            jk_puts(s, "</PRE>\n");
+        }
+        else if (mime == JK_STATUS_MIME_XML) {
+            jk_print_xml_stop_elt(s, 2, 1);
+        }
+    }
+    else {
+        JK_TRACE_EXIT(l);
+        return JK_FALSE;
+    }
+
+    JK_TRACE_EXIT(l);
+    return JK_TRUE;
+}
+
+/*
+ * Return values of service() method for status worker:
+ * return value  is_error              reason
+ * JK_FALSE      JK_HTTP_SERVER_ERROR  Invalid parameters (null values)
+ * JK_TRUE       JK_HTTP_OK            All other cases
+ */
 static int JK_METHOD service(jk_endpoint_t *e,
                              jk_ws_service_t *s,
                              jk_logger_t *l, int *is_error)
 {
     int cmd;
+    jk_uint32_t cmd_props;
     int mime;
     int refresh;
     int read_only = 0;
@@ -3029,6 +4041,7 @@
     }
     status_get_string(p, JK_STATUS_ARG_CMD, NULL, &arg, l);
     cmd = status_cmd_int(arg);
+    cmd_props = status_cmd_props(cmd);
     status_get_string(p, JK_STATUS_ARG_MIME, NULL, &arg, l);
     mime = status_mime_int(arg);
     refresh = status_get_int(p, JK_STATUS_ARG_REFRESH, 0, l);
@@ -3101,11 +4114,7 @@
     }
 
     if (!err) {
-        if (read_only &&
-            (cmd == JK_STATUS_CMD_EDIT ||
-            cmd == JK_STATUS_CMD_UPDATE ||
-            cmd == JK_STATUS_CMD_RESET ||
-            cmd == JK_STATUS_CMD_RECOVER)) {
+        if (read_only && !(cmd_props & JK_STATUS_CMD_PROP_READONLY)) {
             err = "This command is not allowed in read only mode.";
         }
     }
@@ -3117,14 +4126,30 @@
         else if (mime == JK_STATUS_MIME_UNKNOWN) {
             err = "Invalid mime type.";
         }
-        else if (cmd != JK_STATUS_CMD_LIST &&
-                 cmd != JK_STATUS_CMD_VERSION &&
+        else if (cmd_props & JK_STATUS_CMD_PROP_CHECK_WORKER &&
                  (check_worker(s, p, l) != JK_TRUE)) {
             err = p->msg;
         }
     }
 
     if (!err) {
+        char buf_time[JK_STATUS_TIME_BUF_SZ];
+        char buf_tz[JK_STATUS_TIME_BUF_SZ];
+        int rc_time;
+        time_t clock = time(NULL);
+        long unix_seconds = (long)clock;
+#ifdef _MT_CODE_PTHREAD
+        struct tm res;
+        struct tm *tms = localtime_r(&clock, &res);
+#else
+        struct tm *tms = localtime(&clock);
+#endif
+        if (mime == JK_STATUS_MIME_HTML)
+            rc_time = strftime(buf_time, JK_STATUS_TIME_BUF_SZ, JK_STATUS_TIME_FMT_HTML, tms);
+        else {
+            rc_time = strftime(buf_time, JK_STATUS_TIME_BUF_SZ, JK_STATUS_TIME_FMT_TEXT, tms);
+        }
+        strftime(buf_tz, JK_STATUS_TIME_BUF_SZ, JK_STATUS_TIME_FMT_TZ, tms);
         if (cmd == JK_STATUS_CMD_UPDATE) {
             /* lock shared memory */
             jk_shm_lock();
@@ -3191,9 +4216,14 @@
                 jk_print_xml_att_string(s, 2, "name", s->server_name);
                 jk_print_xml_att_int(s, 2, "port", s->server_port);
                 jk_print_xml_stop_elt(s, 0, 1);
-                if ((cmd == JK_STATUS_CMD_LIST) ||
-                    (cmd == JK_STATUS_CMD_SHOW) ||
-                    (cmd == JK_STATUS_CMD_VERSION)) {
+                if (cmd_props & JK_STATUS_CMD_PROP_HEAD) {
+                    if (rc_time > 0 ) {
+                        jk_print_xml_start_elt(s, w, 0, 0, "time");
+                        jk_print_xml_att_string(s, 2, "datetime", buf_time);
+                        jk_print_xml_att_string(s, 2, "tz", buf_tz);
+                        jk_print_xml_att_long(s, 2, "unix", unix_seconds);
+                        jk_print_xml_stop_elt(s, 0, 1);
+                    }
                     jk_print_xml_start_elt(s, w, 0, 0, "software");
                     jk_print_xml_att_string(s, 2, "web_server", s->server_software);
                     jk_print_xml_att_string(s, 2, "jk_version", JK_EXPOSED_VERSION);
@@ -3217,9 +4247,14 @@
                 jk_printf(s, " name=%s", s->server_name);
                 jk_printf(s, " port=%d", s->server_port);
                 jk_puts(s, "\n");
-                if ((cmd == JK_STATUS_CMD_LIST) ||
-                    (cmd == JK_STATUS_CMD_SHOW) ||
-                    (cmd == JK_STATUS_CMD_VERSION)) {
+                if (cmd_props & JK_STATUS_CMD_PROP_HEAD) {
+                    if (rc_time > 0) {
+                        jk_puts(s, "Time:");
+                        jk_printf(s, " datetime=%s", buf_time);
+                        jk_printf(s, " tz=%s", buf_tz);
+                        jk_printf(s, " unix=%ld", unix_seconds);
+                        jk_puts(s, "\n");
+                    }
                     jk_puts(s, "Software:");
                     jk_printf(s, " web_server=\"%s\"", s->server_software);
                     jk_printf(s, " jk_version=%s", JK_EXPOSED_VERSION);
@@ -3241,9 +4276,12 @@
             else if (mime == JK_STATUS_MIME_PROP) {
                 jk_print_prop_att_string(s, w, NULL, "server_name", s->server_name);
                 jk_print_prop_att_int(s, w, NULL, "server_port", s->server_port);
-                if ((cmd == JK_STATUS_CMD_LIST) ||
-                    (cmd == JK_STATUS_CMD_SHOW) ||
-                    (cmd == JK_STATUS_CMD_VERSION)) {
+                if (cmd_props & JK_STATUS_CMD_PROP_HEAD) {
+                    if (rc_time > 0) {
+                        jk_print_prop_att_string(s, w, NULL, "time_datetime", buf_time);
+                        jk_print_prop_att_string(s, w, NULL, "time_tz", buf_tz);
+                        jk_print_prop_att_long(s, w, NULL, "time_unix", unix_seconds);
+                    }
                     jk_print_prop_att_string(s, w, NULL, "web_server", s->server_software);
                     jk_print_prop_att_string(s, w, NULL, "jk_version", JK_EXPOSED_VERSION);
                 }
@@ -3261,11 +4299,10 @@
                 }
             }
             else if (mime == JK_STATUS_MIME_HTML) {
-                if ((cmd == JK_STATUS_CMD_LIST ||
-                    cmd == JK_STATUS_CMD_SHOW) &&
+                if (cmd_props & JK_STATUS_CMD_PROP_REFRESH &&
                     refresh > 0) {
                     jk_printf(s, "\n<meta http-equiv=\"Refresh\" content=\"%d;url=%s?%s\">",
-                          refresh, s->req_uri, s->query_string);
+                          refresh, s->req_uri, p->query_string);
                 }
                 if (w->css) {
                     jk_putv(s, "\n<link rel=\"stylesheet\" type=\"text/css\" href=\"",
@@ -3279,19 +4316,23 @@
                     jk_puts(s, " (read only)");
                 }
                 jk_puts(s, "</h1>\n\n");
-                if ((cmd == JK_STATUS_CMD_LIST) ||
-                    (cmd == JK_STATUS_CMD_SHOW) ||
-                    (cmd == JK_STATUS_CMD_VERSION)) {
+                if (cmd_props & JK_STATUS_CMD_PROP_HEAD) {
                     jk_putv(s, "<table><tr><td>Server Version:</td><td>",
-                            s->server_software, "</td></tr>\n", NULL);
+                            s->server_software, "</td><td>&nbsp;&nbsp;&nbsp;</td><td>", NULL);
+                    if (rc_time > 0) {
+                        jk_putv(s, "Server Time:</td><td>", buf_time, NULL);
+                    }
+                    jk_puts(s, "</td></tr>\n");
                     jk_putv(s, "<tr><td>JK Version:</td><td>",
-                            JK_EXPOSED_VERSION, "</td></tr></table>\n", NULL);
-                    jk_puts(s, "<hr/>\n");
+                            JK_EXPOSED_VERSION, "</td><td></td><td>", NULL);
+                    jk_printf(s, "Unix Seconds:</td><td>%d", unix_seconds);
+                    jk_puts(s, "</td></tr></table>\n<hr/>\n");
                 }
-                if (cmd == JK_STATUS_CMD_LIST ||
-                    cmd == JK_STATUS_CMD_SHOW) {
+                jk_puts(s, "<table><tbody valign=\"baseline\"><tr>\n");
+                if (cmd_props & JK_STATUS_CMD_PROP_REFRESH) {
+                    jk_puts(s, "<td>");
                     if (refresh > 0) {
-                        const char *str = s->query_string;
+                        const char *str = p->query_string;
                         char *buf = jk_pool_alloc(s->pool, sizeof(char *) * (strlen(str)+1));
                         int result = 0;
                         size_t scan = 0;
@@ -3325,10 +4366,10 @@
                         jk_putv(s, "[<a href=\"", s->req_uri, NULL);
                         if (buf && buf[0])
                             jk_putv(s, "?", buf, NULL);
-                        jk_puts(s, "\">Stop auto refresh</a>]&nbsp;&nbsp;");
+                        jk_puts(s, "\">Stop auto refresh</a>]");
                     }
                     else {
-                        status_start_form(s, p, "GET", JK_STATUS_CMD_UNKNOWN, l);
+                        status_start_form(s, p, "get", JK_STATUS_CMD_UNKNOWN, JK_STATUS_ARG_REFRESH, l);
                         jk_puts(s, "<input type=\"submit\" value=\"Start auto refresh\"/>\n");
                         jk_putv(s, "(every ",
                                 "<input name=\"", JK_STATUS_ARG_REFRESH,
@@ -3337,16 +4378,28 @@
                                 "seconds)", NULL);
                         jk_puts(s, "</form>\n");
                     }
+                    jk_puts(s, "</td><td>&nbsp;&nbsp;|&nbsp;&nbsp;</td>\n");
                 }
-                if (cmd == JK_STATUS_CMD_SHOW ||
-                    cmd == JK_STATUS_CMD_EDIT ||
-                    cmd == JK_STATUS_CMD_VERSION) {
+                if (cmd_props & JK_STATUS_CMD_PROP_FMT) {
+                    jk_puts(s, "<td>\n");
+                    status_start_form(s, p, "get", JK_STATUS_CMD_UNKNOWN, JK_STATUS_ARG_MIME, l);
+                    jk_puts(s, "<input type=\"submit\" value=\"Change format\"/>\n");
+                    jk_putv(s, "<select name=\"", JK_STATUS_ARG_MIME, "\" size=\"1\">", NULL);
+                    jk_putv(s, "<option value=\"", JK_STATUS_MIME_TEXT_XML, "\">XML</option>", NULL);
+                    jk_putv(s, "<option value=\"", JK_STATUS_MIME_TEXT_PROP, "\">Properties</option>", NULL);
+                    jk_putv(s, "<option value=\"", JK_STATUS_MIME_TEXT_TXT, "\">Text</option>", NULL);
+                    jk_puts(s, "</select></form>\n");
+                    jk_puts(s, "</td>\n");
+                }
+                jk_puts(s, "</tr></table>\n");
+                jk_puts(s, "<table><tbody valign=\"baseline\"><tr>\n");
+                if (cmd_props & JK_STATUS_CMD_PROP_BACK_LINK) {
                     int from;
+                    jk_puts(s, "<td>\n");
                     status_get_string(p, JK_STATUS_ARG_FROM, NULL, &arg, l);
                     from = status_cmd_int(arg);
                     jk_puts(s, "[");
-                    if (cmd == JK_STATUS_CMD_SHOW ||
-                        cmd == JK_STATUS_CMD_VERSION ||
+                    if (cmd_props & JK_STATUS_CMD_PROP_BACK_LIST ||
                         from == JK_STATUS_CMD_LIST) {
                         status_write_uri(s, p, "Back to worker list", JK_STATUS_CMD_LIST, JK_STATUS_MIME_UNKNOWN,
                                          "", "", 0, 0, "", l);
@@ -3356,22 +4409,10 @@
                                          NULL, NULL, 0, 0, "", l);
                     }
                     jk_puts(s, "]&nbsp;&nbsp;");
+                    jk_puts(s, "</td>\n");
                 }
-                if (cmd == JK_STATUS_CMD_LIST ||
-                    cmd == JK_STATUS_CMD_SHOW ||
-                    cmd == JK_STATUS_CMD_VERSION) {
-                    jk_puts(s, "[Change&nbsp;Format: ");
-                    status_write_uri(s, p, "XML", 0, JK_STATUS_MIME_XML,
-                                     NULL, NULL, 0, 0, NULL, l);
-                    jk_puts(s, "&nbsp;|&nbsp;");
-                    status_write_uri(s, p, "Property", 0, JK_STATUS_MIME_PROP,
-                                     NULL, NULL, 0, 0, NULL, l);
-                    jk_puts(s, "&nbsp;|&nbsp;");
-                    status_write_uri(s, p, "Text", 0, JK_STATUS_MIME_TXT,
-                                     NULL, NULL, 0, 0, NULL, l);
-                    jk_puts(s, "]&nbsp;&nbsp;");
-                }
-                if (cmd == JK_STATUS_CMD_LIST || cmd == JK_STATUS_CMD_SHOW) {
+                if (cmd_props & JK_STATUS_CMD_PROP_SWITCH_RO) {
+                    jk_puts(s, "<td>\n");
                     if (!w->read_only) {
                         jk_puts(s, "[");
                         if (read_only) {
@@ -3384,17 +4425,28 @@
                         }
                         jk_puts(s, "]&nbsp;&nbsp;\n");
                     }
+                    jk_puts(s, "</td>\n");
                 }
-                if (cmd == JK_STATUS_CMD_LIST || cmd == JK_STATUS_CMD_SHOW) {
+                if (cmd_props & JK_STATUS_CMD_PROP_DUMP_LINK) {
+                    jk_puts(s, "<td>\n");
                     jk_puts(s, "[");
-                    if (cmd == JK_STATUS_CMD_LIST)
-                        jk_puts(s, "<b>S</b>=Show only this worker");
-                    if (!read_only && cmd == JK_STATUS_CMD_LIST)
-                        jk_puts(s, ", ");
-                    if (!read_only)
-                        jk_puts(s, "<b>E</b>=Edit worker, <b>R</b>=Reset worker state, <b>T</b>=Try worker recovery");
-                    jk_puts(s, "]\n");
+                    status_write_uri(s, p, "Dump", JK_STATUS_CMD_DUMP, JK_STATUS_MIME_UNKNOWN,
+                                     NULL, NULL, 0, 0, NULL, l);
+                    jk_puts(s, "]&nbsp;&nbsp;\n");
+                    jk_puts(s, "</td>\n");
                 }
+                if (cmd_props & JK_STATUS_CMD_PROP_LINK_HELP &&
+                    (cmd == JK_STATUS_CMD_LIST || !read_only)) {
+                    jk_puts(s, "<td>\n");
+                    jk_puts(s, "[");
+                    if (cmd == JK_STATUS_CMD_LIST) {
+                        jk_puts(s, "<b>S</b>=Show only this worker, ");
+                    }
+                    jk_puts(s, "<b>E</b>=Edit worker, <b>R</b>=Reset worker state, <b>T</b>=Try worker recovery");
+                    jk_puts(s, "]<br/>\n");
+                    jk_puts(s, "</td>\n");
+                }
+                jk_puts(s, "</tr></table>\n");
                 if (cmd == JK_STATUS_CMD_LIST) {
                     /* Step 2: Display configuration */
                     if (list_workers(s, p, l) != JK_TRUE) {
@@ -3414,6 +4466,14 @@
                     }
                 }
             }
+            if (cmd == JK_STATUS_CMD_DUMP) {
+                if (dump_config(s, p, mime, l) == JK_FALSE) {
+                    err = "Dumping configuration failed";
+                }
+            }
+            if (cmd_props & JK_STATUS_CMD_PROP_LEGEND) {
+                display_legend(s, p, l);
+            }
         }
     }
     if (err) {
@@ -3485,6 +4545,7 @@
     if (e && *e && (*e)->endpoint_private) {
         status_endpoint_t *p = (*e)->endpoint_private;
 
+        jk_map_free(&(p->req_params));
         free(p);
         *e = NULL;
         JK_TRACE_EXIT(l);
@@ -3669,7 +4730,6 @@
         private_data->worker.init = init;
         private_data->worker.get_endpoint = get_endpoint;
         private_data->worker.destroy = destroy;
-        private_data->worker.retries = 1;
 
         *w = &private_data->worker;
         JK_TRACE_EXIT(l);

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_uri_worker_map.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_uri_worker_map.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_uri_worker_map.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -20,7 +20,7 @@
  *                                                                         *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
  * Author:      Mladen Turk <mturk at apache.org>                             *
- * Version:     $Revision: 562174 $                                          *
+ * Version:     $Revision: 614517 $                                          *
  ***************************************************************************/
 
 #include "jk_pool.h"
@@ -28,6 +28,8 @@
 #include "jk_map.h"
 #include "jk_mt.h"
 #include "jk_uri_worker_map.h"
+#include "jk_worker.h"
+#include "jk_lb_worker.h"
 
 #ifdef WIN32
 #define JK_STRCMP   strcasecmp
@@ -37,7 +39,15 @@
 #define JK_STRNCMP  strncmp
 #endif
 
+#define JK_UWMAP_EXTENSION_REPLY_TIMEOUT  "reply_timeout="
+#define JK_UWMAP_EXTENSION_ACTIVE         "active="
+#define JK_UWMAP_EXTENSION_DISABLED       "disabled="
+#define JK_UWMAP_EXTENSION_STOPPED        "stopped="
+#define JK_UWMAP_EXTENSION_FAIL_ON_STATUS "fail_on_status="
 
+#define IND_THIS(x)                        ((x)[uw_map->index])
+#define IND_NEXT(x)                        ((x)[(uw_map->index+1) % 2])
+
 static const char *uri_worker_map_source_type[] = {
     "unknown",
     SOURCE_TYPE_TEXT_WORKERDEF,
@@ -140,7 +150,7 @@
 {
 
    /* Sort remaining args using Quicksort algorithm: */
-   qsort((void *)uw_map->maps, uw_map->size,
+   qsort((void *)IND_NEXT(uw_map->maps), IND_NEXT(uw_map->size),
          sizeof(uri_worker_record_t *), worker_compare );
 
 }
@@ -176,16 +186,20 @@
     return (str[x] != '\0');
 }
 
-int uri_worker_map_alloc(jk_uri_worker_map_t **uw_map,
+int uri_worker_map_alloc(jk_uri_worker_map_t **uw_map_p,
                          jk_map_t *init_data, jk_logger_t *l)
 {
+    int i;
+
     JK_TRACE_ENTER(l);
 
-    if (uw_map) {
+    if (uw_map_p) {
         int rc;
-        *uw_map = (jk_uri_worker_map_t *)calloc(1, sizeof(jk_uri_worker_map_t));
+        jk_uri_worker_map_t *uw_map;
+        *uw_map_p = (jk_uri_worker_map_t *)calloc(1, sizeof(jk_uri_worker_map_t));
+        uw_map = *uw_map_p;
 
-        JK_INIT_CS(&((*uw_map)->cs), rc);
+        JK_INIT_CS(&(uw_map->cs), rc);
         if (rc == JK_FALSE) {
             jk_log(l, JK_LOG_ERROR,
                    "creating thread lock (errno=%d)",
@@ -193,8 +207,26 @@
             JK_TRACE_EXIT(l);
             return JK_FALSE;
         }
+
+        jk_open_pool(&(uw_map->p),
+                     uw_map->buf, sizeof(jk_pool_atom_t) * BIG_POOL_SIZE);
+        for(i=0;i<=1;i++) {
+            jk_open_pool(&(uw_map->p_dyn[i]),
+                         uw_map->buf_dyn[i], sizeof(jk_pool_atom_t) * BIG_POOL_SIZE);
+            uw_map->size[i] = 0;
+            uw_map->nosize[i] = 0;
+            uw_map->capacity[i] = 0;
+            uw_map->maps[i] = NULL;
+        }
+        uw_map->index = 0;
+        uw_map->fname = NULL;
+        uw_map->reject_unsafe = 0;
+        uw_map->reload = JK_URIMAP_DEF_RELOAD;
+        uw_map->modified = 0;
+        uw_map->checked = 0;
+
         if (init_data)
-            rc = uri_worker_map_open(*uw_map, init_data, l);
+            rc = uri_worker_map_open(uw_map, init_data, l);
         JK_TRACE_EXIT(l);
         return rc;
     }
@@ -212,6 +244,8 @@
     if (uw_map) {
         int i;
         JK_DELETE_CS(&(uw_map->cs), i);
+        jk_close_pool(&uw_map->p_dyn[0]);
+        jk_close_pool(&uw_map->p_dyn[1]);
         jk_close_pool(&uw_map->p);
         JK_TRACE_EXIT(l);
         return JK_TRUE;
@@ -248,24 +282,24 @@
 
 static int uri_worker_map_realloc(jk_uri_worker_map_t *uw_map)
 {
-    if (uw_map->size == uw_map->capacity) {
+    if (IND_NEXT(uw_map->size) == IND_NEXT(uw_map->capacity)) {
         uri_worker_record_t **uwr;
-        int capacity = uw_map->capacity + UW_INC_SIZE;
+        int capacity = IND_NEXT(uw_map->capacity) + UW_INC_SIZE;
 
         uwr =
-            (uri_worker_record_t **) jk_pool_alloc(&uw_map->p,
+            (uri_worker_record_t **) jk_pool_alloc(&IND_NEXT(uw_map->p_dyn),
                                                    sizeof(uri_worker_record_t
                                                           *) * capacity);
 
         if (!uwr)
             return JK_FALSE;
 
-        if (uw_map->capacity && uw_map->maps)
-            memcpy(uwr, uw_map->maps,
-                   sizeof(uri_worker_record_t *) * uw_map->capacity);
+        if (IND_NEXT(uw_map->capacity) && IND_NEXT(uw_map->maps))
+            memcpy(uwr, IND_NEXT(uw_map->maps),
+                   sizeof(uri_worker_record_t *) * IND_NEXT(uw_map->capacity));
 
-        uw_map->maps = uwr;
-        uw_map->capacity = capacity;
+        IND_NEXT(uw_map->maps) = uwr;
+        IND_NEXT(uw_map->capacity) = capacity;
     }
 
     return JK_TRUE;
@@ -277,39 +311,250 @@
  */
 
 static int uri_worker_map_clear(jk_uri_worker_map_t *uw_map,
-                         unsigned int source_type, jk_logger_t *l)
+                                jk_logger_t *l)
 {
     uri_worker_record_t *uwr = NULL;
     unsigned int i;
-    unsigned int j;
+    unsigned int new_size = 0;
+    unsigned int new_nosize = 0;
 
     JK_TRACE_ENTER(l);
 
-    for (i = 0; i < uw_map->size; i++) {
-        uwr = uw_map->maps[i];
-        if (uwr->source_type == source_type) {
-            jk_log(l, JK_LOG_DEBUG,
-                   "deleting map rule '%s=%s' source '%s'",
-                   uwr->context, uwr->worker_name, uri_worker_map_get_source(uwr, l));
-            for (j = i; j < uw_map->size-1; j++)
-                uw_map->maps[j] = uw_map->maps[j+1];
-            uw_map->size--;
-            i--;
+    IND_NEXT(uw_map->maps) =
+            (uri_worker_record_t **) jk_pool_alloc(&(IND_NEXT(uw_map->p_dyn)),
+                                                   sizeof(uri_worker_record_t
+                                                          *) * IND_THIS(uw_map->size));
+    IND_NEXT(uw_map->capacity) = IND_THIS(uw_map->size);
+    IND_NEXT(uw_map->size) = 0;
+    IND_NEXT(uw_map->nosize) = 0;
+    for (i = 0; i < IND_THIS(uw_map->size); i++) {
+        uwr = IND_THIS(uw_map->maps)[i];
+        if (uwr->source_type == SOURCE_TYPE_URIMAP) {
+            if (JK_IS_DEBUG_LEVEL(l))
+                jk_log(l, JK_LOG_DEBUG,
+                       "deleting map rule '%s=%s' source '%s'",
+                       uwr->context, uwr->worker_name, uri_worker_map_get_source(uwr, l));
         }
+        else {
+            IND_NEXT(uw_map->maps)[new_size] = uwr;
+            new_size++;
+            if (uwr->match_type & MATCH_TYPE_NO_MATCH)
+                new_nosize++;
+        }
     }
+    IND_NEXT(uw_map->size) = new_size;
+    IND_NEXT(uw_map->nosize) = new_nosize;
 
     JK_TRACE_EXIT(l);
     return JK_TRUE;
 }
 
+static void extract_activation(jk_uri_worker_map_t *uw_map,
+                               uri_worker_record_t *uwr,
+                               lb_worker_t *lb,
+                               int *activations,
+                               char *workers,
+                               int activation,
+                               jk_logger_t *l)
+{
+    unsigned int i;
+    jk_pool_t *p;
+    char *worker;
+#ifdef _MT_CODE_PTHREAD
+    char *lasts;
+#endif
 
+    JK_TRACE_ENTER(l);
 
+    if (uwr->source_type == SOURCE_TYPE_URIMAP)
+        p = &IND_NEXT(uw_map->p_dyn);
+    else
+        p = &uw_map->p;
+    worker = jk_pool_strdup(p, workers);
+
+#ifdef _MT_CODE_PTHREAD
+    for (worker = strtok_r(worker, ", ", &lasts);
+         worker; worker = strtok_r(NULL, ", ", &lasts)) {
+#else
+    for (worker = strtok(worker, ", "); worker; worker = strtok(NULL, ", ")) {
+#endif
+        for (i=0; i<lb->num_of_workers; i++) {
+            if (!strcmp(worker, lb->lb_workers[i].name)) {
+                if (activations[i] != JK_LB_ACTIVATION_UNSET)
+                    jk_log(l, JK_LOG_WARNING,
+                           "inconsistent activation overwrite for member %s "
+                           "of load balancer %s: '%s' replaced by '%s'",
+                           worker, lb->name,
+                           jk_lb_get_activation_direct(activations[i], l),
+                           jk_lb_get_activation_direct(activation, l));
+                activations[i] = activation;
+                break;
+            }
+        }
+        if (i >= lb->num_of_workers)
+            jk_log(l, JK_LOG_WARNING,
+                   "could not find member %s of load balancer %s",
+                   worker, lb->name);
+    }
+
+    JK_TRACE_EXIT(l);
+
+}
+
+static void extract_fail_on_status(jk_uri_worker_map_t *uw_map,
+                                   uri_worker_record_t *uwr,
+                                   jk_logger_t *l)
+{
+    unsigned int i;
+    int j;
+    int cnt = 1;
+    jk_pool_t *p;
+    char *status;
+#ifdef _MT_CODE_PTHREAD
+    char *lasts;
+#endif
+
+    JK_TRACE_ENTER(l);
+
+    for (i=0; i<strlen(uwr->extensions.fail_on_status_str); i++) {
+        if (uwr->extensions.fail_on_status_str[i] == ',' ||
+            uwr->extensions.fail_on_status_str[i] == ' ')
+            cnt++;
+    }
+    uwr->extensions.fail_on_status_size = cnt;
+
+    if (uwr->source_type == SOURCE_TYPE_URIMAP)
+        p = &IND_NEXT(uw_map->p_dyn);
+    else
+        p = &uw_map->p;
+    status = jk_pool_strdup(p, uwr->extensions.fail_on_status_str);
+    uwr->extensions.fail_on_status = (int *)jk_pool_alloc(p,
+                                            uwr->extensions.fail_on_status_size * sizeof(int));
+    if (!uwr->extensions.fail_on_status) {
+        jk_log(l, JK_LOG_ERROR,
+               "can't alloc extensions fail_on_status list");
+        JK_TRACE_EXIT(l);
+        return;
+    } else if (JK_IS_DEBUG_LEVEL(l))
+        jk_log(l, JK_LOG_DEBUG,
+               "Allocated fail_on_status array of size %d for worker %s",
+               uwr->extensions.fail_on_status_size, uwr->worker_name);
+
+
+    for (j=0; j<uwr->extensions.fail_on_status_size; j++) {
+        uwr->extensions.fail_on_status[j] = 0;
+    }
+
+    cnt = 0;
+#ifdef _MT_CODE_PTHREAD
+    for (status = strtok_r(status, ", ", &lasts);
+         status; status = strtok_r(NULL, "&", &lasts)) {
+#else
+    for (status = strtok(status, ", "); status; status = strtok(NULL, ", ")) {
+#endif
+        uwr->extensions.fail_on_status[cnt] = atoi(status);
+        cnt++;
+    }
+
+    JK_TRACE_EXIT(l);
+
+}
+
+void uri_worker_map_ext(jk_uri_worker_map_t *uw_map, jk_logger_t *l)
+{
+    unsigned int i;
+
+    JK_TRACE_ENTER(l);
+
+    for (i = 0; i < IND_NEXT(uw_map->size); i++) {
+        uri_worker_record_t *uwr = IND_NEXT(uw_map->maps)[i];
+        jk_worker_t *jw;
+        if(uwr->match_type & MATCH_TYPE_NO_MATCH)
+            continue;
+        jw = wc_get_worker_for_name(uwr->worker_name, l);
+        if(!jw) {
+            jk_log(l, JK_LOG_ERROR,
+                   "Could not find worker with name '%s' in uri map post processing.",
+                   uwr->worker_name);
+            continue;
+        }
+        if (JK_IS_DEBUG_LEVEL(l))
+            jk_log(l, JK_LOG_DEBUG,
+                   "Checking extension for worker %d: %s of type %s (%d)",
+                   i, uwr->worker_name, wc_get_name_for_type(jw->type,l), jw->type);
+
+        if (jw->type == JK_LB_WORKER_TYPE &&
+            (uwr->extensions.active || uwr->extensions.disabled || uwr->extensions.stopped)) {
+            int j;
+            lb_worker_t *lb = (lb_worker_t *)jw->worker_private;
+            jk_pool_t *p;
+            if (!uwr->extensions.activation) {
+                uwr->extensions.activation_size = lb->num_of_workers;
+                if (uwr->source_type == SOURCE_TYPE_URIMAP)
+                    p = &IND_NEXT(uw_map->p_dyn);
+                else
+                    p = &uw_map->p;
+                uwr->extensions.activation = (int *)jk_pool_alloc(p,
+                                                        uwr->extensions.activation_size * sizeof(int));
+                if (!uwr->extensions.activation) {
+                    jk_log(l, JK_LOG_ERROR,
+                           "can't alloc extensions activation list");
+                    continue;
+                } else if (JK_IS_DEBUG_LEVEL(l))
+                    jk_log(l, JK_LOG_DEBUG,
+                           "Allocated activations array of size %d for lb worker %s",
+                           uwr->extensions.activation_size, uwr->worker_name);
+                for (j=0; j<uwr->extensions.activation_size; j++) {
+                    uwr->extensions.activation[j] = JK_LB_ACTIVATION_UNSET;
+                }
+            }
+            if (uwr->extensions.active)
+                extract_activation(uw_map, uwr, lb, uwr->extensions.activation,
+                                   uwr->extensions.active, JK_LB_ACTIVATION_ACTIVE, l);
+            if (uwr->extensions.disabled)
+                extract_activation(uw_map, uwr, lb, uwr->extensions.activation,
+                                   uwr->extensions.disabled, JK_LB_ACTIVATION_DISABLED, l);
+            if (uwr->extensions.stopped)
+                extract_activation(uw_map, uwr, lb, uwr->extensions.activation,
+                                   uwr->extensions.stopped, JK_LB_ACTIVATION_STOPPED, l);
+        }
+        else if (uwr->extensions.active) {
+            jk_log(l, JK_LOG_WARNING,
+                   "Worker %s is not of type lb, activation extension "
+                   JK_UWMAP_EXTENSION_ACTIVE " for %s ignored",
+                   uwr->worker_name, uwr->extensions.active);
+        }
+        else if (uwr->extensions.disabled) {
+            jk_log(l, JK_LOG_WARNING,
+                   "Worker %s is not of type lb, activation extension "
+                   JK_UWMAP_EXTENSION_DISABLED " for %s ignored",
+                   uwr->worker_name, uwr->extensions.disabled);
+        }
+        else if (uwr->extensions.stopped) {
+            jk_log(l, JK_LOG_WARNING,
+                   "Worker %s is not of type lb, activation extension "
+                   JK_UWMAP_EXTENSION_STOPPED " for %s ignored",
+                   uwr->worker_name, uwr->extensions.stopped);
+        }
+        if (uwr->extensions.fail_on_status_str) {
+            extract_fail_on_status(uw_map, uwr, l);
+        }
+    }
+    uw_map->index = (uw_map->index + 1) % 2;
+    jk_reset_pool(&(IND_NEXT(uw_map->p_dyn)));
+
+    JK_TRACE_EXIT(l);
+    return;
+
+}
+
 int uri_worker_map_add(jk_uri_worker_map_t *uw_map,
                        const char *puri, const char *worker,
                        unsigned int source_type, jk_logger_t *l)
 {
     uri_worker_record_t *uwr = NULL;
     char *uri;
+    jk_pool_t *p;
     unsigned int match_type = 0;
 
     JK_TRACE_ENTER(l);
@@ -331,8 +576,12 @@
         JK_TRACE_EXIT(l);
         return JK_FALSE;
     }
-    uwr = (uri_worker_record_t *)jk_pool_alloc(&uw_map->p,
-                                    sizeof(uri_worker_record_t));
+    if (source_type == SOURCE_TYPE_URIMAP)
+        p = &IND_NEXT(uw_map->p_dyn);
+    else
+        p = &uw_map->p;
+
+    uwr = (uri_worker_record_t *)jk_pool_alloc(p, sizeof(uri_worker_record_t));
     if (!uwr) {
         jk_log(l, JK_LOG_ERROR,
                "can't alloc map entry");
@@ -340,7 +589,7 @@
         return JK_FALSE;
     }
 
-    uri = jk_pool_strdup(&uw_map->p, puri);
+    uri = jk_pool_strdup(p, puri);
     if (!uri || !worker) {
         jk_log(l, JK_LOG_ERROR,
                "can't alloc uri/worker strings");
@@ -349,11 +598,82 @@
     }
 
     if (*uri == '/') {
+        char *w;
+        char *param;
+#ifdef _MT_CODE_PTHREAD
+        char *lasts;
+#endif
+
+        w = jk_pool_strdup(p, worker);
+        uwr->extensions.reply_timeout = -1;
+        uwr->extensions.active = NULL;
+        uwr->extensions.disabled = NULL;
+        uwr->extensions.stopped = NULL;
+        uwr->extensions.activation_size = 0;
+        uwr->extensions.activation = NULL;
+        uwr->extensions.fail_on_status_size = 0;
+        uwr->extensions.fail_on_status = NULL;
+        uwr->extensions.fail_on_status_str = NULL;
+
+#ifdef _MT_CODE_PTHREAD
+        param = strtok_r(w, ";", &lasts);
+#else
+        param = strtok(w, ";");
+#endif
+        if (param) {
+#ifdef _MT_CODE_PTHREAD
+            for (param = strtok_r(NULL, ";", &lasts); param; param = strtok_r(NULL, ";", &lasts)) {
+#else
+            for (param = strtok(NULL, ";"); param; param = strtok(NULL, ";")) {
+#endif
+                if (!strncmp(param, JK_UWMAP_EXTENSION_REPLY_TIMEOUT, strlen(JK_UWMAP_EXTENSION_REPLY_TIMEOUT))) {
+                    uwr->extensions.reply_timeout = atoi(param + strlen(JK_UWMAP_EXTENSION_REPLY_TIMEOUT));
+                }
+                else if (!strncmp(param, JK_UWMAP_EXTENSION_ACTIVE, strlen(JK_UWMAP_EXTENSION_ACTIVE))) {
+                    if (uwr->extensions.active)
+                        jk_log(l, JK_LOG_WARNING,
+                               "extension '%s' in uri worker map only allowed once",
+                               JK_UWMAP_EXTENSION_ACTIVE);
+                    else
+                        uwr->extensions.active = param + strlen(JK_UWMAP_EXTENSION_ACTIVE);
+                }
+                else if (!strncmp(param, JK_UWMAP_EXTENSION_DISABLED, strlen(JK_UWMAP_EXTENSION_DISABLED))) {
+                    if (uwr->extensions.disabled)
+                        jk_log(l, JK_LOG_WARNING,
+                               "extension '%s' in uri worker map only allowed once",
+                               JK_UWMAP_EXTENSION_DISABLED);
+                    else
+                        uwr->extensions.disabled = param + strlen(JK_UWMAP_EXTENSION_DISABLED);
+                }
+                else if (!strncmp(param, JK_UWMAP_EXTENSION_STOPPED, strlen(JK_UWMAP_EXTENSION_STOPPED))) {
+                    if (uwr->extensions.stopped)
+                        jk_log(l, JK_LOG_WARNING,
+                               "extension '%s' in uri worker map only allowed once",
+                               JK_UWMAP_EXTENSION_STOPPED);
+                    else
+                        uwr->extensions.stopped = param + strlen(JK_UWMAP_EXTENSION_STOPPED);
+                }
+                else if (!strncmp(param, JK_UWMAP_EXTENSION_FAIL_ON_STATUS, strlen(JK_UWMAP_EXTENSION_FAIL_ON_STATUS))) {
+                    if (uwr->extensions.fail_on_status_str)
+                        jk_log(l, JK_LOG_WARNING,
+                               "extension '%s' in uri worker map only allowed once",
+                               JK_UWMAP_EXTENSION_ACTIVE);
+                    else
+                        uwr->extensions.fail_on_status_str = param + strlen(JK_UWMAP_EXTENSION_FAIL_ON_STATUS);
+                }
+                else {
+                    jk_log(l, JK_LOG_WARNING,
+                           "unknown extension '%s' in uri worker map",
+                           param);
+                }
+            }
+        }
+
+        uwr->source_type = source_type;
+        uwr->worker_name = w;
         uwr->uri = uri;
         uwr->context = uri;
-        uwr->worker_name = jk_pool_strdup(&uw_map->p, worker);
         uwr->context_len = strlen(uwr->context);
-        uwr->source_type = source_type;
         if (strchr(uri, '*') ||
             strchr(uri, '?')) {
             /* Something like
@@ -361,17 +681,19 @@
              * /context/ *.suffix
              */
             match_type |= MATCH_TYPE_WILDCHAR_PATH;
-            jk_log(l, JK_LOG_DEBUG,
-                   "wildchar rule '%s=%s' source '%s' was added",
-                   uwr->context, uwr->worker_name, uri_worker_map_get_source(uwr, l));
+            if (JK_IS_DEBUG_LEVEL(l))
+                jk_log(l, JK_LOG_DEBUG,
+                       "wildchar rule '%s=%s' source '%s' was added",
+                       uwr->context, uwr->worker_name, uri_worker_map_get_source(uwr, l));
 
         }
         else {
             /* Something like:  JkMount /login/j_security_check ajp13 */
             match_type |= MATCH_TYPE_EXACT;
-            jk_log(l, JK_LOG_DEBUG,
-                   "exact rule '%s=%s' source '%s' was added",
-                   uwr->context, uwr->worker_name, uri_worker_map_get_source(uwr, l));
+            if (JK_IS_DEBUG_LEVEL(l))
+                jk_log(l, JK_LOG_DEBUG,
+                       "exact rule '%s=%s' source '%s' was added",
+                       uwr->context, uwr->worker_name, uri_worker_map_get_source(uwr, l));
         }
     }
     else {
@@ -388,11 +710,11 @@
         return JK_FALSE;
     }
     uwr->match_type = match_type;
-    uw_map->maps[uw_map->size] = uwr;
-    uw_map->size++;
+    IND_NEXT(uw_map->maps)[IND_NEXT(uw_map->size)] = uwr;
+    IND_NEXT(uw_map->size)++;
     if (match_type & MATCH_TYPE_NO_MATCH) {
         /* If we split the mappings this one will be calculated */
-        uw_map->nosize++;
+        IND_NEXT(uw_map->nosize)++;
     }
     worker_qsort(uw_map);
     JK_TRACE_EXIT(l);
@@ -406,24 +728,14 @@
 
     JK_TRACE_ENTER(l);
 
-    uw_map->size = 0;
-    uw_map->capacity = 0;
-
     if (uw_map) {
-        int sz;
+        int sz = jk_map_size(init_data);
 
-        rc = JK_TRUE;
-        jk_open_pool(&uw_map->p,
-                     uw_map->buf, sizeof(jk_pool_atom_t) * SMALL_POOL_SIZE);
-        uw_map->size = 0;
-        uw_map->maps = NULL;
+        if (JK_IS_DEBUG_LEVEL(l))
+            jk_log(l, JK_LOG_DEBUG,
+                   "rule map size is %d",
+                   sz);
 
-        sz = jk_map_size(init_data);
-
-        jk_log(l, JK_LOG_DEBUG,
-               "rule map size is %d",
-               sz);
-
         if (sz > 0) {
             int i;
             for (i = 0; i < sz; i++) {
@@ -471,7 +783,9 @@
 
         if (rc == JK_FALSE) {
             jk_log(l, JK_LOG_ERROR,
-                   "there was an error, freing buf");
+                   "there was an error, freeing buf");
+            jk_close_pool(&uw_map->p_dyn[0]);
+            jk_close_pool(&uw_map->p_dyn[1]);
             jk_close_pool(&uw_map->p);
         }
     }
@@ -480,23 +794,77 @@
     return rc;
 }
 
-static int is_nomap_match(jk_uri_worker_map_t *uw_map,
-                          const char *uri, const char* worker,
-                          jk_logger_t *l)
+static int find_match(jk_uri_worker_map_t *uw_map,
+                      const char *url, jk_logger_t *l)
 {
     unsigned int i;
 
     JK_TRACE_ENTER(l);
 
-    for (i = 0; i < uw_map->size; i++) {
-        uri_worker_record_t *uwr = uw_map->maps[i];
+    for (i = 0; i < IND_THIS(uw_map->size); i++) {
+        uri_worker_record_t *uwr = IND_THIS(uw_map->maps)[i];
 
+        /* Check for match types */
+        if ((uwr->match_type & MATCH_TYPE_DISABLED) ||
+            (uwr->match_type & MATCH_TYPE_NO_MATCH))
+            continue;
+
+        if (JK_IS_DEBUG_LEVEL(l))
+            jk_log(l, JK_LOG_DEBUG, "Attempting to map context URI '%s=%s' source '%s'",
+                   uwr->context, uwr->worker_name, uri_worker_map_get_source(uwr, l));
+
+        if (uwr->match_type & MATCH_TYPE_WILDCHAR_PATH) {
+            /* Map is already sorted by context_len */
+            if (wildchar_match(url, uwr->context,
+#ifdef WIN32
+                               0
+#else
+                               0
+#endif
+                               ) == 0) {
+                    if (JK_IS_DEBUG_LEVEL(l))
+                        jk_log(l, JK_LOG_DEBUG,
+                               "Found a wildchar match '%s=%s'",
+                               uwr->context, uwr->worker_name);
+                    JK_TRACE_EXIT(l);
+                    return i;
+             }
+        }
+        else if (JK_STRNCMP(uwr->context, url, uwr->context_len) == 0) {
+            if (strlen(url) == uwr->context_len) {
+                if (JK_IS_DEBUG_LEVEL(l))
+                    jk_log(l, JK_LOG_DEBUG,
+                           "Found an exact match '%s=%s'",
+                           uwr->context, uwr->worker_name);
+                JK_TRACE_EXIT(l);
+                return i;
+            }
+        }
+    }
+
+    JK_TRACE_EXIT(l);
+    return -1;
+}
+
+static int is_nomatch(jk_uri_worker_map_t *uw_map,
+                      const char *uri, int match,
+                      jk_logger_t *l)
+{
+    unsigned int i;
+    const char *worker = IND_THIS(uw_map->maps)[match]->worker_name;
+
+    JK_TRACE_ENTER(l);
+
+    for (i = 0; i < IND_THIS(uw_map->size); i++) {
+        uri_worker_record_t *uwr = IND_THIS(uw_map->maps)[i];
+
         /* Check only nomatch mappings */
         if (!(uwr->match_type & MATCH_TYPE_NO_MATCH) ||
             (uwr->match_type & MATCH_TYPE_DISABLED))
             continue;
         /* Check only matching workers */
-        if (strcmp(uwr->worker_name, worker))
+        if (strcmp(uwr->worker_name, worker) &&
+            strcmp(uwr->worker_name, "*"))
             continue;
         if (uwr->match_type & MATCH_TYPE_WILDCHAR_PATH) {
             /* Map is already sorted by context_len */
@@ -507,9 +875,10 @@
                                0
 #endif
                                ) == 0) {
-                    jk_log(l, JK_LOG_DEBUG,
-                           "Found a wildchar no match '%s=%s' source '%s'",
-                           uwr->context, uwr->worker_name, uri_worker_map_get_source(uwr, l));
+                    if (JK_IS_DEBUG_LEVEL(l))
+                        jk_log(l, JK_LOG_DEBUG,
+                               "Found a wildchar no match '%s=%s' source '%s'",
+                               uwr->context, uwr->worker_name, uri_worker_map_get_source(uwr, l));
                     JK_TRACE_EXIT(l);
                     return JK_TRUE;
              }
@@ -530,22 +899,25 @@
     return JK_FALSE;
 }
 
-
-const char *map_uri_to_worker(jk_uri_worker_map_t *uw_map,
-                              const char *uri, jk_logger_t *l)
+const char *map_uri_to_worker_ext(jk_uri_worker_map_t *uw_map,
+                                  const char *uri, const char *vhost,
+                                  rule_extension_t **extensions,
+                                  jk_logger_t *l)
 {
     unsigned int i;
+    unsigned int vhost_len;
     int reject_unsafe;
-    const char *rv = NULL;
+    int rv = -1;
     char  url[JK_MAX_URI_LEN+1];
 
     JK_TRACE_ENTER(l);
 
-    if (!uw_map || !uri) {
+    if (!uw_map || !uri || !extensions) {
         JK_LOG_NULL_PARAMS(l);
         JK_TRACE_EXIT(l);
         return NULL;
     }
+    *extensions = NULL;
     if (*uri != '/') {
         jk_log(l, JK_LOG_WARNING,
                 "Uri %s is invalid. Uri must start with /", uri);
@@ -553,8 +925,8 @@
         return NULL;
     }
     if (uw_map->fname) {
-        uri_worker_map_update(uw_map, l);
-        if (!uw_map->size) {
+        uri_worker_map_update(uw_map, 0, l);
+        if (!IND_THIS(uw_map->size)) {
             jk_log(l, JK_LOG_INFO,
                    "No worker maps defined for %s.",
                    uw_map->fname);
@@ -566,10 +938,37 @@
      * everything after the first ';' char.
      */
     reject_unsafe = uw_map->reject_unsafe;
+    vhost_len = 0;
+/*
+ * In case we got a vhost, we prepend a slash
+ * and the vhost to the url in order to enable
+ * vhost mapping rules especially for IIS.
+ */
+    if (vhost) {
+        int off = 0;
+/* Add leading '/' if necessary */
+        if (vhost[0] != '/') {
+            url[0] = '/';
+            off = 1;
+        }
+/* Size including leading slash. */
+        vhost_len = strlen(vhost);
+        if (vhost_len + off >= JK_MAX_URI_LEN) {
+            vhost_len = 0;
+            jk_log(l, JK_LOG_WARNING,
+                   "Host prefix %s for URI %s is invalid and will be ignored."
+                   " It must be smaller than %d chars",
+                   vhost, JK_MAX_URI_LEN - off);
+        }
+        else {
+            strncpy(&url[off], vhost, vhost_len + 1);
+        }
+        vhost_len += off;
+    }
     for (i = 0; i < strlen(uri); i++) {
         if (i == JK_MAX_URI_LEN) {
             jk_log(l, JK_LOG_WARNING,
-                   "Uri %s is invalid. Uri must be smaller then %d chars",
+                   "URI %s is invalid. URI must be smaller than %d chars",
                    uri, JK_MAX_URI_LEN);
             JK_TRACE_EXIT(l);
             return NULL;
@@ -577,15 +976,15 @@
         if (uri[i] == ';')
             break;
         else {
-            url[i] = uri[i];
-            if (reject_unsafe && (url[i] == '%' || url[i] == '\\')) {
+            url[i + vhost_len] = uri[i];
+            if (reject_unsafe && (uri[i] == '%' || uri[i] == '\\')) {
                 jk_log(l, JK_LOG_INFO, "Potentially unsafe request url '%s' rejected", uri);
                 JK_TRACE_EXIT(l);
                 return NULL;
             }
         }
     }
-    url[i] = '\0';
+    url[i + vhost_len] = '\0';
 
     if (JK_IS_DEBUG_LEVEL(l)) {
         char *url_rewrite = strstr(uri, JK_PATH_SESSION_IDENTIFIER);
@@ -595,68 +994,47 @@
     }
     if (JK_IS_DEBUG_LEVEL(l))
         jk_log(l, JK_LOG_DEBUG, "Attempting to map URI '%s' from %d maps",
-               url, uw_map->size);
+               url, IND_THIS(uw_map->size));
+    rv = find_match(uw_map, url, l);
+/* If this doesn't find a match, try without the vhost. */
+    if (rv < 0 && vhost_len) {
+        rv = find_match(uw_map, &url[vhost_len], l);
+    }
 
-    for (i = 0; i < uw_map->size; i++) {
-        uri_worker_record_t *uwr = uw_map->maps[i];
-
-        /* Check for match types */
-        if ((uwr->match_type & MATCH_TYPE_DISABLED) ||
-            (uwr->match_type & MATCH_TYPE_NO_MATCH))
-            continue;
-
-        if (JK_IS_DEBUG_LEVEL(l))
-            jk_log(l, JK_LOG_DEBUG, "Attempting to map context URI '%s=%s' source '%s'",
-                   uwr->context, uwr->worker_name, uri_worker_map_get_source(uwr, l));
-
-        if (uwr->match_type & MATCH_TYPE_WILDCHAR_PATH) {
-            const char *wname;
-            /* Map is already sorted by context_len */
-            if (wildchar_match(url, uwr->context,
-#ifdef WIN32
-                               0
-#else
-                               0
-#endif
-                               ) == 0) {
-                    wname = uwr->worker_name;
-                    if (JK_IS_DEBUG_LEVEL(l))
-                        jk_log(l, JK_LOG_DEBUG,
-                               "Found a wildchar match '%s=%s'",
-                               uwr->context, uwr->worker_name);
-                    JK_TRACE_EXIT(l);
-                    rv = wname;
-                    goto cleanup;
-             }
-        }
-        else if (JK_STRNCMP(uwr->context, url, uwr->context_len) == 0) {
-            if (strlen(url) == uwr->context_len) {
-                if (JK_IS_DEBUG_LEVEL(l))
-                    jk_log(l, JK_LOG_DEBUG,
-                           "Found an exact match '%s=%s'",
-                           uwr->context, uwr->worker_name);
-                JK_TRACE_EXIT(l);
-                rv = uwr->worker_name;
-                goto cleanup;
+/* In case we found a match, check for the unmounts. */
+    if (rv >= 0 && IND_THIS(uw_map->nosize)) {
+/* Again first including vhost. */
+        int rc = is_nomatch(uw_map, url, rv, l);
+/* If no unmount was find, try without vhost. */
+        if (!rc && vhost_len)
+            rc = is_nomatch(uw_map, &url[vhost_len], rv, l);
+        if (rc) {
+            if (JK_IS_DEBUG_LEVEL(l)) {
+                jk_log(l, JK_LOG_DEBUG,
+                       "Denying match for worker %s by nomatch rule",
+                       IND_THIS(uw_map->maps)[rv]->worker_name);
             }
+            rv = -1;
         }
     }
-    /* No matches found */
-    JK_TRACE_EXIT(l);
 
-cleanup:
-    if (rv && uw_map->nosize) {
-        if (is_nomap_match(uw_map, url, rv, l)) {
-            if (JK_IS_DEBUG_LEVEL(l))
-                jk_log(l, JK_LOG_DEBUG,
-                       "Denying matching for worker %s by nomatch rule",
-                       rv);
-            rv = NULL;
-        }
+    if (rv >= 0) {
+        *extensions = &(IND_THIS(uw_map->maps)[rv]->extensions);
+        JK_TRACE_EXIT(l);
+        return IND_THIS(uw_map->maps)[rv]->worker_name;
     }
-    return rv;
+    JK_TRACE_EXIT(l);
+    return NULL;
 }
 
+const char *map_uri_to_worker(jk_uri_worker_map_t *uw_map,
+                              const char *uri, const char *vhost,
+                              jk_logger_t *l)
+{
+    rule_extension_t *ext;
+    return map_uri_to_worker_ext(uw_map, uri, vhost, &ext, l);
+}
+
 int uri_worker_map_load(jk_uri_worker_map_t *uw_map,
                         jk_logger_t *l)
 {
@@ -671,7 +1049,7 @@
             jk_log(l, JK_LOG_DEBUG,
                    "Loading urimaps from %s with reload check interval %d seconds",
                    uw_map->fname, uw_map->reload);
-        uri_worker_map_clear(uw_map, SOURCE_TYPE_URIMAP, l);
+        uri_worker_map_clear(uw_map, l);
         for (i = 0; i < jk_map_size(map); i++) {
             const char *u = jk_map_name_at(map, i);
             const char *w = jk_map_value_at(map, i);
@@ -715,12 +1093,13 @@
 }
 
 int uri_worker_map_update(jk_uri_worker_map_t *uw_map,
-                          jk_logger_t *l)
+                          int force, jk_logger_t *l)
 {
     int rc = JK_TRUE;
     time_t now = time(NULL);
 
-    if (uw_map->reload > 0 && difftime(now, uw_map->checked) > uw_map->reload) {
+    if ((uw_map->reload > 0 && difftime(now, uw_map->checked) > uw_map->reload) ||
+        force) {
         struct stat statbuf;
         uw_map->checked = now;
         if ((rc = jk_stat(uw_map->fname, &statbuf)) == -1) {
@@ -732,7 +1111,7 @@
         if (statbuf.st_mtime == uw_map->modified) {
             if (JK_IS_DEBUG_LEVEL(l))
                 jk_log(l, JK_LOG_DEBUG,
-                       "File %s  is not modified",
+                       "File %s is not modified",
                        uw_map->fname);
             return JK_TRUE;
         }
@@ -747,6 +1126,7 @@
             return JK_TRUE;
         }
         rc = uri_worker_map_load(uw_map, l);
+        uri_worker_map_ext(uw_map, l);
         JK_LEAVE_CS(&(uw_map->cs), rc);
         jk_log(l, JK_LOG_INFO,
                "Reloaded urimaps from %s", uw_map->fname);

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_uri_worker_map.h
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_uri_worker_map.h	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_uri_worker_map.h	2008-04-06 12:38:06 UTC (rev 6107)
@@ -18,7 +18,7 @@
 /***************************************************************************
  * Description: URI to worker mapper header file                           *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
- * Version:     $Revision: 549885 $                                           *
+ * Version:     $Revision: 613546 $                                           *
  ***************************************************************************/
 
 #ifndef JK_URI_WORKER_MAP_H
@@ -68,6 +68,30 @@
 #define SOURCE_TYPE_TEXT_DISCOVER   ("ajp14")
 
 #define JK_MAX_URI_LEN              4095
+
+struct rule_extension
+{
+    /* reply_timeout overwrite */
+    int reply_timeout;
+    /* activation state overwrites for load balancers */
+    /* Number of elements in the array activations. */
+    int activation_size;
+    /* Dynamically allocated array with one entry per lb member. */
+    int *activation;
+    /* Temporary storage for the original extension strings. */
+    char *active;
+    char *disabled;
+    char *stopped;
+    /* fail_on_status overwrites */
+    /* Number of elements in the array fail_on_status. */
+    int fail_on_status_size;
+    /* Dynamically allocated array with one entry per status. */
+    int *fail_on_status;
+    /* Temporary storage for the original extension strings. */
+    char *fail_on_status_str;
+};
+typedef struct rule_extension rule_extension_t;
+
 struct uri_worker_record
 {
     /* Original uri for logging */
@@ -87,6 +111,9 @@
 
     /* char length of the context */
     size_t context_len;
+
+    /* extended mapping properties */
+    rule_extension_t extensions;
 };
 typedef struct uri_worker_record uri_worker_record_t;
 
@@ -96,17 +123,27 @@
     jk_pool_t p;
     jk_pool_atom_t buf[BIG_POOL_SIZE];
 
+    /* Index 0 or 1, which map instance do we use */
+    /* Needed to make map reload more atomically */
+    int index;
+
+    /* Memory Pool - cleared when doing reload */
+    /* Use this pool to allocate objects, that are deleted */
+    /* when the map gets dynamically reloaded from uriworkermap.properties. */
+    jk_pool_t p_dyn[2];
+    jk_pool_atom_t buf_dyn[2][BIG_POOL_SIZE];
+
     /* map URI->WORKER */
-    uri_worker_record_t **maps;
+    uri_worker_record_t **maps[2];
     
     /* Map Number */
-    unsigned int size;
+    unsigned int size[2];
 
     /* Map Capacity */
-    unsigned int capacity;
+    unsigned int capacity[2];
 
     /* NoMap Number */
-    unsigned int nosize;
+    unsigned int nosize[2];
 
     /* Dynamic config support */
 
@@ -136,18 +173,26 @@
 int uri_worker_map_open(jk_uri_worker_map_t *uw_map,
                         jk_map_t *init_data, jk_logger_t *l);
 
+void uri_worker_map_ext(jk_uri_worker_map_t *uw_map, jk_logger_t *l);
+
 int uri_worker_map_add(jk_uri_worker_map_t *uw_map,
                        const char *puri, const char *worker,
                        unsigned int source_type, jk_logger_t *l);
 
 const char *map_uri_to_worker(jk_uri_worker_map_t *uw_map,
-                              const char *uri, jk_logger_t *l);
+                              const char *uri, const char *vhost,
+                              jk_logger_t *l);
 
+const char *map_uri_to_worker_ext(jk_uri_worker_map_t *uw_map,
+                                  const char *uri, const char *vhost,
+                                  rule_extension_t **extensions,
+                                  jk_logger_t *l);
+
 int uri_worker_map_load(jk_uri_worker_map_t *uw_map,
                         jk_logger_t *l);
 
 int uri_worker_map_update(jk_uri_worker_map_t *uw_map,
-                          jk_logger_t *l);
+                          int force, jk_logger_t *l);
 
 #ifdef __cplusplus
 }

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_util.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_util.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_util.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -20,7 +20,7 @@
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
  * Author:      Henri Gomez <hgomez at apache.org>                            *
  * Author:      Rainer Jung <rjung at apache.org>                             *
- * Version:     $Revision: 559693 $                                          *
+ * Version:     $Revision: 613568 $                                          *
  ***************************************************************************/
 
 
@@ -43,6 +43,7 @@
 #define LIBPATH_OF_WORKER           ("ld_path")
 #define CMD_LINE_OF_WORKER          ("cmd_line")
 #define NATIVE_LIB_OF_WORKER        ("native_lib")
+#define REFERENCE_OF_WORKER         ("reference")
 #define HOST_OF_WORKER              ("host")
 #define PORT_OF_WORKER              ("port")
 #define TYPE_OF_WORKER              ("type")
@@ -123,7 +124,7 @@
 /*
  * define the log format, we're using by default the one from error.log
  *
- * [Mon Mar 26 19:44:48 2001] [jk_uri_worker_map.c (155)]: Into jk_uri_worker_map_t::uri_worker_map_alloc
+ * [Mon Mar 26 19:44:48.123 2001] [jk_uri_worker_map.c (155)]: Into jk_uri_worker_map_t::uri_worker_map_alloc
  * log format used by apache in error.log
  */
 #define JK_TIME_CONV_MILLI    "%Q"
@@ -136,7 +137,6 @@
 #define JK_TIME_SUBSEC_NONE   (0)
 #define JK_TIME_SUBSEC_MILLI  (1)
 #define JK_TIME_SUBSEC_MICRO  (2)
-#define JK_TIME_MAX_SIZE      (64)
 
 /* Visual C++ Toolkit 2003 support */
 #if defined (_MSC_VER) && (_MSC_VER == 1310)
@@ -157,6 +157,7 @@
 
 static const char *unique_properties[] = {
     SECRET_OF_WORKER,
+    REFERENCE_OF_WORKER,
     HOST_OF_WORKER,
     PORT_OF_WORKER,
     TYPE_OF_WORKER,
@@ -239,6 +240,7 @@
     LIBPATH_OF_WORKER,
     CMD_LINE_OF_WORKER,
     NATIVE_LIB_OF_WORKER,
+    REFERENCE_OF_WORKER,
     HOST_OF_WORKER,
     PORT_OF_WORKER,
     TYPE_OF_WORKER,
@@ -350,12 +352,20 @@
 #endif
 }
 
+/* Replace the first occurence of a sub second time format character
+ * by a series of zero digits with the right precision.
+ * We format our timestamp with strftime, but this can not handle
+ * sub second timestamps.
+ * So we first patch the milliseconds or microseconds literally into
+ * the format string, and then pass it on the strftime.
+ * In order to do that efficiently, we prepare a format string, that
+ * already has placeholder digits for the sub second time stamp
+ * and we save the position and time precision of this placeholder.
+ */
 void jk_set_time_fmt(jk_logger_t *l, const char *jk_log_fmt)
 {
     if (l) {
         char *s;
-        char log_fmt_safe[JK_TIME_MAX_SIZE];
-        char *fmt;
 
         if (!jk_log_fmt) {
 #ifndef NO_GETTIMEOFDAY
@@ -367,43 +377,58 @@
         l->log_fmt_type = JK_TIME_SUBSEC_NONE;
         l->log_fmt_offset = 0;
         l->log_fmt_size = 0;
-        l->log_fmt_subsec = jk_log_fmt;
         l->log_fmt = jk_log_fmt;
 
-        fmt = (char *)malloc(JK_TIME_MAX_SIZE + strlen(JK_TIME_PATTERN_MICRO));
-        if (fmt) {
-            strncpy(log_fmt_safe, jk_log_fmt, JK_TIME_MAX_SIZE);
-            if ((s = strstr(log_fmt_safe, JK_TIME_CONV_MILLI))) {
-                size_t offset = s - log_fmt_safe;
-                size_t len = strlen(JK_TIME_PATTERN_MILLI);
+/* Look for the first occurence of JK_TIME_CONV_MILLI */
+        if ((s = strstr(jk_log_fmt, JK_TIME_CONV_MILLI))) {
+            size_t offset = s - jk_log_fmt;
+            size_t len = strlen(JK_TIME_PATTERN_MILLI);
 
+/* If we don't have enough space in our fixed-length char array,
+ * we simply stick to the default format, ignoring JK_TIME_CONV_MILLI.
+ * Otherwise we replace the first occurence of JK_TIME_CONV_MILLI by JK_TIME_PATTERN_MILLI.
+ */
+            if (offset + len < JK_TIME_MAX_SIZE) {
                 l->log_fmt_type = JK_TIME_SUBSEC_MILLI;
                 l->log_fmt_offset = offset;
-                strncpy(fmt, log_fmt_safe, offset);
-                strncpy(fmt + offset, JK_TIME_PATTERN_MILLI, len);
-                strncpy(fmt + offset + len,
+                strncpy(l->log_fmt_subsec, jk_log_fmt, offset);
+                strncpy(l->log_fmt_subsec + offset, JK_TIME_PATTERN_MILLI, len);
+                strncpy(l->log_fmt_subsec + offset + len,
                         s + strlen(JK_TIME_CONV_MILLI),
-                        JK_TIME_MAX_SIZE - offset - len);
-                fmt[JK_TIME_MAX_SIZE-1] = '\0';
-                l->log_fmt_subsec = fmt;
-                l->log_fmt_size = strlen(fmt);
+                        JK_TIME_MAX_SIZE - offset - len - 1);
+/* Now we put a stop mark into the string to make it's length at most JK_TIME_MAX_SIZE-1
+ * plus terminating '\0'.
+ */
+                l->log_fmt_subsec[JK_TIME_MAX_SIZE-1] = '\0';
+                l->log_fmt_size = strlen(l->log_fmt_subsec);
             }
-            else if ((s = strstr(log_fmt_safe, JK_TIME_CONV_MICRO))) {
-                size_t offset = s - log_fmt_safe;
-                size_t len = strlen(JK_TIME_PATTERN_MICRO);
+/* Look for the first occurence of JK_TIME_CONV_MICRO */
+        }
+        else if ((s = strstr(jk_log_fmt, JK_TIME_CONV_MICRO))) {
+            size_t offset = s - jk_log_fmt;
+            size_t len = strlen(JK_TIME_PATTERN_MICRO);
 
+/* If we don't have enough space in our fixed-length char array,
+ * we simply stick to the default format, ignoring JK_TIME_CONV_MICRO.
+ * Otherwise we replace the first occurence of JK_TIME_CONV_MICRO by JK_TIME_PATTERN_MICRO.
+ */
+            if (offset + len < JK_TIME_MAX_SIZE) {
                 l->log_fmt_type = JK_TIME_SUBSEC_MICRO;
                 l->log_fmt_offset = offset;
-                strncpy(fmt, log_fmt_safe, offset);
-                strncpy(fmt + offset, JK_TIME_PATTERN_MICRO, len);
-                strncpy(fmt + offset + len,
+                strncpy(l->log_fmt_subsec, jk_log_fmt, offset);
+                strncpy(l->log_fmt_subsec + offset, JK_TIME_PATTERN_MICRO, len);
+                strncpy(l->log_fmt_subsec + offset + len,
                         s + strlen(JK_TIME_CONV_MICRO),
-                        JK_TIME_MAX_SIZE - offset - len);
-                fmt[JK_TIME_MAX_SIZE-1] = '\0';
-                l->log_fmt_subsec = fmt;
-                l->log_fmt_size = strlen(fmt);
+                        JK_TIME_MAX_SIZE - offset - len - 1);
+/* Now we put a stop mark into the string to make it's length at most JK_TIME_MAX_SIZE-1
+ * plus terminating '\0'.
+ */
+                l->log_fmt_subsec[JK_TIME_MAX_SIZE-1] = '\0';
+                l->log_fmt_size = strlen(l->log_fmt_subsec);
             }
         }
+        jk_log(l, JK_LOG_DEBUG, "Pre-processed log time stamp format is '%s'",
+               l->log_fmt_type == JK_TIME_SUBSEC_NONE ? l->log_fmt : l->log_fmt_subsec);
     }
 }
 
@@ -411,7 +436,15 @@
 {
     time_t t;
     struct tm *tms;
+#ifdef _MT_CODE_PTHREAD
+    struct tm res;
+#endif
     int done;
+/* We want to use a fixed maximum size buffer here.
+ * If we would dynamically adjust it to the real format
+ * string length, we could support longer format strings,
+ * but we would have to allocate and free for each log line.
+ */
     char log_fmt[JK_TIME_MAX_SIZE];
 
     if (!l || !l->log_fmt) {
@@ -431,6 +464,11 @@
         rc = gettimeofday(&tv, NULL);
 #endif
         if (rc == 0) {
+/* We need this subsec buffer, because we convert
+ * the integer with sprintf(), but we don't
+ * want to write the terminating '\0' into our
+ * final log format string.
+ */
             char subsec[7];
             t = tv.tv_sec;
             strncpy(log_fmt, l->log_fmt_subsec, l->log_fmt_size + 1);
@@ -453,7 +491,11 @@
 #else
     t = time(NULL);
 #endif
+#ifdef _MT_CODE_PTHREAD
+    tms = localtime_r(&t, &res);
+#else
     tms = localtime(&t);
+#endif
     if (log_fmt[0])
         done = (int)strftime(str, len, log_fmt, tms);
     else
@@ -518,7 +560,6 @@
         if (rc && p) {
             rc->log = log_to_file;
             rc->level = level;
-            jk_set_time_fmt(rc, NULL);
             rc->logger_private = p;
 #if defined(AS400) && !defined(AS400_UTF8)
             p->logfile = fopen(file, "a+, o_ccsid=0");
@@ -527,7 +568,7 @@
 #endif
             if (p->logfile) {
                 *l = rc;
-                jk_log(rc, JK_LOG_DEBUG, "log time stamp format is '%s'", rc->log_fmt);
+                jk_set_time_fmt(rc, NULL);
                 return JK_TRUE;
             }
         }
@@ -1719,10 +1760,24 @@
     return JK_FALSE;
 }
 
+int is_http_status_fail(unsigned int http_status_fail_num,
+                        int *http_status_fail, int status)
+{
+    unsigned int i;
+    int soft_status = -1 * status;
+    for (i = 0; i < http_status_fail_num; i++) {
+        if (http_status_fail[i] == status)
+            return 1;
+        else if (http_status_fail[i] == soft_status)
+            return -1;
+    }
+    return 0;
+}
+
 char **jk_parse_sysprops(jk_pool_t *p, const char *sysprops)
 {
     char **rc = NULL;
-#ifdef _REENTRANT
+#ifdef _MT_CODE_PTHREAD
     char *lasts;
 #endif
 
@@ -1740,7 +1795,7 @@
             rc = jk_pool_alloc(p, (num_of_prps + 1) * sizeof(char *));
             if (rc) {
                 unsigned i = 0;
-#ifdef _REENTRANT
+#ifdef _MT_CODE_PTHREAD
                 char *tmp = strtok_r(prps, "*", &lasts);
 #else
                 char *tmp = strtok(prps, "*");
@@ -1748,7 +1803,7 @@
 
                 while (tmp && i < num_of_prps) {
                     rc[i] = tmp;
-#ifdef _REENTRANT
+#ifdef _MT_CODE_PTHREAD
                     tmp = strtok_r(NULL, "*", &lasts);
 #else
                     tmp = strtok(NULL, "*");
@@ -1813,6 +1868,7 @@
     s->ssl_cert_len = 0;
     s->ssl_cipher = NULL;
     s->ssl_session = NULL;
+    s->ssl_key_size = -1;
     s->headers_names = NULL;
     s->headers_values = NULL;
     s->num_headers = 0;
@@ -1820,8 +1876,27 @@
     s->attributes_values = NULL;
     s->num_attributes = 0;
     s->route = NULL;
-    s->retries = JK_RETRIES;
+    s->secret = NULL;
+    s->reco_buf = NULL;
+    s->reco_status = RECO_NONE;
+    s->flush_packets = JK_FALSE;
+    s->flush_header = JK_FALSE;
+    s->extension.reply_timeout = -1;
+    s->extension.activation = NULL;
+    s->extension.fail_on_status_size = 0;
+    s->extension.fail_on_status = NULL;
+    s->response_started = JK_FALSE;
+    s->http_response_status = JK_HTTP_OK;
+    s->uw_map = NULL;
+    s->start_response = NULL;
+    s->read = NULL;
+    s->write = NULL;
+    s->flush = NULL;
+    s->disable_reuse = JK_FALSE;
     s->add_log_items = NULL;
+    s->next_vhost = NULL;
+    s->vhost_to_text = NULL;
+    s->vhost_to_uw_map = NULL;
 }
 
 #ifdef _MT_CODE_PTHREAD

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_util.h
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_util.h	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_util.h	2008-04-06 12:38:06 UTC (rev 6107)
@@ -20,7 +20,7 @@
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
  * Author:      Henri Gomez <hgomez at apache.org>                            *
  * Author:      Rainer Jung <rjung at apache.org>                             *
- * Version:     $Revision: 559480 $                                          *
+ * Version:     $Revision: 613546 $                                          *
  ***************************************************************************/
 #ifndef _JK_UTIL_H
 #define _JK_UTIL_H
@@ -206,9 +206,11 @@
 int jk_get_worker_fail_on_status(jk_map_t *m, const char *wname,
                                  int *list, unsigned int list_size);
 
-
 int jk_get_worker_user_case_insensitive(jk_map_t *m, const char *wname);
 
+int is_http_status_fail(unsigned int http_status_fail_num,
+                        int *http_status_fail, int status);
+
 #define TC32_BRIDGE_TYPE    32
 #define TC33_BRIDGE_TYPE    33
 #define TC40_BRIDGE_TYPE    40

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_version.h
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_version.h	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_version.h	2008-04-06 12:38:06 UTC (rev 6107)
@@ -17,7 +17,7 @@
 
 /***************************************************************************
  * Description: JK version header file                                     *
- * Version:     $Revision: 563423 $                                           *
+ * Version:     $Revision: 606272 $                                           *
  ***************************************************************************/
 
 #ifndef __JK_VERSION_H
@@ -26,14 +26,14 @@
 /************** START OF AREA TO MODIFY BEFORE RELEASING *************/
 #define JK_VERMAJOR     1
 #define JK_VERMINOR     2
-#define JK_VERFIX       25
-#define JK_VERSTRING    "1.2.25"
+#define JK_VERFIX       27
+#define JK_VERSTRING    "1.2.27"
 
 /* Beta number */
 #define JK_VERBETA      0
 #define JK_BETASTRING   "0"
 /* set JK_VERISRELEASE to 1 when release (do not forget to commit!) */
-#define JK_VERISRELEASE 1
+#define JK_VERISRELEASE 0
 #define JK_VERRC        0
 #define JK_RCSTRING     "0"
 

Modified: trunk/tomcat5.5/connectors/jk/native/common/jk_worker.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/jk_worker.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/jk_worker.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -19,7 +19,7 @@
  * Description: Workers controller                                         *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
  * Author:      Henri Gomez <hgomez at apache.org>                            *
- * Version:     $Revision: 555180 $                                          *
+ * Version:     $Revision: 610566 $                                          *
  ***************************************************************************/
 
 #define _PLACE_WORKER_LIST_HERE
@@ -63,6 +63,7 @@
     }
 
     jk_map_dump(init_data, l);
+    we->init_data = init_data;
     if (!jk_get_worker_list(init_data, &(we->worker_list),
                             &we->num_of_workers)) {
         JK_TRACE_EXIT(l);

Modified: trunk/tomcat5.5/connectors/jk/native/common/list.mk.in
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/list.mk.in	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/list.mk.in	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 ## Object needed for mod_jk for Apache-1.3
 APACHE_OBJECTS= ${JK}jk_ajp12_worker${OEXT} ${JK}jk_connect${OEXT} \
                 ${JK}jk_msg_buff${OEXT} ${JK}jk_util${OEXT} \

Modified: trunk/tomcat5.5/connectors/jk/native/common/portable.h
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/portable.h	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/portable.h	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,2 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
 /* On most platform this file is overwritten when doing configure */
 /* DON'T COMMIT THE FILE IT BREAKS windoze and Netware, commit the sample file */

Modified: trunk/tomcat5.5/connectors/jk/native/common/portable.h.sample
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/common/portable.h.sample	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/common/portable.h.sample	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
 /* Sample file for common/portable.h. */
 /* On most platforms the file common/portable.h is generated */
 /* by configure from common/portable.h.in. */
@@ -96,4 +112,4 @@
 #define USE_SO_SNDTIMEO 1
 
 /* Version number of package */
-#define VERSION "1.2.25"
+#define VERSION "1.2.27"

Modified: trunk/tomcat5.5/connectors/jk/native/configure.in
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/configure.in	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/configure.in	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,7 +1,22 @@
+dnl  Licensed to the Apache Software Foundation (ASF) under one or more
+dnl  contributor license agreements.  See the NOTICE file distributed with
+dnl  this work for additional information regarding copyright ownership.
+dnl  The ASF licenses this file to You under the Apache License, Version 2.0
+dnl  (the "License"); you may not use this file except in compliance with
+dnl  the License.  You may obtain a copy of the License at
 dnl
+dnl      http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl  Unless required by applicable law or agreed to in writing, software
+dnl  distributed under the License is distributed on an "AS IS" BASIS,
+dnl  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl  See the License for the specific language governing permissions and
+dnl  limitations under the License.
+
+dnl
 dnl Process this file with autoconf to produce a configure script
 dnl
-AC_REVISION($Id: configure.in 563087 2007-08-06 10:07:40Z rjung $)dnl
+AC_REVISION($Id: configure.in 612187 2008-01-15 18:38:01Z rjung $)dnl
 
 AC_PREREQ(2.13)
 AC_INIT(common/jk_worker.h)
@@ -11,7 +26,7 @@
 
 dnl package and version. (synchronization with common/jk_version.h ?)
 PACKAGE=mod_jk
-VERSION=1.2.25
+VERSION=1.2.27
 
 AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
 
@@ -47,24 +62,24 @@
 apache_include=""
 APXS="apxs"
 AC_ARG_WITH(apxs,
-[  --with-apxs[=FILE]      Build shared Apache module. FILE is the optional
-                        pathname to the apxs tool; defaults to finding
-			apxs in your PATH.],
+[[  --with-apxs[=FILE]      Build shared Apache module.
+                          FILE is the optional pathname to the apxs tool;
+                          defaults to finding apxs in your PATH.]],
 [
     case "${withval}" in
         y | yes | true) find_apxs=true ;;
-        n | no | false) find_apxs=false ;;
-        *) find_apxs=false ;;
+        n | no | false) find_apxs= ;;
+        *) find_apxs=${withval} ;;
     esac
 
     if ${TEST} ${find_apxs} ; then
         AC_MSG_RESULT([need to check for Perl first, apxs depends on it...])
         AC_PATH_PROG(PERL,perl,$PATH)dnl
 
-        if ${TEST} ${find_apxs} ; then
-            APXS=${withval}
+        if ${TEST} ${find_apxs} = true ; then
+            AC_PATH_PROG(APXS,apxs,$PATH)dnl
         else
-            AC_PATH_PROG(APXS,apxs,$PATH)dnl
+            APXS=${find_apxs}
         fi
 
         if ${TEST} -n "${APXS}" ; then
@@ -307,8 +322,9 @@
 
 apache_dir_is_src="false"
 AC_ARG_WITH(apache,
-[  --with-apache=DIR      Build static Apache module. DIR is the pathname
-                        to the Apache source directory.],
+[AS_HELP_STRING([--with-apache=DIR],
+[Build static Apache module. DIR is the pathname
+to the Apache source directory.])],
 [
     if ${TEST} ! -z "$WEBSERVER" ; then
         AC_MSG_ERROR([Sorry cannot use --with-apxs=${APXS} and --with-apache=${withval} together, please choose one of both])
@@ -382,7 +398,7 @@
 AC_SUBST(APACHE_DIR)
 
 AC_ARG_ENABLE(netscape,
-[  --enable-netscape=DIR  Build Netscape/iPlanet/SunONE nsapi redirector plugin.],
+[AS_HELP_STRING([--enable-netscape=DIR],[Build Netscape/iPlanet/SunONE nsapi redirector plugin])],
 [
     if ${TEST} ! -z "$WEBSERVER" ; then
         AC_MSG_ERROR([Sorry cannot use --with-apxs=${APXS} or --with-apache=${withval} with --with-netscape, please choose one or the other.])
@@ -399,7 +415,7 @@
 dnl Check for enable-jni
 JK_JNI_WORKER=""
 AC_ARG_ENABLE(jni,
-[  --enable-jni     Build jni_connect.so and enable jni_worker.],
+[AS_HELP_STRING([--enable-jni],[Build jni_connect.so and enable jni_worker])],
 [
     AC_MSG_RESULT(jni enable (need JDK))
     CFLAGS="${CFLAGS} -DHAVE_JNI"
@@ -410,9 +426,8 @@
 dnl CFLAGS for EAPI mod_ssl (Apache 1.3)
 dnl it also allows the CFLAGS environment variable.
 CFLAGS="${CFLAGS}"
-AC_ARG_ENABLE(
-EAPI,
-[  --enable-EAPI     Enable EAPI support (mod_ssl, Apache 1.3)],
+AC_ARG_ENABLE(EAPI,
+[AS_HELP_STRING([--enable-EAPI],[Enable EAPI support (mod_ssl, Apache 1.3)])],
 [
 case "${enableval}" in
     y | Y | YES | yes | TRUE | true )
@@ -426,9 +441,8 @@
 dnl CFLAGS for maintainer mode
 dnl it also allows the CFLAGS environment variable.
 CFLAGS="${CFLAGS}"
-AC_ARG_ENABLE(
-maintainer-mode,
-[  --enable-maintainer-mode   Turn on debugging and compile time warnings],
+AC_ARG_ENABLE(maintainer-mode,
+[AS_HELP_STRING([--enable-maintainer-mode],[Turn on debugging and compile time warnings])],
 [
 case "${enableval}" in
     y | Y | YES | yes | TRUE | true )
@@ -439,12 +453,11 @@
 ])
 AC_SUBST(CFLAGS)
 
-dnl CFLAGS for preforks mode
+dnl CFLAGS for prefork mode
 dnl it also allows the CFLAGS environment variable.
 CFLAGS="${CFLAGS}"
-AC_ARG_ENABLE(
-prefork,
-[  --enable-prefork   Turn on prefork web server mode],
+AC_ARG_ENABLE(prefork,
+[AS_HELP_STRING([--enable-prefork],[Turn on prefork web server mode (single-threaded)])],
 [
 case "${enableval}" in
     y | Y | YES | yes | TRUE | true )
@@ -455,12 +468,47 @@
 ])
 AC_SUBST(CFLAGS)
 
+dnl CFLAGS for stripping TRACE logs
+dnl it also allows the CFLAGS environment variable.
+CFLAGS="${CFLAGS}"
+AC_ARG_ENABLE(trace,
+[AS_HELP_STRING([--disable-trace],[Exclude trace log code from compilation])],
+[
+case "${enableval}" in
+    no )
+        CFLAGS="${CFLAGS} -DJK_PRODUCTION"
+        AC_MSG_RESULT([...Exclude trace log code...])
+        ;;
+esac
+])
+AC_SUBST(CFLAGS)
+
+dnl CFLAGS for building against recent httpd but without
+dnl using httpd API functions, which didn't exist in the first
+dnl production releases. This ensures, that the resulting
+dnl module binary is compatible with older httpd releases.
+dnl Until now only relevant for httpd 2.2.x with x >= 4.
+CFLAGS="${CFLAGS}"
+AC_ARG_ENABLE(api-compatibility,
+[AS_HELP_STRING([--enable-api-compatibility],
+[Only use httpd API functions available in all production releases.
+This improves binary compatibility of module builds with httpd releases
+older than the release against we build (only between minor versions).])],
+[
+case "${enableval}" in
+    y | Y | YES | yes | TRUE | true )
+        CFLAGS="${CFLAGS} -DAPI_COMPATIBILITY"
+        AC_MSG_RESULT([...Only using compatible httpd API...])
+        ;;
+esac
+])
+AC_SUBST(CFLAGS)
+
 dnl CFLAGS for shared memory lock mode
 dnl it also allows the CFLAGS environment variable.
 CFLAGS="${CFLAGS}"
-AC_ARG_ENABLE(
-flock,
-[  --enable-flock   Turn on flock for shared locking if present],
+AC_ARG_ENABLE(flock,
+[AS_HELP_STRING([--enable-flock],[Turn on flock for shared locking if present])],
 [
 case "${enableval}" in
     y | Y | YES | yes | TRUE | true )
@@ -510,7 +558,7 @@
 JAVA_PLATFORM="1"
 
 AC_ARG_WITH(java-home,
-[  --with-java-home=DIR     Where is your JDK root directory.],
+[AS_HELP_STRING([--with-java-home=DIR],[Where is your JDK root directory])],
 [
 
     # This stuff works if the command line parameter --with-java-home was
@@ -612,8 +660,9 @@
         AC_MSG_CHECKING(Java platform)
 
         AC_ARG_WITH(java-platform,
-        [  --with-java-platform=VAL Force the Java platorm
-                          (value is 1 for 1.1.x or 2 for 1.2.x or greater)],
+        [AS_HELP_STRING([--with-java-platform=VAL],
+        [Force the Java platform
+         (value is 1 for 1.1.x or 2 for 1.2.x or greater)])],
         [
             dnl This requires a bit of tweaking to be handled properly, but
             dnl the default is good enough
@@ -634,7 +683,7 @@
 dnl guess OS = OS_TYPE for jni_md.h
 OS=""
 AC_ARG_WITH(os-type,
-[  --with-os-type[=SUBDIR]     Where is your JDK os-type subdirectory.],
+[AS_HELP_STRING([--with-os-type=SUBDIR],[Where is your JDK os-type subdirectory])],
 [
     OS=${withval}
 

Modified: trunk/tomcat5.5/connectors/jk/native/docs/api/README.txt
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/docs/api/README.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/docs/api/README.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
 To generate the API documentation for the mod_jk library, simply invoke
   make apidocs
 from the mod_jk Library root source path. (tomcat-connectors/jk/native)

Modified: trunk/tomcat5.5/connectors/jk/native/iis/Makefile.ia64
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/iis/Makefile.ia64	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/iis/Makefile.ia64	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # Microsoft Developer Studio Generated NMAKE File, Based on isapi.dsp
 # Use Platform SDK:
 # SetEnv.cmd /SRV64 /RETAIL

Modified: trunk/tomcat5.5/connectors/jk/native/iis/Makefile.x86
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/iis/Makefile.x86	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/iis/Makefile.x86	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 CPP=cl.exe
 MTL=midl.exe
 RSC=rc.exe

Modified: trunk/tomcat5.5/connectors/jk/native/iis/installer/conf/rewrite.properties
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/iis/installer/conf/rewrite.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/iis/installer/conf/rewrite.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # rewrite.properties - IIS
 #
 # Form of the file

Modified: trunk/tomcat5.5/connectors/jk/native/iis/installer/conf/uriworkermap.properties
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/iis/installer/conf/uriworkermap.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/iis/installer/conf/uriworkermap.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # uriworkermap.properties - IIS
 #
 # This file provides sample mappings for example wlb

Modified: trunk/tomcat5.5/connectors/jk/native/iis/installer/conf/workers.properties.minimal
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/iis/installer/conf/workers.properties.minimal	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/iis/installer/conf/workers.properties.minimal	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # workers.properties.minimal -
 #
 # This file provides minimal jk configuration properties needed to

Modified: trunk/tomcat5.5/connectors/jk/native/iis/installer/iisfilter.vbs
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/iis/installer/iisfilter.vbs	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/iis/installer/iisfilter.vbs	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,12 +1,13 @@
 '
-' Copyright 1999-2004 The Apache Software Foundation
+' Licensed to the Apache Software Foundation (ASF) under one or more
+' contributor license agreements.  See the NOTICE file distributed with
+' this work for additional information regarding copyright ownership.
+' The ASF licenses this file to You 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
 '
-' 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
 '
-'    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.
@@ -17,7 +18,7 @@
 ' =========================================================================
 ' Description: Install script for Tomcat ISAPI redirector                              
 ' Author:      Mladen Turk <mturk at apache.org>                           
-' Version:     $Revision: 438903 $                                           
+' Version:     $Revision: 572120 $                                           
 ' =========================================================================
 
 '

Modified: trunk/tomcat5.5/connectors/jk/native/iis/installer/isapi-redirector-win32-msi.ism
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/iis/installer/isapi-redirector-win32-msi.ism	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/iis/installer/isapi-redirector-win32-msi.ism	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <?xml-stylesheet type="text/xsl" href="is.xsl" ?>
 <!DOCTYPE msi [
    <!ELEMENT msi   (summary,table*)>
@@ -3409,7 +3425,7 @@
 		<row><td>ProductID</td><td>none</td><td/></row>
 		<row><td>ProductLanguage</td><td>1033</td><td/></row>
 		<row><td>ProductName</td><td>Tomcat Isapi Redirector</td><td/></row>
-		<row><td>ProductVersion</td><td>1.2.25</td><td/></row>
+		<row><td>ProductVersion</td><td>1.2.27</td><td/></row>
 		<row><td>ProgressType0</td><td>install</td><td/></row>
 		<row><td>ProgressType1</td><td>Installing</td><td/></row>
 		<row><td>ProgressType2</td><td>installed</td><td/></row>

Modified: trunk/tomcat5.5/connectors/jk/native/iis/isapi_install.vbs
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/iis/isapi_install.vbs	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/iis/isapi_install.vbs	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,12 +1,13 @@
 '
-' Copyright 1999-2004 The Apache Software Foundation
+' Licensed to the Apache Software Foundation (ASF) under one or more
+' contributor license agreements.  See the NOTICE file distributed with
+' this work for additional information regarding copyright ownership.
+' The ASF licenses this file to You 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
 '
-' 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
 '
-'    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.
@@ -17,7 +18,7 @@
 ' =========================================================================
 ' Description: Install script for Tomcat ISAPI redirector                              
 ' Author:      Peter S. Horne <horneps at yahoo.com.au>                           
-' Version:     $Revision: 438903 $                                           
+' Version:     $Revision: 572120 $                                           
 ' =========================================================================
 '
 ' This script automatically installs the tomcat isapi_redirector for use in

Modified: trunk/tomcat5.5/connectors/jk/native/iis/isapi_redirect.rc
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/iis/isapi_redirect.rc	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/iis/isapi_redirect.rc	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,26 +1,30 @@
-#define JK_COPYRIGHT "Copyright 2000-2007 The Apache Software " \
-                     "Foundation or its licensors, as applicable."
+#define JK_COPYRIGHT "Licensed to the Apache Software Foundation " \
+                     "(ASF) under one or more contributor license " \
+                     "agreements.  See the NOTICE file distributed " \
+                     "with this work for additional information " \
+                     "regarding copyright ownership."
 
-#define JK_LICENSE "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\r\n\r\n" \
-                    "http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n" \
-                    "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."
+#define JK_LICENSE "The ASF licenses this file to You 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\r\n\r\n" \
+                   "http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n" \
+                   "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."
 
-#define JK_VERSION_STR  "1.2.25"
+#define JK_VERSION_STR  "1.2.27"
 #define JK_DLL_BASENAME "isapi_redirect-" JK_VERSION_STR
 
 
 1 VERSIONINFO
- FILEVERSION 1,2,25,0
- PRODUCTVERSION 1,2,25,0
+ FILEVERSION 1,2,27,0
+ PRODUCTVERSION 1,2,27,0
  FILEFLAGSMASK 0x3fL
 #if defined(_DEBUG)
  FILEFLAGS 0x01L

Modified: trunk/tomcat5.5/connectors/jk/native/iis/jk_isapi_plugin.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/iis/jk_isapi_plugin.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/iis/jk_isapi_plugin.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -21,7 +21,7 @@
  * Author:      Larry Isaacs <larryi at apache.org>                           *
  * Author:      Ignacio J. Ortega <nacho at apache.org>                       *
  * Author:      Mladen Turk <mturk at apache.org>                             *
- * Version:     $Revision: 562198 $                                        *
+ * Version:     $Revision: 613274 $                                        *
  ***************************************************************************/
 
 // This define is needed to include wincrypt,h, needed to get client certificates
@@ -112,6 +112,7 @@
 #define BAD_REQUEST     -1
 #define BAD_PATH        -2
 #define MAX_SERVERNAME  128
+#define MAX_PACKET_SIZE 65536
 
 char HTML_ERROR_400[] =         "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n"
                                 "<HTML><HEAD><TITLE>Bad request!</TITLE></HEAD>\n"
@@ -145,7 +146,7 @@
 #define GET_SERVER_VARIABLE_VALUE(name, place)          \
   do {                                                  \
     (place) = NULL;                                     \
-    huge_buf_sz = sizeof(huge_buf);                     \
+    huge_buf_sz = MAX_PACKET_SIZE;                      \
     if (get_server_value(private_data->lpEcb,           \
                         (name),                         \
                         huge_buf,                       \
@@ -156,7 +157,7 @@
 
 #define GET_SERVER_VARIABLE_VALUE_INT(name, place, def)     \
   do {                                                      \
-    huge_buf_sz = sizeof(huge_buf);                         \
+    huge_buf_sz = MAX_PACKET_SIZE;                          \
     if (get_server_value(private_data->lpEcb,               \
                         (name),                             \
                         huge_buf,                           \
@@ -192,7 +193,7 @@
 static char worker_mount_file[MAX_PATH * 2] = {0};
 static int  worker_mount_reload = JK_URIMAP_DEF_RELOAD;
 static char rewrite_rule_file[MAX_PATH * 2] = {0};
-static int shm_config_size = JK_SHM_DEF_SIZE;
+static size_t shm_config_size = 0;
 static int strip_session = 0;
 static DWORD auth_notification_flags = 0;
 static int   use_auth_notification_flags = 1;
@@ -212,7 +213,6 @@
 {
     jk_pool_t p;
 
-    int request_started;
     unsigned int bytes_read_so_far;
     LPEXTENSION_CONTROL_BLOCK lpEcb;
 };
@@ -587,12 +587,12 @@
     if (s && s->ws_private) {
         int rv = JK_TRUE;
         isapi_private_data_t *p = s->ws_private;
-        if (!p->request_started) {
+        if (!s->response_started) {
             char *status_str;
             DWORD status_str_len;
             char *headers_str = NULL;
             BOOL keep_alive = FALSE;
-            p->request_started = JK_TRUE;
+            s->response_started = JK_TRUE;
 
             /*
              * Create the status line
@@ -743,7 +743,7 @@
             unsigned int written = 0;
             char *buf = (char *)b;
 
-            if (!p->request_started) {
+            if (!s->response_started) {
                 start_response(s, 200, NULL, NULL, NULL, 0);
             }
 
@@ -1261,19 +1261,10 @@
             }
             if (szHost > 0) {
                 StringCbCat(snuri, INTERNET_MAX_URL_LENGTH, Host);
-                StringCbCat(snuri, INTERNET_MAX_URL_LENGTH, uri);
-                if (JK_IS_DEBUG_LEVEL(logger))
-                    jk_log(logger, JK_LOG_DEBUG,
-                           "Virtual Host redirection of %s",
-                           snuri);
-                worker = map_uri_to_worker(uw_map, snuri, logger);
+                worker = map_uri_to_worker(uw_map, uri, snuri, logger);
             }
-            if (!worker) {
-                if (JK_IS_DEBUG_LEVEL(logger))
-                    jk_log(logger, JK_LOG_DEBUG,
-                           "Default redirection of %s",
-                           uri);
-                worker = map_uri_to_worker(uw_map, uri, logger);
+            else {
+                worker = map_uri_to_worker(uw_map, uri, NULL, logger);
             }
             /*
              * Check if somebody is feading us with his own TOMCAT data headers.
@@ -1284,13 +1275,13 @@
 
                 if (JK_IS_DEBUG_LEVEL(logger))
                     jk_log(logger, JK_LOG_DEBUG,
-                           "check if [%s] is points to the web-inf directory",
+                           "check if [%s] points to the web-inf directory",
                         uri);
 
                 if (uri_is_web_inf(uri)) {
                     jk_log(logger, JK_LOG_EMERG,
                            "[%s] points to the web-inf or meta-inf directory. "
-                           "Somebody try to hack into the site!!!",
+                           "Somebody tries to hack into the site!!!",
                            uri);
 
                     write_error_response(pfc, "404 Not Found",
@@ -1313,7 +1304,7 @@
                         *(query - 1) = '\0';
                     if (JK_IS_DEBUG_LEVEL(logger))
                         jk_log(logger, JK_LOG_DEBUG,
-                               "fowarding original URI [%s]",
+                               "forwarding original URI [%s]",
                                uri);
                     forwardURI = uri;
                 }
@@ -1361,12 +1352,12 @@
                     StringCbCopy(duri, INTERNET_MAX_URL_LENGTH, forwardURI);
                     if (simple_rewrite(forwardURI)) {
                         jk_log(logger, JK_LOG_DEBUG,
-                               "rewriten URI [%s]->[%s]",
+                               "rewritten URI [%s]->[%s]",
                                duri, forwardURI);
                     }
                     else if (rregex_rewrite(forwardURI)) {
                         jk_log(logger, JK_LOG_DEBUG,
-                               "rewriten URI [%s]->[%s]",
+                               "rewritten URI [%s]->[%s]",
                                duri, forwardURI);
                     }
                 }
@@ -1499,7 +1490,6 @@
         jk_init_ws_service(&s);
         jk_open_pool(&private_data.p, buf, sizeof(buf));
 
-        private_data.request_started = JK_FALSE;
         private_data.bytes_read_so_far = 0;
         private_data.lpEcb = lpEcb;
 
@@ -1516,8 +1506,6 @@
 
             if (worker) {
                 jk_endpoint_t *e = NULL;
-                /* Update retries for this worker */
-                s.retries = worker->retries;
                 if (worker->get_endpoint(worker, &e, logger)) {
                     int is_error = JK_HTTP_SERVER_ERROR;
                     int result;
@@ -1604,8 +1592,8 @@
             }
             jk_map_free(&rregexp_map);
         }
-        jk_shm_close();
         wc_close(logger);
+        jk_shm_close();
         if (logger) {
             jk_close_file_logger(&logger);
         }
@@ -1681,10 +1669,6 @@
                 shm_name[i] = '_';
         }
     }
-    /*
-     * Create named shared memory for each server
-     */
-    jk_shm_open(shm_name, shm_config_size, logger);
 
     jk_set_worker_def_cache_size(DEFAULT_WORKER_THREADS);
 
@@ -1766,11 +1750,28 @@
         if (jk_map_alloc(&workers_map)) {
             if (jk_map_read_properties(workers_map, worker_file, NULL,
                                        JK_MAP_HANDLE_DUPLICATES, logger)) {
+                int rv;
+
                 /* we add the URI->WORKER MAP since workers using AJP14 will feed it */
 
                 if (jk_map_resolve_references(workers_map, "worker.", 1, 1, logger) == JK_FALSE) {
                     jk_log(logger, JK_LOG_ERROR, "Error in resolving configuration references");
                 }
+                /*
+                 * Create named shared memory for each server
+                 */
+                if (shm_config_size == 0)
+                    shm_config_size = jk_shm_calculate_size(workers_map, logger);
+                else {
+                    jk_log(logger, JK_LOG_WARNING,
+                           "The optimal shared memory size can now be determined automatically.");
+                    jk_log(logger, JK_LOG_WARNING,
+                           "You can remove the JkShmSize directive if you want to use the optimal size.");
+                }
+                if ((rv = jk_shm_open(shm_name, shm_config_size, logger)) != 0)
+                    jk_log(logger, JK_LOG_ERROR,
+                           "Initializing shm:%s errno=%d. Load balancing workers will not function properly.",
+                           jk_shm_name(), rv);
 
                 worker_env.uri_to_worker = uw_map;
                 worker_env.server_name = serverName;
@@ -1778,11 +1779,11 @@
                 if (wc_open(workers_map, &worker_env, logger)) {
                     rc = JK_TRUE;
                 }
+                uri_worker_map_ext(uw_map, logger);
             }
-            else {
+            else
                 jk_log(logger, JK_LOG_EMERG,
                        "Unable to read worker file %s.", worker_file);
-            }
             if (rc != JK_TRUE) {
                 jk_map_free(&workers_map);
                 workers_map = NULL;
@@ -1873,7 +1874,7 @@
             ok = JK_FALSE;
         }
     }
-    shm_config_size = get_config_int(src, SHM_SIZE_TAG, JK_SHM_DEF_SIZE);
+    shm_config_size = (size_t) get_config_int(src, SHM_SIZE_TAG, 0);
     worker_mount_reload = get_config_int(src, WORKER_MOUNT_RELOAD_TAG, JK_URIMAP_DEF_RELOAD);
     strip_session = get_config_bool(src, STRIP_SESSION_TAG, JK_FALSE);
     use_auth_notification_flags = get_config_int(src, AUTH_COMPLETE_TAG, 1);
@@ -1974,26 +1975,19 @@
 static int init_ws_service(isapi_private_data_t * private_data,
                            jk_ws_service_t *s, char **worker_name)
 {
-    char huge_buf[16 * 1024];   /* should be enough for all */
+    char *huge_buf = NULL;   /* should be enough for all */
 
     DWORD huge_buf_sz;
 
-    s->route = NULL;
-
     s->start_response = start_response;
     s->read = read;
     s->write = write;
 
-    /* Yes we do want to reuse AJP connections */
-    s->disable_reuse = JK_FALSE;
+    if (!(huge_buf = jk_pool_alloc(&private_data->p, MAX_PACKET_SIZE))) {
 
-    s->flush = NULL;
-    s->flush_packets = JK_FALSE;
-    s->flush_header = JK_FALSE;
-
-    /* Clear RECO status */
-    s->reco_status = RECO_NONE;
-
+        return JK_FALSE;    
+    }
+    huge_buf_sz = MAX_PACKET_SIZE;
     GET_SERVER_VARIABLE_VALUE(HTTP_WORKER_HEADER_NAME, (*worker_name));
     GET_SERVER_VARIABLE_VALUE(HTTP_URI_HEADER_NAME, s->req_uri);
     GET_SERVER_VARIABLE_VALUE(HTTP_QUERY_HEADER_NAME, s->query_string);
@@ -2020,15 +2014,6 @@
     s->method = private_data->lpEcb->lpszMethod;
     s->content_length = (jk_uint64_t)private_data->lpEcb->cbTotalBytes;
 
-    s->ssl_cert = NULL;
-    s->ssl_cert_len = 0;
-    s->ssl_cipher = NULL;
-    s->ssl_session = NULL;
-    s->ssl_key_size = -1;
-
-    s->headers_names = NULL;
-    s->headers_values = NULL;
-    s->num_headers = 0;
     s->uw_map = uw_map;
     /*
      * Add SSL IIS environment
@@ -2065,6 +2050,8 @@
                 num_of_vars++;
             }
         }
+        /* XXX: To make the isapi plugin more consistent with the other web servers */
+        /* we should also set s->ssl_cipher, s->ssl_session, and s->ssl_key_size. */
         if (num_of_vars) {
             unsigned int j;
 
@@ -2084,7 +2071,7 @@
             s->num_attributes = num_of_vars;
             if (ssl_env_values[4] && ssl_env_values[4][0] == '1') {
                 CERT_CONTEXT_EX cc;
-                cc.cbAllocated = sizeof(huge_buf);
+                cc.cbAllocated = MAX_PACKET_SIZE;
                 cc.CertContext.pbCertEncoded = (BYTE *) huge_buf;
                 cc.CertContext.cbCertEncoded = 0;
 
@@ -2113,7 +2100,7 @@
         }
     }
 
-    huge_buf_sz = sizeof(huge_buf);
+    huge_buf_sz = MAX_PACKET_SIZE;
     if (get_server_value(private_data->lpEcb,
                          "ALL_HTTP", huge_buf, huge_buf_sz)) {
         unsigned int cnt = 0;
@@ -2126,7 +2113,7 @@
         }
 
         if (cnt) {
-            char *headers_buf = jk_pool_strdup(&private_data->p, huge_buf);
+            char *headers_buf = huge_buf;
             unsigned int i;
             size_t len_of_http_prefix = strlen("HTTP_");
             BOOL need_content_length_header = (s->content_length == 0);

Modified: trunk/tomcat5.5/connectors/jk/native/jni/Makefile.in
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/jni/Makefile.in	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/jni/Makefile.in	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 OEXT=.lo
 include @APACHE_CONFIG_VARS@
 

Modified: trunk/tomcat5.5/connectors/jk/native/jni/Makefile.linux
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/jni/Makefile.linux	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/jni/Makefile.linux	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # Defines for example NSAPI programs running under SOLARIS
 
 CC_CMD=gcc -D_REENTRANT

Modified: trunk/tomcat5.5/connectors/jk/native/jni/Makefile.netware
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/jni/Makefile.netware	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/jni/Makefile.netware	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,21 @@
 #
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+#
 # Makefile for jk_nsapi_plugin (NetWare version - gnu make)
 # created by Guenter Knauf <fuankg at apache.org>
 #
@@ -23,7 +40,6 @@
 # Edit the vars below to change NLM target settings.
 TARGET  = jni_conn
 VERSION	= $(JK_VERSION)
-#COPYR	= Copyright (c) 2000-2007 The Apache Software Foundation. All rights reserved.
 COPYR	= Licensed under the Apache License, Version 2.0
 DESCR	= JNI natives for Tomcat $(JK_VERSION_STR)
 MTSAFE	= NO

Modified: trunk/tomcat5.5/connectors/jk/native/jni/Makefile.solaris
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/jni/Makefile.solaris	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/jni/Makefile.solaris	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # Defines for example NSAPI programs running under SOLARIS
 
 CC_CMD=gcc -DSOLARIS -D_REENTRANT

Modified: trunk/tomcat5.5/connectors/jk/native/netscape/Makefile.linux
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/netscape/Makefile.linux	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/netscape/Makefile.linux	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # Defines for example NSAPI programs running under Linux
 
 # gcc

Modified: trunk/tomcat5.5/connectors/jk/native/netscape/Makefile.netware
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/netscape/Makefile.netware	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/netscape/Makefile.netware	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,21 @@
 #
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+#
 # Makefile for jk_nsapi_plugin (NetWare version - gnu make)
 # created by Guenter Knauf <fuankg at apache.org>
 #
@@ -23,7 +40,6 @@
 # Edit the vars below to change NLM target settings.
 TARGET  = nsapi_rd
 VERSION	= $(JK_VERSION)
-#COPYR	= Copyright (c) 2000-2007 The Apache Software Foundation. All rights reserved.
 COPYR	= Licensed under the Apache License, Version 2.0
 DESCR	= Netscape plugin for Tomcat $(JK_VERSION_STR)
 MTSAFE	= NO

Modified: trunk/tomcat5.5/connectors/jk/native/netscape/Makefile.solaris
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/netscape/Makefile.solaris	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/netscape/Makefile.solaris	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # Defines for example NSAPI programs running under SOLARIS
 
 # Choose between the settings for gcc or Sun Studio compiler

Modified: trunk/tomcat5.5/connectors/jk/native/netscape/README
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/netscape/README	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/netscape/README	2008-04-06 12:38:06 UTC (rev 6107)
@@ -7,7 +7,7 @@
 
 On Unix system, a Makefile.solaris and Makefile.linux are provided
 and should be adapted to tailor to your own configuration.
-Be sure to read the BUILDING file, one directory up.
+Be sure to read the BUILDING.txt file, one directory up.
 
 
 REQUIREMENT for Windows build

Modified: trunk/tomcat5.5/connectors/jk/native/netscape/jk_nsapi_plugin.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/netscape/jk_nsapi_plugin.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/netscape/jk_nsapi_plugin.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -18,7 +18,7 @@
 /***************************************************************************
  * Description: NSAPI plugin for Netscape servers                          *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
- * Version:     $Revision: 562175 $                                           *
+ * Version:     $Revision: 609757 $                                           *
  ***************************************************************************/
 
 
@@ -43,8 +43,6 @@
 {
     jk_pool_t p;
 
-    int request_started;
-
     pblock *pb;
     Session *sn;
     Request *rq;
@@ -61,6 +59,7 @@
 static jk_worker_env_t worker_env;
 static jk_map_t *init_map = NULL;
 static jk_uri_worker_map_t *uw_map = NULL;
+static size_t jk_shm_size = 0;
 
 #ifdef NETWARE
 int (*PR_IsSocketSecure) (SYS_NETFD * csd);     /* pointer to PR_IsSocketSecure function */
@@ -125,10 +124,10 @@
 {
     if (s && s->ws_private) {
         nsapi_private_data_t *p = s->ws_private;
-        if (!p->request_started) {
+        if (!s->response_started) {
             unsigned i;
 
-            p->request_started = JK_TRUE;
+            s->response_started = JK_TRUE;
 
             /* Remove "old" content type */
             param_free(pblock_remove("content-type", p->rq->srvhdrs));
@@ -161,7 +160,6 @@
 
         *a = 0;
         if (l) {
-            char *buf = b;
             unsigned i;
             netbuf *inbuf = p->sn->inbuf;
 
@@ -174,6 +172,7 @@
             }
 
 #else
+            char *buf = b;
             int ch;
             for (i = 0; i < l; i++) {
                 ch = netbuf_getc(inbuf);
@@ -210,7 +209,7 @@
         nsapi_private_data_t *p = s->ws_private;
 
         if (l) {
-            if (!p->request_started) {
+            if (!s->response_started) {
                 start_response(s, 200, NULL, NULL, NULL, 0);
             }
 
@@ -270,10 +269,10 @@
         logger = NULL;
     }
     
-    jk_shm_open(shm_file, JK_SHM_DEF_SIZE, logger);
     if (jk_map_alloc(&init_map)) {
         if (jk_map_read_properties(init_map, worker_prp_file, NULL,
                                    JK_MAP_HANDLE_DUPLICATES, logger)) {
+            int rv;
             int sleep_cnt;
             SYS_THREAD s;
 
@@ -284,6 +283,13 @@
             if (reject_unsafe) {
                 jk_map_add(init_map, "worker." REJECT_UNSAFE_TAG, reject_unsafe); 
             }
+
+            jk_shm_size = jk_shm_calculate_size(init_map, logger);
+            if ((rv = jk_shm_open(shm_file, jk_shm_size, logger)) != 0)
+                jk_log(logger, JK_LOG_ERROR,
+                       "Initializing shm:%s errno=%d. Load balancing workers will not function properly.",
+                       jk_shm_name(), rv);
+
             s = systhread_start(SYSTHREAD_DEFAULT_PRIORITY,
                                 0, init_workers_on_other_threads, init_map);
             for (sleep_cnt = 0; sleep_cnt < 60; sleep_cnt++) {
@@ -332,8 +338,8 @@
         jk_map_free(&init_map);
     }
 
-    jk_shm_close();
     wc_close(logger);
+    jk_shm_close();
     if (logger) {
         jk_close_file_logger(&logger);
     }
@@ -366,7 +372,6 @@
 
         jk_open_pool(&private_data.p, buf, sizeof(buf));
 
-        private_data.request_started = JK_FALSE;
         private_data.pb = pb;
         private_data.sn = sn;
         private_data.rq = rq;
@@ -375,7 +380,6 @@
 
         s.ws_private = &private_data;
         s.pool = &private_data.p;
-        s.retries = worker->retries;
 
         wc_maintain(logger);
         if (init_ws_service(&private_data, &s)) {
@@ -419,22 +423,13 @@
     int size;
     int rc;
 
-    s->route = NULL;
     s->start_response = start_response;
     s->read = ws_read;
     s->write = ws_write;
-    s->flush = NULL;
-    s->flush_packets = JK_FALSE;
-    s->flush_header = JK_FALSE;
-    s->disable_reuse = JK_FALSE;
 
-    /* Clear RECO status */
-    s->reco_status = RECO_NONE;
-
     s->auth_type = pblock_findval("auth-type", private_data->rq->vars);
     s->remote_user = pblock_findval("auth-user", private_data->rq->vars);
 
-    s->content_length = 0;
     tmp = NULL;
     rc = request_header("content-length",
                         &tmp, private_data->sn, private_data->rq);
@@ -470,10 +465,6 @@
         s->server_port = server_portnum;
     s->server_software = system_version();
 
-
-    s->headers_names = NULL;
-    s->headers_values = NULL;
-    s->num_headers = 0;
     s->uw_map = uw_map;
 
 #ifdef NETWARE
@@ -487,7 +478,6 @@
 #endif
         s->is_ssl = security_active;
 
-    s->ssl_key_size = -1;       /* required by Servlet 2.3 Api, added in jtc */
     if (s->is_ssl) {
         char *ssl_cert = pblock_findval("auth-cert", private_data->rq->vars);
         if (ssl_cert != NULL) {
@@ -501,13 +491,8 @@
         }
         s->ssl_cipher = pblock_findval("cipher", private_data->sn->client);
         s->ssl_session = pblock_findval("ssl-id", private_data->sn->client);
+        /* XXX: We need to investigate how to set s->ssl_key_size */
     }
-    else {
-        s->ssl_cert = NULL;
-        s->ssl_cert_len = 0;
-        s->ssl_cipher = NULL;
-        s->ssl_session = NULL;
-    }
 
     rc = setup_http_headers(private_data, s);
 

Modified: trunk/tomcat5.5/connectors/jk/native/nt_service/jk_nt_service.c
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/nt_service/jk_nt_service.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/nt_service/jk_nt_service.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -19,7 +19,7 @@
  * Description: NT System service for Tomcat                       *
  * Author:      Gal Shachor <shachor at il.ibm.com>                           *
  *              Dave Oxley <Dave at JungleMoss.com>                           *
- * Version:     $Revision: 550203 $                                           *
+ * Version:     $Revision: 603324 $                                           *
  ***************************************************************************/
 
 #include "jk_global.h"
@@ -871,8 +871,8 @@
         return;
     } 
     
-    if(jk_resolve("localhost", port, &in)) {
-        int sd = jk_open_socket(&in, JK_TRUE, 0, -1, NULL);
+    if(jk_resolve("localhost", port, &in, NULL)) {
+        int sd = jk_open_socket(&in, JK_TRUE, 0, 0, NULL);
         if(sd >0) {
             int rc = JK_FALSE;
 
@@ -910,7 +910,8 @@
     
                     if(0 > jk_tcp_socket_sendfull(sd, 
                                                   msg->buf,
-                                                  msg->len)) {
+                                                  msg->len,
+                                                  NULL)) {
                         rc = JK_FALSE;
                     }
                 }                                                    
@@ -921,7 +922,7 @@
                     rc = JK_TRUE;
                 }
             }
-            jk_close_socket(sd);
+            jk_close_socket(sd, NULL);
             if(JK_TRUE == rc) {
                 if(WAIT_OBJECT_0 == WaitForSingleObject(hTomcat, 30*1000)) {
                     return;

Modified: trunk/tomcat5.5/connectors/jk/native/scripts/build/config_vars.mk
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/scripts/build/config_vars.mk	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/scripts/build/config_vars.mk	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,2 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # libtool is given by Apache-2.0 when installed otherwise we provide it.
 LIBTOOL      = $(SHELL) ../libtool

Modified: trunk/tomcat5.5/connectors/jk/native/scripts/build/rules.mk
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/scripts/build/rules.mk	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/scripts/build/rules.mk	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # That an extract of what is in APR.
 #
 

Modified: trunk/tomcat5.5/connectors/jk/native/scripts/build/unix/dummy
===================================================================
--- trunk/tomcat5.5/connectors/jk/native/scripts/build/unix/dummy	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/native/scripts/build/unix/dummy	2008-04-06 12:38:06 UTC (rev 6107)
@@ -0,0 +1 @@
+

Modified: trunk/tomcat5.5/connectors/jk/support/apache.m4
===================================================================
--- trunk/tomcat5.5/connectors/jk/support/apache.m4	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/support/apache.m4	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,21 @@
 dnl
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements.  See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License.  You may obtain a copy of the License at
+dnl
+dnl     http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+dnl
+
+dnl
 dnl apache.m4: autoconf macro for Apache/apxs
 dnl
 

Modified: trunk/tomcat5.5/connectors/jk/support/get_ver.awk
===================================================================
--- trunk/tomcat5.5/connectors/jk/support/get_ver.awk	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/support/get_ver.awk	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,21 @@
 BEGIN {
 
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+
   # fetch mod_jk version numbers from input file and writes them to STDOUT
 
   while ((getline < ARGV[1]) > 0) {

Modified: trunk/tomcat5.5/connectors/jk/support/os_apache.m4
===================================================================
--- trunk/tomcat5.5/connectors/jk/support/os_apache.m4	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/support/os_apache.m4	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,20 @@
+dnl
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements.  See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License.  You may obtain a copy of the License at
+dnl
+dnl     http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+dnl
+
 dnl copied from httpd-2.0/os/config.m4
 dnl OS changed to OS_APACHE and OS_DIR to OS_APACHE_DIR
 

Modified: trunk/tomcat5.5/connectors/jk/tools/jkrelease.sh
===================================================================
--- trunk/tomcat5.5/connectors/jk/tools/jkrelease.sh	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/tools/jkrelease.sh	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,21 @@
 #!/bin/ksh
 
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+
 # Make sure to set your path so that we can find
 # the following binaries:
 # cd, mkdir, cp, rm, find
@@ -27,8 +43,9 @@
 #################### FUNCTIONS ##############
 
 usage() {
-    echo "Usage:: $0 -t VERSION [-b BRANCH | -T | -d DIR]"
+    echo "Usage:: $0 -t VERSION [-r revision] [-b BRANCH | -T | -d DIR]"
     echo "        -t: version to package"
+    echo "        -r: revision to package"
     echo "        -b: package from branch BRANCH"
     echo "        -T: package from trunk"
     echo "        -d: package from local directory"
@@ -58,10 +75,11 @@
 #################### MAIN ##############
 
 conflict=0
-while getopts :t:b:d:T c
+while getopts :t:r:b:d:T c
 do
     case $c in
     t)         tag=$OPTARG;;
+    r)         revision=$OPTARG;;
     b)         branch=$OPTARG
                conflict=$(($conflict+1));;
     T)         trunk=trunk
@@ -105,10 +123,14 @@
     usage
     exit 2
 fi
+if [ -n "$revision" ]
+then
+    revision="-r $revision"
+fi
 if [ -n "$trunk" ]
 then
     JK_SVN_URL="${SVNROOT}/${SVNPROJ}/trunk"
-    JK_REV=`svn info ${JK_SVN_URL} | awk '$1 == "Revision:" {print $2}'`
+    JK_REV=`svn info $revision ${JK_SVN_URL} | awk '$1 == "Revision:" {print $2}'`
     if [ -z "$JK_REV" ]
     then
        echo "No Revision found at '$JK_SVN_URL'"
@@ -119,7 +141,7 @@
 then
     JK_BRANCH=`echo $branch | sed -e 's#/#__#g'`
     JK_SVN_URL="${SVNROOT}/${SVNPROJ}/branches/$branch"
-    JK_REV=`svn info ${JK_SVN_URL} | awk '$1 == "Revision:" {print $2}'`
+    JK_REV=`svn info $revision ${JK_SVN_URL} | awk '$1 == "Revision:" {print $2}'`
     if [ -z "$JK_REV" ]
     then
        echo "No Revision found at '$JK_SVN_URL'"
@@ -129,13 +151,13 @@
 elif [ -n "$local_dir" ]
 then
     JK_SVN_URL="$local_dir"
-    JK_REV=`svn info ${JK_SVN_URL} | awk '$1 == "Revision:" {print $2}'`
+    JK_REV=`svn info $revision ${JK_SVN_URL} | awk '$1 == "Revision:" {print $2}'`
     if [ -z "$JK_REV" ]
     then
        echo "No Revision found at '$JK_SVN_URL'"
        exit 3
     fi
-    JK_DIST=${JK_CVST}-${tag}-dev-local-`date +%y%m%d%H%M%S`-${JK_REV}-src
+    JK_DIST=${JK_CVST}-${tag}-dev-local-`date +%Y%m%d%H%M%S`-${JK_REV}-src
 else
     JK_VER=$tag
     JK_TAG=`echo $tag | sed -e 's#^#JK_#' -e 's#\.#_#g'`
@@ -150,10 +172,10 @@
 rm -rf ${JK_DIST}.tmp
 
 mkdir -p ${JK_DIST}.tmp
-svn export "${JK_SVN_URL}/jk" ${JK_DIST}.tmp/jk
+svn export $revision "${JK_SVN_URL}/jk" ${JK_DIST}.tmp/jk
 for item in ${COPY_TOP}
 do
-    svn export "${JK_SVN_URL}/${item}" ${JK_DIST}.tmp/${item}
+    svn export $revision "${JK_SVN_URL}/${item}" ${JK_DIST}.tmp/${item}
 done
 
 # Build documentation.
@@ -161,7 +183,7 @@
 ant
 cd ../../..
 
-# Copying things into source distribution
+# Copying things into the source distribution
 copy_files ${JK_DIST}.tmp $JK_DIST "$COPY_TOP"
 copy_files ${JK_DIST}.tmp/jk $JK_DIST "$COPY_JK"
 copy_files ${JK_DIST}.tmp/jk/build $JK_DIST "$COPY_BUILD"

Modified: trunk/tomcat5.5/connectors/jk/tools/lineends.pl
===================================================================
--- trunk/tomcat5.5/connectors/jk/tools/lineends.pl	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/tools/lineends.pl	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,21 @@
 #!/usr/bin/perl
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+#
 #  Heuristically converts line endings to the current OS's preferred format
 #  
 #  All existing line endings must be identical (e.g. lf's only, or even

Modified: trunk/tomcat5.5/connectors/jk/tools/reports/README.txt
===================================================================
--- trunk/tomcat5.5/connectors/jk/tools/reports/README.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/tools/reports/README.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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 directory contains perl scripts which can be used to generate
 statistics for tomcat requests and errors logged by mod_jk.
 

Modified: trunk/tomcat5.5/connectors/jk/xdocs/ajp/project.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/ajp/project.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/ajp/project.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="Apache Tomcat Connector Documentation - AJP Protocol Reference"
         href="http://tomcat.apache.org/">
 

Modified: trunk/tomcat5.5/connectors/jk/xdocs/build.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="tomcat-docs" default="build-main" basedir=".">
 
 

Modified: trunk/tomcat5.5/connectors/jk/xdocs/generic_howto/project.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/generic_howto/project.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/generic_howto/project.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="Apache Tomcat Connector Documentation - Generic HowTo"
         href="http://tomcat.apache.org/">
 

Modified: trunk/tomcat5.5/connectors/jk/xdocs/generic_howto/timeouts.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/generic_howto/timeouts.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/generic_howto/timeouts.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -24,7 +24,7 @@
 <properties>
 <title>Timeouts HowTo</title>
 <author email="rjung at apache.org">Rainer Jung</author>
-<date>$Date: 2007-07-26 10:03:52 -0600 (Thu, 26 Jul 2007) $</date>
+<date>$Date: 2008-01-13 19:28:27 -0700 (Sun, 13 Jan 2008) $</date>
 </properties>
 <body>
 <section name="Introduction"> 
@@ -248,6 +248,17 @@
 millisecond value.
 </p>
 <p>
+In combination with Apache httpd, you can also set a more flexible reply_timeout
+using an httpd environment variable. If you set the variable JK_REPLY_TIMEOUT
+to some integer value, this value will be used instead of the value in
+the worker configuration. This way you can set reply timeouts more flexible
+with mod_setenvif and mod_rewrite depending on URI, query string etc.
+If the environment variable JK_REPLY_TIMEOUT is not set, or is set to a
+negative value, the default reply timeout of the worker will be used. If
+JK_REPLY_TIMEOUT contains the value "0", then the reply timeout will be disabled
+for the request.
+</p>
+<p>
 In combination with a load balancing worker, JK will disable a member
 worker of the load balancer if a reply timeout fires. The worker will then
 no longer be used until it gets recovered during the next automatic

Modified: trunk/tomcat5.5/connectors/jk/xdocs/generic_howto/workers.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/generic_howto/workers.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/generic_howto/workers.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -26,7 +26,7 @@
 <author email="hgomez at apache.org">Henri Gomez</author>
 <author email="shachor at il.ibm.com">Gal Shachor</author>
 <author email="mturk at apache.org">Mladen Tur</author>
-<date>$Date: 2006-11-27 18:55:39 -0700 (Mon, 27 Nov 2006) $</date>
+<date>$Date: 2007-09-02 14:21:00 -0600 (Sun, 02 Sep 2007) $</date>
 </properties>
 <body>
 <section name="Introduction">
@@ -355,6 +355,13 @@
 </p>
 
 <p>
+Attributes which are allowed multiple times for a single worker
+can not be merged from a worker and a reference. An attribute
+is only inherited from a reference, if it is not already set
+for the referring worker.
+</p>
+
+<p>
 References are especially useful, when configuring load balancers.
 Try to understand the following two stage references:
 </p>

Modified: trunk/tomcat5.5/connectors/jk/xdocs/index.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/index.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/index.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!DOCTYPE document [
   <!ENTITY project SYSTEM "project.xml">
 ]>
@@ -29,6 +45,16 @@
 <section name="Headlines">
 <br />
 <ul>
+<li><a href="news/20070301.html#20071221.1">21 December 2007 - <b>JK-1.2.26 released</b></a>
+<p>The Apache Tomcat team is proud to announce the immediate availability
+of Tomcat Connectors 1.2.26 Stable.
+</p>
+<p>Download the <a href="http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.26/tomcat-connectors-1.2.26-src.tar.gz">JK 1.2.26 release sources</a>
+ | <a href="http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.26/tomcat-connectors-1.2.26-src.tar.gz.asc">PGP signature</a>
+</p>
+<p>Download the <a href="http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/">binaries</a> for selected platforms.
+</p>
+</li>
 <li><a href="news/20070301.html#20070807.1">7 August 2007 - <b>JK-1.2.25 released</b></a>
 <p>The Apache Tomcat team is proud to announce the immediate availability
 of Tomcat Connectors 1.2.25 Stable.

Modified: trunk/tomcat5.5/connectors/jk/xdocs/jk2/davhowto.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/jk2/davhowto.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/jk2/davhowto.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <document>
 <properties>
 <title>Apache 2.x/mod-dav - Tomcat/jk2 - HOWTO</title>

Modified: trunk/tomcat5.5/connectors/jk/xdocs/miscellaneous/changelog.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/miscellaneous/changelog.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/miscellaneous/changelog.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!DOCTYPE document [
   <!ENTITY project SYSTEM "project.xml">
 ]>
@@ -23,6 +39,234 @@
   new documentation project for JK was started.
   </p>
 </section>
+<section name="Changes between 1.2.26 and 1.2.27">
+  <br />
+  <subsection name="Native">
+    <changelog>
+      <update>
+        URI Map: Add extension attributes to uri worker map.
+        Allowed are reply_timeout, active/disabled/stopped
+        and fail_on_status.
+        Usage currently only implemented for httpd. (rjung)
+      </update>
+      <fix>
+        URI Map: Make dynamic reloading atomic and free memory
+        not needed any longer. (rjung)
+      </fix>
+      <update>
+        Configure: Don't use post httpd 2.2.0 API functions when building
+        with new --enable-api-compatibility configure switch. (rjung)
+      </update>
+      <fix>
+        Apache: JkAutoAlias does not work in combination with JkMountCopy
+        if there are no JkMount in virtual host. (rjung)
+      </fix>
+      <update>
+        LB: Optimize state macros to improve performance. (rjung)
+      </update>
+      <update>
+        Apache: Allow dynamic setting of reply timeout using the environment
+        variable JK_REPLY_TIMEOUT. (rjung)
+      </update>
+      <update>
+        Status: Add manageability for ajp parameters of ajp
+        workers and ajp lb members. (rjung)
+      </update>
+      <update>
+        Status: Change parameter names of update action to
+        make them more easily distinguishable from other parameters. (rjung)
+      </update>
+      <update>
+        Status: Add non ajp worker statistics also for
+        workers, that are not lb members. (rjung)
+      </update>
+      <update>
+        AJP: Refactor factories, move ajp13/ajp14 common parts into
+        ajp_factory. (rjung)
+      </update>
+      <update>
+        Status: Only sync shm worker config values of the workers
+        for which we changed values. (rjung)
+      </update>
+      <fix>
+        Status: Set lb_factor instead of distance. (rjung)
+      </fix>
+      <update>
+        Status: Minor layout changes, use drop down instead of multiple
+        text links. (rjung)
+      </update>
+      <update>
+        SHM: Use local copies of read mostly attributes of lb sub workers
+        in lb and status worker. (rjung)
+      </update>
+      <update>
+        Status: Add "dump" action to dump our initial configuration. (rjung)
+      </update>
+      <update>
+        Status: Use property table to decide which cmd action uses which
+        output elements. (rjung)
+      </update>
+      <update>
+        Common: Include original configuration map in worker_env
+        to make it available for workers, e.g. the status worker. (rjung)
+      </update>
+      <update>
+        LB: Refactor "route" return for httpd note. Don't use a
+        member of the worker_record, because that's not thread safe. (rjung)
+      </update>
+      <update>
+        Common: Refactor "retries", remove from service and jk_worker,
+        move into ajp worker instead. (rjung)
+      </update>
+      <update>
+        SHM: Use distinct structs for lb and ajp13 in shm.
+        Improves type safety and saves a few bytes. (rjung)
+      </update>
+      <update>
+        SHM: Remove unused attributes. (rjung)
+      </update>
+      <update>
+        SHM: Automatically determine shm size for all web servers. (rjung)
+      </update>
+      <update>
+        SHM: Make open/attach logging consistent for all web servers. (rjung)
+      </update>
+      <update>
+        Status: Include server local time in output. (rjung)
+      </update>
+      <fix>
+        <bug>44116</bug>: Fix handling of multiple JSESSIONID cookies. (rjung)
+      </fix>
+      <fix>
+        <bug>37850</bug>: Use thread safe localtime_r where appropriate. (rjung)
+      </fix>
+      <fix>
+        Use thread safe strtok_r on more platforms, especially AIX. (rjung)
+      </fix>
+      <update>
+        Status: Improve XSS hardening. (rjung)
+      </update>
+      <update>
+        <bug>35303</bug>: Move initialization of service members with defaults from
+        web server specific code to our generic jk_init_ws_service() function. (rjung)
+      </update>
+      <fix>
+        <bug>36385</bug>: Add missing prepost cping/cpong directly after connect
+        in case prepost cping is used, but no connect cping. (rjung)
+      </fix>
+      <update>
+        <bug>37322</bug>: Apache: Enhance robustness of message formating
+        in jk_error_exit(). (rjung)
+      </update>
+      <fix>
+        <bug>44147</bug>: Multiple load balancing workers problem. (rjung)
+      </fix>
+    </changelog>
+  </subsection>
+</section>
+<section name="Changes between 1.2.25 and 1.2.26">
+  <br />
+  <subsection name="Native">
+    <changelog>
+      <fix>
+        <bug>42003</bug>: Allocate memory instead using fixed size from
+        the stack. (mturk)
+      </fix>
+      <fix>
+        <bug>43229</bug>: Load balancer does not do fail over after
+        reply timeouts. (rjung)
+      </fix>
+      <fix>
+        JKStatus: Repair detailed Apache httpd version display.
+        This was broken for httpd version 2.2.4+. (rjung)
+      </fix>
+      <update>
+        LB/AJP: Refactoring of jk_connect.c, jk_ajp_common.c,
+        jk_lb_worker.c (rjung)
+      </update>
+      <fix>
+        Configure: Repair broken apxs auto-detection. (rjung)
+      </fix>
+      <update>
+        Configure: Remove trace logging from compiled code
+        via new --disable-trace configure switch. (rjung)
+      </update>
+      <update>
+        Common: Maintain idle connections in decreasing (LRU)
+        slot order. (rjung)
+      </update>
+      <update>
+        Apache: Create JK_WORKER_ROUTE and JK_REQUEST_DURATION notes for
+        access log even if no JkRequestLogFormat is set. (rjung)
+      </update>
+      <update>
+        JKStatus: Enhance URI to worker map listing for Apache httpd.
+        We now list maps for all virtual servers and not only
+        the one, in which JKStatus itself was called. (rjung)
+      </update>
+      <update>
+        JKStatus: Enhance URI to worker map listing.
+        Update stale uriworkermap.properties immediately. (rjung)
+      </update>
+      <fix>
+        <bug>43873</bug>: Fix small memory leak occuring during httpd restart. (rjung)
+      </fix>
+      <update>
+        Common: Allow '*' for the worker name in exclusion rules (resp. JkUnMount)
+        which will override all workers. (rjung)
+      </update>
+      <fix>
+        <bug>42038</bug>: Correct overlay of mounts and unmounts for IIS. (rjung)
+      </fix>
+      <fix>
+        <bug>43684</bug>: Replace JkMountFile by JkMountFileReload in
+        uriworkermap.properties docs. (rjung)
+      </fix>
+      <update>
+        Apache: Add new value "All" for JkMountCopy. (rjung)
+      </update>
+      <fix>
+        <bug>43516</bug>: Memory leak for Apache httpd module
+        of size 8KB for every virtual host without JK directive
+        after each restart. (rjung)
+      </fix>
+      <update>
+        Apache: Cleanup init and destroy of server configuration. (rjung)
+      </update>
+      <update>
+        Apache: Remove global configuration items from per server
+        configuration. (rjung)
+      </update>
+      <update>
+        Apache: Remove unused attributes secret_key and
+        automount/JkAutoMount. (rjung)
+      </update>
+      <update>
+        Cleanup of jk_uri_worker_map. (rjung)
+      </update>
+      <update>
+        Documentation: Small additions to JkShmFile documentation.
+        Contributed by Gerhardus Geldenhuis. (rjung)
+      </update>
+      <fix>
+        AJP13: Ignore flush packets before we received the response headers. (rjung)
+      </fix>
+      <fix>
+        Fix crash during startup when using worker configuration inheritance
+        (attribute "reference") and log level debug. (rjung)
+      </fix>
+      <fix>
+        AJP13: Match header names exactly against pre defined constants. Avoid
+        possible confusion with custom header names using a standard header name
+        as a prefix. (rjung)
+      </fix>
+      <fix>
+        jkstatus: Fix correct parameter validation at JkStatusUpdateTask and 
+        JkStatusUpdateLoadbalancerTask ant tasks. Reported by Christian Mittendorf. (pero)
+      </fix>
+    </changelog>
+  </subsection>
+</section>
 <section name="Changes between 1.2.24 and 1.2.25">
   <br />
   <subsection name="Native">

Modified: trunk/tomcat5.5/connectors/jk/xdocs/miscellaneous/project.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/miscellaneous/project.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/miscellaneous/project.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="Apache Tomcat Connector Documentation - Miscellaneous Documentation"
         href="http://tomcat.apache.org/">
 

Modified: trunk/tomcat5.5/connectors/jk/xdocs/news/20041100.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/news/20041100.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/news/20041100.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!DOCTYPE document [
   <!ENTITY project SYSTEM "project.xml">
 ]>

Modified: trunk/tomcat5.5/connectors/jk/xdocs/news/20050101.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/news/20050101.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/news/20050101.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!DOCTYPE document [
   <!ENTITY project SYSTEM "project.xml">
 ]>

Modified: trunk/tomcat5.5/connectors/jk/xdocs/news/20060101.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/news/20060101.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/news/20060101.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!DOCTYPE document [
   <!ENTITY project SYSTEM "project.xml">
 ]>

Modified: trunk/tomcat5.5/connectors/jk/xdocs/news/20070301.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/news/20070301.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/news/20070301.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!DOCTYPE document [
   <!ENTITY project SYSTEM "project.xml">
 ]>
@@ -15,6 +31,20 @@
 
 <section name="2007 News &amp; Status">
 <br />
+<a name="20071221.1"> 
+<h3>21 December - JK-1.2.26 released</h3>
+</a>
+<p>The Apache Tomcat team is proud to announce the immediate availability
+of Tomcat Connectors 1.2.26. This is a stable release adding few new features
+and some bug fixes.
+</p><p>
+ Please see the <a href="../miscellaneous/changelog.html">ChangeLog</a> for a full list of changes.
+</p>
+<p>If you find any bugs while using this release, please fill in the
+<a href="http://issues.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%206">Bugzilla</a>
+Bug Report. When entering bug select <b>Native:JK</b> Component.
+</p>
+<hr size="1" noshade="noshade" />
 <a name="20070807.1"> 
 <h3>7 August - JK-1.2.25 released</h3>
 </a>

Modified: trunk/tomcat5.5/connectors/jk/xdocs/news/project.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/news/project.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/news/project.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="Apache Tomcat Connector Documentation - News"
         href="http://tomcat.apache.org/">
 

Modified: trunk/tomcat5.5/connectors/jk/xdocs/project.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/project.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/project.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="Apache Tomcat Connector Documentation"
         href="http://tomcat.apache.org/">
 

Modified: trunk/tomcat5.5/connectors/jk/xdocs/reference/apache.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/reference/apache.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/reference/apache.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!DOCTYPE document [
   <!ENTITY project SYSTEM "project.xml">
 ]>
@@ -64,12 +80,26 @@
 </p></attribute>
 <attribute name="JkShmFile" required="false"><p>
 Shared memory file name. Used only on unix platforms.
+The shm file is used by balancer and status workers.
 <br/>
 This directive is only allowed once. It must be put into
  the global part of the configuration.
 <br/>
 The default value is logs/jk-runtime-status.
-</p></attribute>
+It is highly recommended that the shm file be placed on a local
+drive and not an NFS share.
+</p>
+<p>
+The shared memory contains configuration and runtime information for load balancer
+workers and their members. It is need in order that all apache children
+<ul>
+<li>share the same status information for load balancing members (OK, ERROR, ...),</li>
+<li>share the information about load taken by the individual workers,</li>
+<li>share the information for the parts of the configuration, which are changeable
+during runtime by status workers.</li>
+</ul>
+</p>
+</attribute>
 <attribute name="JkShmSize" required="false"><p>
 Size of the shared memory file name.
 <br/>
@@ -78,6 +108,9 @@
 <br/>
 The default value depends on the platform. It is usually less than 64KB.
 </p></attribute>
+<p>Starting with version 1.2.27 the size of the shared memory is determined
+automatically, even for large numbers of workers. This attribute is not
+needed any longer.</p>
 <attribute name="JkMountFile" required="false"><p>
 File containing multiple mappings from a context to a Tomcat worker.
 It is usually called uriworkermap.properties.
@@ -134,16 +167,23 @@
 There is no default value.
 </p></attribute>
 <attribute name="JkMountCopy" required="false"><p>
-If this directive is set to On in some virtual server,
+If this directive is set to "On" in some virtual server,
 the mounts from the global server will be copied to the
 virtual server, more precisely all mounts defined by JkMount
 or JkUnMount. The Mounts defined by JkMountFile and JkAutoAlias
 will only be inherited, if the VirtualHost does not define
 it's own JkMountFile or JkAutoAlias.
 <br/>
-This directive is only allowed inside VirtualHost.
+If you want all vhost to inherit mounts from the main server,
+you can set JkMountCopy to 'All' in the main server.
 <br/>
+This directive is only allowed inside VirtualHost (with value "On")
+and in the global server (with value "All").
+<br/>
 The default is Off.
+<br/>
+Starting with version 1.2.26 you can also set it to "All" in the
+global virtual server. This will switch the default to On.
 </p></attribute>
 <attribute name="JkWorkerIndicator" required="false"><p>
 Name of the Apache environment variable that can be used to set worker names
@@ -397,9 +437,10 @@
 <attributes name="Note">
   <attribute name="JK_WORKER_NAME" required="false">Name of the worker selected by the URI mapping</attribute>
   <attribute name="JK_WORKER_TYPE" required="false">Type of the worker selected by the URI mapping</attribute>
-  <attribute name="JK_WORKER_ROUTE" required="false">Actual worker name selected by the URI mapping (usually a member of the load balancer)</attribute>
-  <attribute name="JK_REQUEST_DURATION" required="false">Request duration in seconds and microseconds.
-                                                         At the moment only available if JkRequestLogFormat is set.</attribute>
+  <attribute name="JK_WORKER_ROUTE" required="false">Actual worker name selected by the URI mapping (usually a member of the load balancer).<br/>
+                                                         Before version 1.2.26 only available if JkRequestLogFormat is set.</attribute>
+  <attribute name="JK_REQUEST_DURATION" required="false">Request duration in seconds and microseconds.<br/>
+                                                         Before version 1.2.26 only available if JkRequestLogFormat is set.</attribute>
   <attribute name="JK_LB_FIRST_NAME" required="false">Load-Balancer: Name of the first worker tried</attribute>
   <attribute name="JK_LB_FIRST_TYPE" required="false">Load-Balancer: Type of the first worker tried</attribute>
   <attribute name="JK_LB_FIRST_ACCESSED" required="false">Load-Balancer: Access count for the first worker tried</attribute>
@@ -729,7 +770,7 @@
 You can use the JkMount directive at the top level or inside &lt;VirtualHost&gt;
 sections of your httpd.conf file.
 </p>
-<p><b>JkUnmount</b> directive acts as an opposite to JkMount and blocks access
+<p><b>JkUnMount</b> directive acts as an opposite to JkMount and blocks access
 to a particular URL. The purpose is to be able to filter out the particular content
 types from mounted context. The following example mounts /servlet/*
 context, but all .gif files that belongs to that context are not served.
@@ -742,9 +783,13 @@
 </source>
 <p>
 JkUnMount takes precedence over JkMount directives, meaning that the JK
-will first look for unmount and then for mount directives. The following
-example will block all .gif files.
+will first try to mount and then checks, if there is an exclusiond defined by a
+JkUnMount. A JkUnMount overrides a JkMount only, if the worker names in the
+JkMount and in the JkUnMount are the same.
 </p>
+<p>
+The following example will block all .gif files although there is a JkMount for them:
+</p>
 <source>
   # do not send requests ending with .gif to worker1
   JkUnMount /*.gif worker1
@@ -752,8 +797,21 @@
   # precedence over JkMount directive
   JkMount /servlet/*.gif worker1
 </source>
-
 <p>
+Starting with version 1.2.26 of JK you can apply a JkUnMount to any worker,
+by using the star character '*' as the worker name in the JkUnMount.
+More complex patterns in JkUnMount worker names are not allowed.
+</p>
+<source>
+  # Mapping the webapps myapp1 and myapp2:
+  /myapp1/*=worker1
+  /myapp2/*=worker2
+  # Exclude the all subdirectories static for all workers:
+  !/*/static/*=*
+  # Exclude some suffixes for all workers:
+  !*.html=*
+</source>
+<p>
 <b>JkAutoAlias</b> directive automatically <b>Alias</b> webapp context directories into
 the Apache document space. It enables Apache to serve a static context while Tomcat
 serving dynamic context. This directive is used for convenience so that you don't
@@ -792,7 +850,7 @@
 <p>
 <b>JkWorkerProperty</b> is a new directive available from JK 1.2.7
 version. It is a convenient method for setting directives that are
-usually set inside <b>workers.propeties</b>file. The parameter for
+usually set inside <b>workers.propeties</b> file. The parameter for
 that directive is raw line from workers.properties file.
 </p>
 <source>
@@ -816,7 +874,7 @@
   JkMountFile conf/uriworkermap.properties
 </source>
 <p>If the mount point uri starts with an exclamation mark '!'
-it defines an exclusion in the same way JkUnmount does.
+it defines an exclusion in the same way JkUnMount does.
 If the mount point uri starts with minus sign '-'
 the mount point will only be disabled. A disabled mount can be reenabled
 by deleting the minus sign and waiting for the JkMountFile to reload.

Modified: trunk/tomcat5.5/connectors/jk/xdocs/reference/iis.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/reference/iis.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/reference/iis.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!DOCTYPE document [
   <!ENTITY project SYSTEM "project.xml">
 ]>
@@ -82,6 +98,9 @@
 (Set this value only if you have <b>more</b> then <b>64</b> workers)
 </p>
 <p>This directive has been added in version 1.2.20</p>
+<p>Starting with version 1.2.27 the size of the shared memory is determined
+automatically, even for large numbers of workers. This attribute is not
+needed any longer.</p>
 </attribute>
 <attribute name="worker_mount_reload" required="false"><p>
 A DWORD value specifying the time in seconds upon which the

Modified: trunk/tomcat5.5/connectors/jk/xdocs/reference/project.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/reference/project.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/reference/project.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="Apache Tomcat Connector Documentation - Reference Guide"
         href="http://tomcat.apache.org/">
 

Modified: trunk/tomcat5.5/connectors/jk/xdocs/reference/status.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/reference/status.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/reference/status.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!DOCTYPE document [
   <!ENTITY project SYSTEM "project.xml">
 ]>
@@ -24,9 +40,6 @@
 </p>
 <p>
 The status worker is especially powerful, when used together with load balancing workers.
-The dynamic management features of load balancers in combination with the status worker
-are a good reason, to use load balancer workers on top of ajp13 workers, even if there would
-be only one member worker in the load balancer.
 </p>
 <p>
 This document does not explain the HTML user interface of the status worker.
@@ -69,8 +82,7 @@
 worker will be applied during runtime without a restart of the web server.
 </li>
 <li>
-<b>reset</b>: reset all runtime information for a load balancer
-or one of its members.
+<b>reset</b>: reset all runtime statistics for a worker.
 </li>
 <li>
 <b>recover</b>: Mark a member of a load balancer, that is in error state, for immediate recovery.
@@ -78,6 +90,12 @@
 <li>
 <b>version</b>: only show version information of the web server and the JK software
 </li>
+<li>
+<b>dump</b>: list the original workers configuration. <b>Caution</b>: the dump will only contain
+the configuration that was used during startup. Any changes applied later by the dynamic management
+interface of the status worker itself will not be contained in this dump.
+The dump action has been added in version 1.2.27.
+</li>
 </ul>
 </p>
 </subsection>
@@ -126,21 +144,37 @@
 <b>Legend</b>: Do not show the legend for the information presented in "list" and "show" actions
 </li>
 <li>
-<b>Load Balancer Workers</b>: Do not show workers of type "lb"
+<b>URI mappings</b>: Do not show the URI mapping for the workers
 </li>
 <li>
+<b>Load Balancing Workers</b>: Do not show workers of type "lb"
+</li>
+<li>
 <b>AJP Workers</b>: Do not show workers of type ajp
 </li>
 <li>
-<b>Member Workers</b>: Do not show detailed information concerning each member of load balancers
+<b>Balancer Members</b>: Do not show detailed information concerning each member of load balancers
 </li>
+<li>
+<b>Load Balancer Configuration</b>: Do not show configuration data for load balancers
+</li>
+<li>
+<b>Load Balancer Summary</b>: Do not show status summary for load balancers
+</li>
+<li>
+<b>AJP Configuration</b>: Do not show configuration data for ajp workers load balancer members
+</li>
 </ul>
+The last three minimization features have been added in version 1.2.27.
 </p>
 </subsection>
 
 <subsection name="Special Considerations concerning URL Maps and Virtual Hosts">
 <br/>
 <p>
+<b>Note: </b>The following restriction has been removed starting with version 1.2.26.
+</p>
+<p>
 The Apache module mod_jk makes use of the internal Apache httpd infrastructure concerning
 virtual hosts. The downside of this is, that the status worker can only show URL maps, for
 the virtual host it is defined in. It is not able to reach the configuration objects
@@ -208,7 +242,7 @@
 </source>
 When writing HTML output, the status worker then includes the line
 <source>
-<link rel="stylesheet" type="text/css" href="/private/admin/static/mystatus.css" />
+&lt;link rel="stylesheet" type="text/css" href="/private/admin/static/mystatus.css" /&gt;
 </source>
 There is no sample stylesheet included with the mod_jk release, and by default the attribute css
 is empty, so no stylesheet reference will be included in the pages. The HTML code
@@ -347,19 +381,23 @@
 <br/>
 <p>
 This section should help you building automation scripts based on the jk status
-management interface. This interface is still not stable, we expect further
-improvements in the next releases. It is well possible, that the request parameters
-might change in an incompatible way. So be prepared to change you scripts when
-updating to future versions.
+management interface. This interface is stable in the sense, that we only expect
+to add further parameters in the future. Existing parameters from previous versions
+will keep their original semantics. We also expect the output formats XML, Properties
+and Text to be kept stable. So please use those, if you want to parse status worker
+output in your automation scripts.
 </p>
 <subsection name="Actions">
 <br/>
 <p>
 The action is determined by the parameter <b>cmd</b>. It can have the values "list", "show",
-"edit", "update", "reset", "recover" and "version". If you omit the "cmd" parameter,
+"edit", "update", "reset", "recover", "version" and "dump". If you omit the "cmd" parameter,
 the default "list" will be used.
-All actions except for "list" and "refresh" need additional parameters.
+All actions except for "list", "refresh", "version" and "dump" need additional parameters.
 </p>
+<p>
+The action "dump" has been added in version 1.2.27.
+</p>
 </subsection>
 <subsection name="Output Format">
 <br/>
@@ -410,7 +448,17 @@
 <li>
 <b>0x0020</b>: only allow read_only actions for a read/write status worker.
 </li>
+<li>
+<b>0x0040</b>: hide load balancer configuration
+</li>
+<li>
+<b>0x0080</b>: hide load balancer status summary
+</li>
+<li>
+<b>0x0100</b>: hide configuraton for ajp and load balancer member workers
+</li>
 </ul>
+Values 0x0040-0x0100 have been added in version 1.2.27.
 </p>
 </subsection>
 <subsection name="Data Parameters for the standard Update Action">
@@ -421,48 +469,76 @@
 contain the configuration information, you want to change. First the list for load balancer workers:
 <ul>
 <li>
-<b>lr</b>: retries (number)
+<b>vlr</b>: retries (number)
 </li>
 <li>
-<b>lt</b>: recover_time (seconds)
+<b>vlt</b>: recover_time (seconds)
 </li>
 <li>
-<b>lx</b>: max_reply_timeouts (number)
+<b>vlx</b>: max_reply_timeouts (number)
 </li>
 <li>
-<b>ls</b>: sticky_session (0/f/n/off=off, 1/t/y/on=on; case insensitive)
+<b>vls</b>: sticky_session (0/f/n/off=off, 1/t/y/on=on; case insensitive)
 </li>
 <li>
-<b>lf</b>: sticky_session_force (0/f/n/off=off, 1/t/y/on=on; case insensitive)
+<b>vlf</b>: sticky_session_force (0/f/n/off=off, 1/t/y/on=on; case insensitive)
 </li>
 <li>
-<b>lm</b>: method (0/r="Requests", 1/t="Traffic", 2/b="Busyness", 3/s="Sessions"; case insensitive, only first character is used)
+<b>vlm</b>: method (0/r="Requests", 1/t="Traffic", 2/b="Busyness", 3/s="Sessions"; case insensitive, only first character is used)
 </li>
 <li>
-<b>ll</b>: lock (0/o="Optimistic", 1/p="Pessimistic"; case insensitive, only first character is used)
+<b>vll</b>: lock (0/o="Optimistic", 1/p="Pessimistic"; case insensitive, only first character is used)
 </li>
 </ul>
 And now the list of parameters you can use to change settings for load balancer members:
 <ul>
 <li>
-<b>wa</b>: activation flag (0/a="active", 1/d="disabled", 2/s="stopped"; case insensitive, only first character is used)
+<b>vwa</b>: activation flag (0/a="active", 1/d="disabled", 2/s="stopped"; case insensitive, only first character is used)
 </li>
 <li>
-<b>wf</b>: load balancing factor (integer weight)
+<b>vwf</b>: load balancing factor (integer weight)
 </li>
 <li>
-<b>wn</b>: route for use with sticky sessions (string)
+<b>vwn</b>: route for use with sticky sessions (string)
 </li>
 <li>
-<b>wr</b>: redirect to define simple failover rules (string)
+<b>vwr</b>: redirect to define simple failover rules (string)
 </li>
 <li>
-<b>wc</b>: domain to tell JK about your replication design (string)
+<b>vwc</b>: domain to tell JK about your replication design (string)
 </li>
 <li>
-<b>wd</b>: distance to express preferences (integer)
+<b>vwd</b>: distance to express preferences (integer)
 </li>
 </ul>
+Finally the list of parameters you can use to change settings for ajp workers and ajp load balancer members:
+<ul>
+<li>
+<b>vacpt</b>: connection_pool_timeout (number)
+</li>
+<li>
+<b>vact</b>: connect_timeout (number)
+</li>
+<li>
+<b>vapt</b>: prepost_timeout (number)
+</li>
+<li>
+<b>vart</b>: reply_timeout (number)
+</li>
+<li>
+<b>var</b>: retries (number)
+</li>
+<li>
+<b>varo</b>: recovery_options (number)
+</li>
+<li>
+<b>vamps</b>: max_packet_size (number)
+</li>
+</ul>
+The leading character "v" has been added to the parameters in version 1.2.27.
+Changing settings for ajp workers has also been introduced in version 1.2.27.
+</p>
+<p>
 For the details of all parameters, we refer to the <a href="workers.html">workers.properties Reference</a>.
 </p>
 </subsection>
@@ -474,7 +550,8 @@
 configuration aspect for all members of a load balancer simultaneously, this
 will be triggered by the parameter <b>att</b>. The value of the parameter indicates,
 which aspect you want to edit. The list is the same as in the previous section:
-"wa", "wf", "wn", "wr", "wc" and "wd". But here you
+"vwa", "vwf", "vwn", "vwr", "vwc", "vwd", "vacpt", "vact", "vapt", "vart", "var",
+"varo" and "vamps". But here you
 need to put the name into the parameter "att", instead of using it as a request
 parameter name.
 </p>

Modified: trunk/tomcat5.5/connectors/jk/xdocs/reference/uriworkermap.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/reference/uriworkermap.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/reference/uriworkermap.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!DOCTYPE document [
   <!ENTITY project SYSTEM "project.xml">
 ]>
@@ -126,7 +142,7 @@
 Exclusion rules allows to define exclusions from URI rules, which would forward
 requests to tomcat. If the exclusion rule matches, the request will not be forwarded.
 This is usually used to serve static content by the web server.
-An rule is an exclusion rule, if it is suffixed with '!':
+A rule is an exclusion rule, if it is suffixed with '!':
 <source>
   # Mapping the URI /myapp and everything under /myapp/:
   /myapp|/*=myworker
@@ -135,6 +151,20 @@
   # Exclude some suffixes:
   !*.html=myworker
 </source>
+An exclusion rule overrides a normal mapping rule only, if the worker names in the
+normal rule and in the exclusion rule are the same. Starting with version 1.2.26 of JK
+you can apply an exclusion rule to any worker, by using the star character '*' as
+the worker name in the exclusion rule.
+More complex patterns in exclusion worker names are not allowed.
+<source>
+  # Mapping the webapps /myapp1 and /myapp2:
+  /myapp1|/*=myworker1
+  /myapp2|/*=myworker2
+  # Exclude the all subdirectories static for all workers:
+  !/*/static|/*=*
+  # Exclude some suffixes for all workers:
+  !*.html=*
+</source>
 </p>
 <p>
 Rule disabling comes into play, if your web server merges rules from various sources,
@@ -211,7 +241,8 @@
 For Apache you can define individual uriworkermap files per virtual host.
 The directive JkMountFile can be used in the main server and in each virtual host.
 If a virtual host does not use JkMountfile, but JkMountCopy is set to 'On',
-then it inhertis the JkMountFile from the main server.
+then it inherits the JkMountFile from the main server. If you want all vhost to inherit
+mounts from the main server, you can set JkMountCopy to 'All' in the main server.
 </p>
 </subsection>
 </section>
@@ -224,7 +255,7 @@
 if the last check happened at least n seconds ago.
 </p>
 <p>
-For Apache you can configure the interval "n" using the directive JkMountFile,
+For Apache you can configure the interval "n" using the directive JkMountFileReload,
 for IIS you would use the attribute worker_mount_reload.
 The default value is 60 seconds. A value of "0" turns off the reloading.
 </p>
@@ -247,22 +278,43 @@
 <p>
 The configuration view of the status worker also shows the various mapping rules.
 After each worker's configuration, the rules are listed, that forward to this worker.
-The list contains three columns:
+The list contains four columns:
 <ul>
 <li>
-the type of the rule: Exact or Wildchar, eventually prefixed with Disabled or Unmount (for exclusion rules)
+the name of the virtual server
 </li>
 <li>
-the URI pattern
+the URI pattern, prefixed with '-' for a disabled pattern and '!' for an exclusion pattern
 </li>
 <li>
+the type of the rule: Exact or Wildchar
+</li>
+<li>
 and the source of the rule definition: 'worker definition' for the workers.properties file (mount attribute),
 'JkMount' for Apache httpd JkMount and it's relatives and finally 'uriworkermap' for the uriworkermap file.
 </li>
 </ul>
+</p>
+<p>
+<b>Note: </b>The following restriction has been removed starting with version 1.2.26.
+<br/>
 For Apache httpd, there is an important subtlety: the request going to the status worker
 gets executed in the context of some server (main or virtual). The status worker will only show the
 mapping rules, that are defined for this server (main or virtual).
+<br/>
+Until version 1.2.25 the list contained three columns:
+<ul>
+<li>
+the type of the rule: Exact or Wildchar, eventually prefixed with Disabled or Unmount (for exclusion rules)
+</li>
+<li>
+the URI pattern
+</li>
+<li>
+and the source of the rule definition: 'worker definition' for the workers.properties file (mount attribute),
+'JkMount' for Apache httpd JkMount and it's relatives and finally 'uriworkermap' for the uriworkermap file.
+</li>
+</ul>
 </p>
 </section>
 

Modified: trunk/tomcat5.5/connectors/jk/xdocs/reference/workers.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/reference/workers.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/reference/workers.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!DOCTYPE document [
   <!ENTITY project SYSTEM "project.xml">
 ]>
@@ -226,18 +242,18 @@
 </directive>
 
 <directive name="socket_timeout" default="0" required="false">
-Socket timeout in seconds used for communication channel between JK and remote host.
-If remote host does not respond inside that timeout the JK will generate an error,
-and retry again. If set to value zero (default) the JK will wait for infinite
+Socket timeout in seconds used for the communication channel between JK and remote host.
+If the remote host does not respond inside the timeout specified, JK will generate an error,
+and retry again. If set to zero (default) JK will wait for an infinite amount of time
 on all socket operations.
 </directive>
 
 <directive name="socket_keepalive" default="False" required="false">
 This directive should be used when you have a firewall between your webserver
-and the Tomcat engine, who tend to drop inactive connections. This flag will told Operating System
-to send <code>KEEP_ALIVE</code> message on inactive connections (interval depend on global OS settings,
-generally 120 minutes), and thus prevent the firewall to cut the connection.
-To enable keepalive set this property value to the <b>True</b>.
+and the Tomcat engine, who tend to drop inactive connections. This flag will tell the Operating System
+to send <code>KEEP_ALIVE</code> messages on inactive connections (interval depend on global OS settings,
+generally 120 minutes), and thus prevent the firewall to cut inactive connections.
+To enable keepalive set this property value to <b>True</b>.
 <p>
 The problem with Firewall cutting inactive connections is that sometimes, neither webserver or Tomcat
 have information about the cut and couldn't handle it.
@@ -250,7 +266,7 @@
 It will limit the number of those connection that each web server child
 process can made.
 <p>
-Connection pool size property is used only for multi threaded
+Connection pool size property is only used for multi threaded
 web servers such as Apache 2.0 (worker), IIS and Netscape. The connection_pool_size property
 should reflect the number of threads per child process. JK will discover
 the number of threads per child process on Apache 2 web server with worker-mpm and set
@@ -642,8 +658,12 @@
 If you set a reply_timeout, adjust it carefully if you have long running servlets.
 </p>
 <p>
+The reply_timeout can be overwritten using the Apache httpd environment variable
+JK_REPLY_TIMEOUT.
+</p>
+<p>
 This features has been added in <b>jk 1.2.6</b> to avoid problem with hung Tomcat's and works on all
-servlet engines supporting ajp13.
+servlet engines supporting ajp13. The variable JK_REPLY_TIMEOUT has been added in version 1.2.27.
 </p>
 </directive>
 
@@ -861,10 +881,14 @@
 </directive>
 
 <directive name="redirect" workers="SUB" default="" required="false">
-Set to the preferred failover worker. If worker matching SESSION ID is in
-error state then the redirect worker will be used instead. It will be used
-even if being disabled, thus offering hot standby.
+Set to the name of the preferred failover worker. If worker matching
+SESSION ID is in error state then the redirect worker will be used instead.
+It will be used even if being disabled, thus offering hot standby.
 <p>
+If you explicitely set a route via the "route" attribute, you must set "redirect"
+to this route of the preferred failover worker and not to its name.
+</p>
+<p>
 This feature has been added in <b>jk 1.2.9</b>.
 </p>
 </directive>

Modified: trunk/tomcat5.5/connectors/jk/xdocs/style.css
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/style.css	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/style.css	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
 div.screen {
     margin: 10px 0px 10px 20px;
     font-size: smaller;

Modified: trunk/tomcat5.5/connectors/jk/xdocs/style.xsl
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/style.xsl	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/style.xsl	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,7 +1,23 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!-- Content Stylesheet for "tomcat-docs" Documentation -->
 
-<!-- $Id: style.xsl 560181 2007-07-27 10:12:34Z rjung $ -->
+<!-- $Id: style.xsl 572120 2007-09-02 19:32:11Z markt $ -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   version="1.0">

Modified: trunk/tomcat5.5/connectors/jk/xdocs/webserver_howto/apache.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/webserver_howto/apache.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/webserver_howto/apache.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -25,7 +25,7 @@
 <title>Apache HowTo</title>
 <author email="hgomez at apache.org">Henri Gomez</author>
 <author email="shachor at il.ibm.com">Gal Shachor</author>
-<date>$Date: 2007-07-26 09:42:00 -0600 (Thu, 26 Jul 2007) $</date>
+<date>$Date: 2008-01-15 11:38:01 -0700 (Tue, 15 Jan 2008) $</date>
 </properties>
 <body>
 <section name="Introduction">
@@ -219,7 +219,7 @@
 </li>
 <li>
 <b>workers.properties</b> - A file that describes the host(s) and port(s) used by the workers (Tomcat processes).
-A sample workers.properties can be found under the conf directory.
+A sample workers.properties can be found under the conf directory in the source download.
 </li>
 </ul>
 </p>
@@ -951,6 +951,24 @@
 For instance, the prefork MPM is not multi-threaded. For Apache httpd 1.3
 this flag will be set automatically.</td>
 </tr>
+  <tr valign="top"><td>--disable-trace</td>
+  <td>
+When using log level "trace", mod_jk traces a lot of function calls with
+"enter" and "exit" log messages. Even if the log level is not "trace",
+comparing the log levels to decide about logging has some performance
+impact.<br/>
+If you use "--disable-trace", then the trace log code doesn't get compiled
+into the module binary and you might save some cycles during execution.<br/>
+Even with "--disable-trace" logging debug messages with debug log level
+will still be possible.</td>
+</tr>
+  <tr valign="top"><td>--enable-api-compatibility</td>
+  <td>
+Only use httpd API functions available in all httpd production releases
+of the chosen major httpd release branch. This improves binary
+compatibility of module builds with httpd releases older than the release
+against mod_jk is build (only between minor httpd versions).</td>
+</tr>
   <tr valign="top"><td>--enable-flock</td>
   <td>
 In case the operating system supports flock system call use this flag to enable this

Modified: trunk/tomcat5.5/connectors/jk/xdocs/webserver_howto/project.xml
===================================================================
--- trunk/tomcat5.5/connectors/jk/xdocs/webserver_howto/project.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jk/xdocs/webserver_howto/project.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="Apache Tomcat Connector Documentation - Webserver HowTo"
         href="http://tomcat.apache.org/">
 

Added: trunk/tomcat5.5/connectors/jni/CHANGELOG.txt
===================================================================
--- trunk/tomcat5.5/connectors/jni/CHANGELOG.txt	                        (rev 0)
+++ trunk/tomcat5.5/connectors/jni/CHANGELOG.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -0,0 +1,11 @@
+Fix: IFS problem in native/build/tcnative.m4 (rjung)
+Fix: Wrong gcc link flag in native/build/tcnative.m4 (rjung)
+Tag: 1_1.12
+Improvement: Add support of J9VM based JVM. (jfclere)
+Improvement: Arrange licence in source files. (markt).
+Improvement: Add two new 'immediate' methods for sending the data.
+             It is the responsibility of the Java callee to deal with
+             the returned values and retry if the error was non-fatal. (mturk)
+Fix: Arrange the check of openssl version. It was failing on Linux. (jfclere)
+Fix: Prevent returning APR_SUCCESS when there is something wrong in ssl layer.  Fix for PR: 44087 (jfclere)
+Tag: 1_1.11

Modified: trunk/tomcat5.5/connectors/jni/README.txt
===================================================================
--- trunk/tomcat5.5/connectors/jni/README.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jni/README.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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 directory contains both the native and java-side code for
 Tomcat Native Library.
 

Modified: trunk/tomcat5.5/connectors/jni/build.xml
===================================================================
--- trunk/tomcat5.5/connectors/jni/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jni/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <!-- Build file for Tomcat Native -->
 <project name="Tomcat Native" default="compile" basedir=".">
     <!-- Give user a chance to override without editing this file

Modified: trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/Echo.properties
===================================================================
--- trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/Echo.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/Echo.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,2 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # Telnet properties
 echo.port=23

Modified: trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/Local.properties
===================================================================
--- trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/Local.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/Local.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # Local properties
 local.max=10
 

Modified: trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/LocalServer.java
===================================================================
--- trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/LocalServer.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/LocalServer.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jni;
 
 import java.io.InputStream;
@@ -6,7 +22,7 @@
 /** Local Socket server example
  *
  * @author Mladen Turk
- * @version $Revision: 473804 $, $Date: 2006-11-11 14:56:15 -0700 (Sat, 11 Nov 2006) $
+ * @version $Revision: 572121 $, $Date: 2007-09-02 13:33:36 -0600 (Sun, 02 Sep 2007) $
  */
 
 public class LocalServer {

Modified: trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/SSL.properties
===================================================================
--- trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/SSL.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/SSL.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # SSL Server and client properties
 server.port=4443
 server.cert=localhost.crt

Modified: trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/SSLServer.java
===================================================================
--- trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/SSLServer.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jni/examples/org/apache/tomcat/jni/SSLServer.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jni;
 
 import java.io.InputStream;
@@ -6,7 +22,7 @@
 /** SSL Server server example
  *
  * @author Mladen Turk
- * @version $Revision: 473804 $, $Date: 2006-11-11 14:56:15 -0700 (Sat, 11 Nov 2006) $
+ * @version $Revision: 572121 $, $Date: 2007-09-02 13:33:36 -0600 (Sun, 02 Sep 2007) $
  */
 
 public class SSLServer {

Modified: trunk/tomcat5.5/connectors/jni/java/org/apache/tomcat/apr.properties
===================================================================
--- trunk/tomcat5.5/connectors/jni/java/org/apache/tomcat/apr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jni/java/org/apache/tomcat/apr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 tcn.info=Tomcat Native/@VERSION@

Modified: trunk/tomcat5.5/connectors/jni/jnirelease.sh
===================================================================
--- trunk/tomcat5.5/connectors/jni/jnirelease.sh	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jni/jnirelease.sh	2008-04-06 12:38:06 UTC (rev 6107)
@@ -62,6 +62,7 @@
 svn cat $SVNBASE/${JKJNIEXT}/KEYS > ${JKJNIDIST}/KEYS
 svn cat $SVNBASE/${JKJNIEXT}/LICENSE > ${JKJNIDIST}/LICENSE
 svn cat $SVNBASE/${JKJNIEXT}/NOTICE > ${JKJNIDIST}/NOTICE
+svn cat $SVNBASE/${JKJNIEXT}/jni/CHANGELOG.txt > ${JKJNIDIST}/CHANGELOG.txt
 svn cat $SVNBASE/${JKJNIEXT}/jni/NOTICE.txt > ${JKJNIDIST}/NOTICE.txt
 svn cat $SVNBASE/${JKJNIEXT}/jni/README.txt > ${JKJNIDIST}/README.txt
 #
@@ -80,6 +81,7 @@
 svn cat $SVNBASE/${JKJNIEXT}/KEYS > ${JKJNIDIST}/KEYS
 svn cat $SVNBASE/${JKJNIEXT}/LICENSE > ${JKJNIDIST}/LICENSE
 svn cat $SVNBASE/${JKJNIEXT}/NOTICE > ${JKJNIDIST}/NOTICE
+svn cat $SVNBASE/${JKJNIEXT}/jni/CHANGELOG.txt > ${JKJNIDIST}/CHANGELOG.txt
 svn cat $SVNBASE/${JKJNIEXT}/jni/NOTICE.txt > ${JKJNIDIST}/NOTICE.txt
 svn cat $SVNBASE/${JKJNIEXT}/jni/README.txt > ${JKJNIDIST}/README.txt
 zip -9rqo ${JKJNIDIST}.zip ${JKJNIDIST}

Modified: trunk/tomcat5.5/connectors/jni/native/build/tcnative.m4
===================================================================
--- trunk/tomcat5.5/connectors/jni/native/build/tcnative.m4	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jni/native/build/tcnative.m4	2008-04-06 12:38:06 UTC (rev 6107)
@@ -31,7 +31,7 @@
     AC_MSG_ERROR(APR config could not be located. Please use the --with-apr option.)
   fi
   sapr_version="`echo $sapr_pversion|sed -e 's/\([a-z]*\)$/.\1/'`"
-  IFS=.; set $sapr_version; IFS=' '
+  tc_save_IFS=$IFS; IFS=.; set $sapr_version; IFS=$tc_save_IFS
   if test "${1}" -lt "1"; then
     AC_MSG_ERROR(You need APR version 1.2.1 or newer installed.)
   else
@@ -239,9 +239,24 @@
     then
       AC_MSG_RESULT([Using sableVM: $SABLEVM])
       CFLAGS="$CFLAGS -DHAVE_SABLEVM"
+      NEED_JNI_MD=no
     fi
   fi
   ])
+dnl check for IBM J9VM
+AC_DEFUN(
+  [TCN_J9VM],
+  [
+  if test x"$JAVA_HOME" != x
+  then
+    J9VM=`$JAVA_HOME/bin/java -version 2>&1 | grep J9VM`
+    if test x"$J9VM" != x
+    then
+      AC_MSG_RESULT([Using J9VM: $J9VM])
+      NEED_JNI_MD=no
+    fi
+  fi
+  ])
 
 dnl TCN_HELP_STRING(LHS, RHS)
 dnl Autoconf 2.50 can not handle substr correctly.  It does have 
@@ -321,7 +336,7 @@
                 TCN_OPENSSL_LIBS="-L$use_openssl/lib -Wl,+b: -lssl -lcrypto"
                 ;;
             *linux*)
-                TCN_OPENSSL_LIBS="-L$use_openssl/lib --Wl,-rpath,$use_openssl/lib -lssl -lcrypto"
+                TCN_OPENSSL_LIBS="-L$use_openssl/lib -Wl,-rpath,$use_openssl/lib -lssl -lcrypto"
                 ;;
             *)
                 TCN_OPENSSL_LIBS="-L$use_openssl/lib -lssl -lcrypto"

Modified: trunk/tomcat5.5/connectors/jni/native/configure.in
===================================================================
--- trunk/tomcat5.5/connectors/jni/native/configure.in	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jni/native/configure.in	2008-04-06 12:38:06 UTC (rev 6107)
@@ -106,8 +106,10 @@
 dnl
 dnl  Find the JVM related information
 dnl
+NEED_JNI_MD=yes
 TCN_FIND_JDK
 TCN_SABLEVM
+TCN_J9VM
 
 dnl MAC OS X does not used include but Headers
 if test -d ${JAVA_HOME}/Headers; then
@@ -118,7 +120,7 @@
 APR_ADDTO(TCNATIVE_PRIV_INCLUDES,[-I$JAVA_HOME/$JAVA_INC])
 
 dnl sableVM does not have/need $JAVA_OS/jni_md.h
-if test "$SABLEVM" = "NONE"; then
+if test "$NEED_JNI_MD" = "yes"; then
   TCN_FIND_JDK_OS
   if test -z "${JAVA_OS}"; then
     AC_MSG_RESULT([jni_md.h found in $JAVA_HOME/$JAVA_INC])

Modified: trunk/tomcat5.5/connectors/jni/native/os/win32/libtcnative.rc
===================================================================
--- trunk/tomcat5.5/connectors/jni/native/os/win32/libtcnative.rc	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jni/native/os/win32/libtcnative.rc	2008-04-06 12:38:06 UTC (rev 6107)
@@ -3,22 +3,20 @@
 LANGUAGE 0x9,0x1
 1 11 logmessages.bin
 
-#define TCN_COPYRIGHT "Copyright 2000-2007 The Apache Software " \
-                      "Foundation or its licensors, as applicable."
+#define TCN_COPYRIGHT "Licensed to the Apache Software Foundation (ASF) under " \
+                      "one or more contributor license agreements.  See the " \
+                      "NOTICE file distributed with this work for additional " \
+                      "information regarding copyright ownership."
 
-#define TCN_LICENSE  "Licensed to the Apache Software Foundation (ASF) under " \
-                     "one or more contributor license agreements.  See the " \
-                     "NOTICE file distributed with this work for additional "\
-                     "information regarding copyright ownership. The ASF " \
-                     "licenses this file to You 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\r\n\r\n"
+#define TCN_LICENSE  "The ASF licenses this file to You 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\r\n\r\n" \
                      "http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n" \
                      "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. "\
+                     "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."
 

Modified: trunk/tomcat5.5/connectors/jni/native/src/sslcontext.c
===================================================================
--- trunk/tomcat5.5/connectors/jni/native/src/sslcontext.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jni/native/src/sslcontext.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -17,7 +17,7 @@
 /** SSL Context wrapper
  *
  * @author Mladen Turk
- * @version $Revision: 520518 $, $Date: 2007-03-20 19:48:25 +0100 (Tue, 20 Mar 2007) $
+ * @version $Revision: 607875 $, $Date: 2008-01-01 10:33:12 -0700 (Tue, 01 Jan 2008) $
  */
 
 #include "tcn.h"
@@ -534,7 +534,7 @@
     if (!key_file)
         key_file = cert_file;
     if (!key_file) {
-        tcn_Throw(e, "No Certificate file specified");
+        tcn_Throw(e, "No Certificate file specified or invalid file format");
         rv = JNI_FALSE;
         goto cleanup;
     }

Modified: trunk/tomcat5.5/connectors/jni/native/src/sslnetwork.c
===================================================================
--- trunk/tomcat5.5/connectors/jni/native/src/sslnetwork.c	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/jni/native/src/sslnetwork.c	2008-04-06 12:38:06 UTC (rev 6107)
@@ -17,7 +17,7 @@
 /** SSL network wrapper
  *
  * @author Mladen Turk
- * @version $Revision: 479966 $, $Date: 2006-11-28 02:48:30 -0700 (Tue, 28 Nov 2006) $
+ * @version $Revision: 605571 $, $Date: 2007-12-19 08:13:12 -0700 (Wed, 19 Dec 2007) $
  */
 
 #include "tcn.h"
@@ -333,7 +333,7 @@
                     if (!APR_STATUS_IS_EAGAIN(os) &&
                         !APR_STATUS_IS_EINTR(os)) {
                         con->shutdown_type = SSL_SHUTDOWN_TYPE_UNCLEAN;
-                        return os;
+                        return os == APR_SUCCESS ? APR_EGENERAL : os;
                     }
                 break;
                 default:
@@ -407,7 +407,7 @@
                     if (!APR_STATUS_IS_EAGAIN(os) &&
                         !APR_STATUS_IS_EINTR(os)) {
                         con->shutdown_type = SSL_SHUTDOWN_TYPE_UNCLEAN;
-                        return os;
+                        return os == APR_SUCCESS ? APR_EGENERAL : os;
                     }
                 break;
                 default:
@@ -458,7 +458,7 @@
                     if (!APR_STATUS_IS_EAGAIN(os) &&
                         !APR_STATUS_IS_EINTR(os)) {
                         con->shutdown_type = SSL_SHUTDOWN_TYPE_UNCLEAN;
-                        return os;
+                        return os == APR_SUCCESS ? APR_EGENERAL : os;
                     }
                 break;
                 default:

Modified: trunk/tomcat5.5/connectors/juli/build.xml
===================================================================
--- trunk/tomcat5.5/connectors/juli/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/juli/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="Juli" default="compile" basedir=".">
 
 
@@ -2,4 +19,3 @@
 <!--
-        "Coyote" connector framework for Jakarta Tomcat
-        $Id: build.xml 300326 2005-03-02 18:30:45Z remm $
+        $Id: build.xml 572122 2007-09-02 19:34:12Z markt $
 -->

Modified: trunk/tomcat5.5/connectors/juli/src/conf/logging.properties
===================================================================
--- trunk/tomcat5.5/connectors/juli/src/conf/logging.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/juli/src/conf/logging.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 handlers = org.apache.juli.FileHandler java.util.logging.ConsoleHandler
 
 ############################################################

Modified: trunk/tomcat5.5/connectors/juli/src/java/org/apache/juli/ClassLoaderLogManager.java
===================================================================
--- trunk/tomcat5.5/connectors/juli/src/java/org/apache/juli/ClassLoaderLogManager.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/juli/src/java/org/apache/juli/ClassLoaderLogManager.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -452,19 +452,24 @@
      */
     protected String replace(String str) {
         String result = str;
-        if (result.startsWith("${")) {
-            int pos = result.indexOf('}');
-            if (pos != -1) {
-                String propName = result.substring(2, pos);
+        int pos_start = result.indexOf("${");
+        if (pos_start != -1) {
+            int pos_end = result.indexOf('}');
+            if (pos_end != -1) {
+                String propName = result.substring(pos_start + 2, pos_end);
                 String replacement = System.getProperty(propName);
                 if (replacement != null) {
-                    result = replacement + result.substring(pos + 1);
+                    if(pos_start >0) {
+                        result = result.substring(0,pos_start) + 
+                            replacement + replace(result.substring(pos_end + 1));
+                    } else {                       
+                        result = replacement + replace(result.substring(pos_end + 1));
+                    }
                 }
             }
         }
         return result;
     }
-    
 
     // ---------------------------------------------------- LogNode Inner Class
 

Deleted: trunk/tomcat5.5/connectors/patch.txt
===================================================================
--- trunk/tomcat5.5/connectors/patch.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/patch.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,26 +0,0 @@
-Index: util/java/org/apache/tomcat/util/buf/B2CConverter.java
-===================================================================
---- util/java/org/apache/tomcat/util/buf/B2CConverter.java	(revision 568320)
-+++ util/java/org/apache/tomcat/util/buf/B2CConverter.java	(working copy)
-@@ -82,7 +82,7 @@
-     {
-         try {
-             // read from the reader
--            while( true ) { // conv.ready() ) {
-+            while( iis.available()>0 ) { // conv.ready() ) {
-                 int cnt=conv.read( result, 0, BUFFER_SIZE );
-                 if( cnt <= 0 ) {
-                     // End of stream ! - we may be in a bad state
-@@ -251,7 +251,12 @@
-     public  final int read() throws IOException {
-         return (pos < end ) ? (buf[pos++] & 0xff) : -1;
-     }
-+    
-+    public int available() throws IOException {
-+        return end-pos;
-+    }
- 
-+
-     // -------------------- Internal methods --------------------
- 
-     void setBuffer( byte b[], int p, int l ) {

Modified: trunk/tomcat5.5/connectors/procrun/README.txt
===================================================================
--- trunk/tomcat5.5/connectors/procrun/README.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/procrun/README.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,19 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+
 Placeholder for procrun binaries used for Tomcat 5.x
 
 Rename binaries to reflect default service name:

Deleted: trunk/tomcat5.5/connectors/testdata.rtf
===================================================================
--- trunk/tomcat5.5/connectors/testdata.rtf	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/testdata.rtf	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,264 +0,0 @@
-{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch13\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f13\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt Arial Unicode MS};}
-{\f120\fnil\fcharset134\fprq2{\*\panose 00000000000000000000}@SimSun;}{\f121\froman\fcharset238\fprq2 Times New Roman CE;}{\f122\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f124\froman\fcharset161\fprq2 Times New Roman Greek;}
-{\f125\froman\fcharset162\fprq2 Times New Roman Tur;}{\f126\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f127\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f128\froman\fcharset186\fprq2 Times New Roman Baltic;}
-{\f129\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;
-\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{
-\qj \li0\ri0\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs21\alang1025 \ltrch\fcs0 \fs21\lang1033\langfe2052\kerning2\loch\f0\hich\af0\dbch\af13\cgrid\langnp1033\langfenp2052 \snext0 Normal;}{\*\cs10 
-\additive \ssemihidden Default Paragraph Font;}{\*
-\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv 
-\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1024\langfe1024\loch\f0\hich\af0\dbch\af13\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}
-{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid6445326\rsid6898714\rsid14054303\rsid15871832}{\*\generator Microsoft Word 11.0.8134;}{\info
-{\upr{\title ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????}
-{\*\ud\uc0{\title {\uc1\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?}
-{\uc1\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?}
-{\uc1\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?}
-{\uc1\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?}
-{\uc1\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?\u20048 ?}}}}
-{\upr{\author ???}{\*\ud\uc0{\author {\uc1\u31243 ?\u27704 ?\u20840 ?}}}}{\operator BMC Software}{\creatim\yr2007\mo8\dy10\hr19\min46}{\revtim\yr2007\mo8\dy19\hr17\min11}{\version2}{\edmins118}{\nofpages5}{\nofwords585}{\nofchars3341}{\*\company ultra}
-{\nofcharsws3919}{\vern24611}{\*\password 00000000}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw11906\paperh16838\margl1800\margr1800\margt1440\margb1440\gutter0\ltrsect 
-\deftab420\widowctrl\ftnbj\aenddoc\donotembedsysfont0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\formshade\horzdoc\dgmargin\dghspace180\dgvspace156\dghorigin1800\dgvorigin1440
-\dghshow0\dgvshow2\jcompress\lnongrid\viewkind1\viewscale100\splytwnine\ftnlytwnine\htmautsp\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct\asianbrkrule\rsidroot15871832\newtblstyruls
-\nogrowautofit {\upr{\*\fchars !),.:\'3b?]\'7d\'a8\'b7?\'af??\'92\'94\'85:????>\'bb?????!"'),.:\'3b?]`|\'7d~?}{\*\ud\uc0{\*\fchars 
-!),.:\'3b?]\'7d\'a8\'b7{\uc1\u711 ?\u713 \'af\u8213 ?\u8214 ?\'92\'94\'85\u8758 :\u12289 ?\u12290 ?\u12291 ?\u12293 ?\u12297 >\u12299 \'bb\u12301 ?\u12303 ?\u12305 ?\u12309 ?\u12311 ?\u-255 !\u-254 "\u-249 '\u-247 )\u-244 ,\u-242 .\u-230 :\u-229 \'3b\u-225 ?\u-195 ]\u-192 `\u-164 |\u-163 \'7d\u-162 ~\u-32 ?}
-}}}{\upr{\*\lchars ([\'7b\'b7\'91\'93<\'ab?????(.[\'7b??}{\*\ud\uc0{\*\lchars ([\'7b\'b7\'91\'93{\uc1\u12296 <\u12298 \'ab\u12300 ?\u12302 ?\u12304 ?\u12308 ?\u12310 ?\u-248 (\u-242 .\u-197 [\u-165 \'7b\u-31 ?\u-27 ?}}}}\fet0{\*\wgrffmtfilter 013f}
-\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\headery851\footery992\colsx425\endnhere\sectlinegrid312\sectspecifyl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}
-{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}
-{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar
-\qj \li0\ri0\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs21\alang1025 \ltrch\fcs0 \fs21\lang1033\langfe2052\kerning2\loch\af0\hich\af0\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af13 
-\ltrch\fcs0 \insrsid6898714 \hich\af0\dbch\af13\loch\f0 1}{\rtlch\fcs1 \af13 \ltrch\fcs0 \insrsid15871832\charrsid15871832 \loch\af0\hich\af0\dbch\f13 \uc2\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048
-\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 
-\u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6
-\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\loch\af0\hich\af0\dbch\f13 \u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6
-\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6\u20048\'c0\'d6}{\rtlch\fcs1 
-\af0 \ltrch\fcs0 \insrsid6445326\charrsid15871832 
-\par }}

Modified: trunk/tomcat5.5/connectors/util/README.txt
===================================================================
--- trunk/tomcat5.5/connectors/util/README.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/README.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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 subpackage contains a set of common utilities copied out
 of tomcat 3.3.
 

Modified: trunk/tomcat5.5/connectors/util/build.xml
===================================================================
--- trunk/tomcat5.5/connectors/util/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="tomcat-util" default="build-main" basedir=".">
 
     <!-- ===================== Initialize Property Values =================== -->
@@ -65,19 +82,15 @@
         <echo message="-- skip.digester = ${skip.digester}" />
         <echo message="-- JDK14 = ${jdk1.4.present}"/>
         <echo message="-- JDK15 = ${jdk1.5.present}" />
-        <echo message="-- Michael was here" />
 
         <javac srcdir="java"
 	       destdir="${tomcat-util.build}/classes"
 	       deprecation="${compile.deprecation}"
-	       source="${compile.source}"
 	       debug="${compile.debug}"
 	       optimize="off"
 	       verbose="off"
-	       nowarn="true">
+	       excludes="**/CVS/**">
             <classpath refid="compile.classpath"/>
-	    <exclude name="**/CVS/**" />
-	    <exclude name="**/JSSE13*.java" />
             <exclude name="**/util/net/jsse/*" unless="jsse.present"/>
             <exclude name="**/util/log/CommonLogHandler.java" unless="commons-logging.present"/>
             <exclude name="**/util/net/puretls/*" unless="puretls.present"/>

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/B2CConverter.java
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/B2CConverter.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/B2CConverter.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -72,18 +72,28 @@
     public  void convert( ByteChunk bb, CharChunk cb )
         throws IOException
     {
+        convert(bb, cb, cb.getBuffer().length - cb.getEnd());
+    }
+
+    /** Convert a buffer of bytes into a chars
+     */
+    public  void convert( ByteChunk bb, CharChunk cb, int limit)
+        throws IOException
+    {
         // Set the ByteChunk as input to the Intermediate reader
         iis.setByteChunk( bb );
-        convert(cb);
+        convert(cb, limit);
     }
 
-    private void convert(CharChunk cb)
+    private void convert(CharChunk cb, int limit)
         throws IOException
     {
         try {
             // read from the reader
-            while( iis.available()>0 ) { // conv.ready() ) {
-                int cnt=conv.read( result, 0, BUFFER_SIZE );
+            int count = 0;
+            while( limit > 0 ) { 
+                int size = limit < BUFFER_SIZE ? limit : BUFFER_SIZE; 
+                int cnt=conv.read( result, 0, size );
                 if( cnt <= 0 ) {
                     // End of stream ! - we may be in a bad state
                     if( debug>0)
@@ -96,6 +106,7 @@
 
                 // XXX go directly
                 cb.append( result, 0, cnt );
+                limit -= cnt;
             }
         } catch( IOException ex) {
             if( debug>0)
@@ -222,10 +233,7 @@
     not be called if recycling the converter and if data was not flushed.
 */
 final class IntermediateInputStream extends InputStream {
-    byte buf[];
-    int pos;
-    int len;
-    int end;
+    ByteChunk bc = null;
     
     public IntermediateInputStream() {
     }
@@ -236,41 +244,24 @@
     }
     
     public  final  int read(byte cbuf[], int off, int len) throws IOException {
-        if( pos >= end ) return -1;
-        if (pos + len > end) {
-            len = end - pos;
-        }
-        if (len <= 0) {
-            return 0;
-        }
-        System.arraycopy(buf, pos, cbuf, off, len);
-        pos += len;
-        return len;
+        int nread = bc.substract(cbuf, off, len);
+        return nread;
     }
     
     public  final int read() throws IOException {
-        return (pos < end ) ? (buf[pos++] & 0xff) : -1;
+        return bc.substract();
     }
     
     public int available() throws IOException {
-        return end-pos;
+        return bc.getLength();
     }
 
 
     // -------------------- Internal methods --------------------
 
-    void setBuffer( byte b[], int p, int l ) {
-        buf=b;
-        pos=p;
-        len=l;
-        end=pos+len;
-    }
 
     void setByteChunk( ByteChunk mb ) {
-        buf=mb.getBytes();
-        pos=mb.getStart();
-        len=mb.getLength();
-        end=pos+len;
+        bc = mb;
     }
 
 }

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/CharChunk.java
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/CharChunk.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/CharChunk.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,18 +1,17 @@
-/*
- *  Copyright 1999-2004 The Apache Software Foundation
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You 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
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *     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.
+ * 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.util.buf;
@@ -293,12 +292,15 @@
             System.arraycopy(src, off+avail, buff, end, len - avail);
             end+= len - avail;
             
-        } else {        // len > buf.length + avail
+        } else if(optimizedWrite) { // len > buf.length + avail & we have a real sink
             // long write - flush the buffer and write the rest
             // directly from source
             flushBuffer();
             
             out.realWriteChars( src, off, len );
+        } else { // ugly but it works for fake sinks if they reset us
+            flushBuffer();
+            append(src, off, len);
         }
     }
 

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/package.html
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <html><body>
 <H1>Buffers and Encodings</h1>
 

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 hexUtil.bad=Bad hexadecimal digit
 hexUtil.odd=Odd number of hexadecimal digits
 httpDate.pe=invalid date format: {0}

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 hexUtil.bad=Dígito hexadecimal incorrecto
 hexUtil.odd=Número de dígitos hexadecimales incorrecto
 httpDate.pe=formato de fecha no válido: {0}

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 hexUtil.bad=Mauvais digit hexadécimal
 hexUtil.odd=Nombre impair de digits hexadécimaux
 httpDate.pe=Format de date invalide: {0}

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 hexUtil.bad=\u7121\u52b9\u306a16\u9032\u6570\u5024\u3067\u3059
 hexUtil.odd=\u5947\u6570\u6841\u306e16\u9032\u6570\u5024\u3067\u3059
 httpDate.pe=\u7121\u52b9\u306a\u65e5\u4ed8\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059: {0}

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/collections/package.html
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/collections/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/collections/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <html>
 <head>
 <title>util.collections</title>

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/digester/package.html
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/digester/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/digester/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <html>
 <head>
 <title>Package Documentation for org.apache.commons.digester Package</title>

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/Cookies.java
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/Cookies.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/Cookies.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -45,6 +45,27 @@
     boolean unprocessed=true;
 
     MimeHeaders headers;
+
+    /*
+    List of Separator Characters (see isSeparator())
+    Excluding the '/' char violates the RFC, but 
+    it looks like a lot of people put '/'
+    in unquoted values: '/': ; //47 
+    '\t':9 ' ':32 '\"':34 '\'':39 '(':40 ')':41 ',':44 ':':58 ';':59 '<':60 
+    '=':61 '>':62 '?':63 '@':64 '[':91 '\\':92 ']':93 '{':123 '}':125
+    */
+    public static final char SEPARATORS[] = { '\t', ' ', '\"', '\'', '(', ')', ',', 
+        ':', ';', '<', '=', '>', '?', '@', '[', '\\', ']', '{', '}' };
+
+    protected static final boolean separators[] = new boolean[128];
+    static {
+        for (int i = 0; i < 128; i++) {
+            separators[i] = false;
+        }
+        for (int i = 0; i < SEPARATORS.length; i++) {
+            separators[SEPARATORS[i]] = true;
+        }
+    }
     
     /**
      *  Construct a new cookie collection, that will extract
@@ -182,182 +203,6 @@
         }
     }
 
-    /** Process a byte[] header - allowing fast processing of the
-     *  raw data
-     */
-    void processCookieHeader(  byte bytes[], int off, int len )
-    {
-        if( len<=0 || bytes==null ) return;
-        int end=off+len;
-        int pos=off;
-        
-        int version=0; //sticky
-        ServerCookie sc=null;
-        
-
-        while( pos<end ) {
-            byte cc;
-            // [ skip_spaces name skip_spaces "=" skip_spaces value EXTRA ; ] *
-            if( dbg>0 ) log( "Start: " + pos + " " + end );
-            
-            pos=skipSpaces(bytes, pos, end);
-            if( pos>=end )
-                return; // only spaces
-            int startName=pos;
-            if( dbg>0 ) log( "SN: " + pos );
-            
-            // Version should be the first token
-            boolean isSpecial=false;
-            if(bytes[pos]=='$') { pos++; isSpecial=true; }
-
-            pos= findDelim1( bytes, startName, end); // " =;,"
-            int endName=pos;
-            // current = "=" or " " or DELIM
-            pos= skipSpaces( bytes, endName, end ); 
-            if( dbg>0 ) log( "DELIM: " + endName + " " + (char)bytes[pos]);
-
-            if(pos >= end ) {
-                // it's a name-only cookie ( valid in RFC2109 )
-                if( ! isSpecial ) {
-                    sc=addCookie();
-                    sc.getName().setBytes( bytes, startName,
-                                           endName-startName );
-                    sc.getValue().setString("");
-                    sc.setVersion( version );
-                    if( dbg>0 ) log( "Name only, end: " + startName + " " +
-                                     endName);
-                }
-                return;
-            }
-
-            cc=bytes[pos];
-            pos++;
-            if( cc==';' || cc==',' || pos>=end ) {
-                if( ! isSpecial && startName!= endName ) {
-                    sc=addCookie();
-                    sc.getName().setBytes( bytes, startName,
-                                           endName-startName );
-                    sc.getValue().setString("");
-                    sc.setVersion( version );
-                    if( dbg>0 ) log( "Name only: " + startName + " " + endName);
-                }
-                continue;
-            }
-            
-            // we should have "=" ( tested all other alternatives )
-            int startValue=skipSpaces( bytes, pos, end);
-            int endValue=startValue;
-            
-            cc=bytes[pos];
-            if(  cc=='"' ) {
-                endValue=findDelim3( bytes, startValue+1, end, cc );
-                if (endValue == -1) {
-                    endValue = findDelim2(bytes, startValue+1, end);
-                } else startValue++;
-                pos=endValue+1; // to skip to next cookie
-             } else {
-                endValue=findDelim2( bytes, startValue, end );
-                pos=endValue+1;
-            }
-            
-            // if not $Version, etc
-            if( ! isSpecial ) {
-                sc=addCookie();
-                sc.getName().setBytes( bytes, startName, endName-startName );
-                sc.getValue().setBytes( bytes, startValue, endValue-startValue);
-                sc.setVersion( version );
-                if( dbg>0 ) {
-                    log( "New: " + sc.getName() + "X=X" + sc.getValue());
-                }
-                continue;
-            }
-            
-            // special - Path, Version, Domain, Port
-            if( dbg>0 ) log( "Special: " + startName + " " + endName);
-            // XXX TODO
-            if( equals( "$Version", bytes, startName, endName ) ) {
-                if(dbg>0 ) log( "Found version " );
-                if( bytes[startValue]=='1' && endValue==startValue+1 ) {
-                    version=1;
-                    if(dbg>0 ) log( "Found version=1" );
-                }
-                continue;
-            }
-            if( sc==null ) {
-                // Path, etc without a previous cookie
-                continue;
-            }
-            if( equals( "$Path", bytes, startName, endName ) ) {
-                sc.getPath().setBytes( bytes,
-                                       startValue,
-                                       endValue-startValue );
-            }
-            if( equals( "$Domain", bytes, startName, endName ) ) {
-                sc.getDomain().setBytes( bytes,
-                                         startValue,
-                                         endValue-startValue );
-            }
-            if( equals( "$Port", bytes, startName, endName ) ) {
-                // sc.getPort().setBytes( bytes,
-                //                        startValue,
-                //                        endValue-startValue );
-            }
-        }
-    }
-
-    // -------------------- Utils --------------------
-    public static int skipSpaces(  byte bytes[], int off, int end ) {
-        while( off < end ) {
-            byte b=bytes[off];
-            if( b!= ' ' ) return off;
-            off ++;
-        }
-        return off;
-    }
-
-    public static int findDelim1( byte bytes[], int off, int end )
-    {
-        while( off < end ) {
-            byte b=bytes[off];
-            if( b==' ' || b=='=' || b==';' || b==',' )
-                return off;
-            off++;
-        }
-        return off;
-    }
-
-    public static int findDelim2( byte bytes[], int off, int end )
-    {
-        while( off < end ) {
-            byte b=bytes[off];
-            if( b==';' || b==',' )
-                return off;
-            off++;
-        }
-        return off;
-    }
-
-    /*
-     *  search for cc but skip \cc as required by rfc2616
-     *  (according to rfc2616 cc should be ")
-     */
-    public static int findDelim3( byte bytes[], int off, int end, byte cc )
-    {
-        while( off < end ) {
-            byte b=bytes[off];
-            if (b=='\\') {
-                off++;
-                off++;
-                continue;
-            }
-            if( b==cc )
-                return off;
-            off++;
-        }
-        return -1;
-    }
-
-    
     // XXX will be refactored soon!
     public static boolean equals( String s, byte b[], int start, int end) {
         int blen = end-start;
@@ -441,42 +286,298 @@
             log.debug("Cookies: " + s);
     }
 
-    /*
-    public static void main( String args[] ) {
-        test("foo=bar; a=b");
-        test("foo=bar;a=b");
-        test("foo=bar;a=b;");
-        test("foo=bar;a=b; ");
-        test("foo=bar;a=b; ;");
-        test("foo=;a=b; ;");
-        test("foo;a=b; ;");
-        // v1 
-        test("$Version=1; foo=bar;a=b"); 
-        test("$Version=\"1\"; foo='bar'; $Path=/path; $Domain=\"localhost\"");
-        test("$Version=1;foo=bar;a=b; ; ");
-        test("$Version=1;foo=;a=b; ; ");
-        test("$Version=1;foo= ;a=b; ; ");
-        test("$Version=1;foo;a=b; ; ");
-        test("$Version=1;foo=\"bar\";a=b; ; ");
-        test("$Version=1;foo=\"bar\";$Path=/examples;a=b; ; ");
-        test("$Version=1;foo=\"bar\";$Domain=apache.org;a=b");
-        test("$Version=1;foo=\"bar\";$Domain=apache.org;a=b;$Domain=yahoo.com");
-        // rfc2965
-        test("$Version=1;foo=\"bar\";$Domain=apache.org;$Port=8080;a=b");
+   /**
+     * Returns true if the byte is a separator character as
+     * defined in RFC2619. Since this is called often, this
+     * function should be organized with the most probable
+     * outcomes first.
+     */
+    public static final boolean isSeparator(final byte c) {
+         if (c > 0 && c < 126)
+             return separators[c];
+         else
+             return false;
+    }
+    
+    /**
+     * Returns true if the byte is a whitespace character as
+     * defined in RFC2619.
+     */
+    public static final boolean isWhiteSpace(final byte c) {
+        // This switch statement is slightly slower
+        // for my vm than the if statement.
+        // Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
+        /* 
+        switch (c) {
+        case ' ':;
+        case '\t':;
+        case '\n':;
+        case '\r':;
+        case '\f':;
+            return true;
+        default:;
+            return false;
+             }
+        */
+       if (c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\f')
+           return true;
+       else
+           return false;
+    }
 
-        // wrong
-        test("$Version=1;foo=\"bar\";$Domain=apache.org;$Port=8080;a=b");
+    /**
+     * Parses a cookie header after the initial "Cookie:"
+     * [WS][$]token[WS]=[WS](token|QV)[;|,]
+     * RFC 2965
+     * JVK
+     */
+    public final void processCookieHeader(byte bytes[], int off, int len){
+        if( len<=0 || bytes==null ) return;
+        int end=off+len;
+        int pos=off;
+        int nameStart=0;
+        int nameEnd=0;
+        int valueStart=0;
+        int valueEnd=0;
+        int version = 0;
+        ServerCookie sc=null;
+        boolean isSpecial;
+        boolean isQuoted;
+
+        while (pos < end) {
+            isSpecial = false;
+            isQuoted = false;
+
+            // Skip whitespace and non-token characters (separators)
+            while (pos < end && 
+                   (isSeparator(bytes[pos]) || isWhiteSpace(bytes[pos]))) 
+                {pos++; } 
+
+            if (pos >= end)
+                return;
+
+            // Detect Special cookies
+            if (bytes[pos] == '$') {
+                isSpecial = true;
+                pos++;
+            }
+
+            // Get the cookie name. This must be a token            
+            valueEnd = valueStart = nameStart = pos; 
+            pos = nameEnd = getTokenEndPosition(bytes,pos,end);
+
+            // Skip whitespace
+            while (pos < end && isWhiteSpace(bytes[pos])) {pos++; }; 
+         
+
+            // Check for an '=' -- This could also be a name-only
+            // cookie at the end of the cookie header, so if we
+            // are past the end of the header, but we have a name
+            // skip to the name-only part.
+            if (pos < end && bytes[pos] == '=') {                
+
+                // Skip whitespace
+                do {
+                    pos++;
+                } while (pos < end && isWhiteSpace(bytes[pos])); 
+
+                if (pos >= end)
+                    return;
+
+                // Determine what type of value this is, quoted value,
+                // token, name-only with an '=', or other (bad)
+                switch (bytes[pos]) {
+                case '"':; // Quoted Value
+                    isQuoted = true;
+                    valueStart=pos + 1; // strip "
+                    // getQuotedValue returns the position before 
+                    // at the last qoute. This must be dealt with
+                    // when the bytes are copied into the cookie
+                    valueEnd=getQuotedValueEndPosition(bytes, 
+                                                       valueStart, end);
+                    // We need pos to advance
+                    pos = valueEnd; 
+                    // Handles cases where the quoted value is 
+                    // unterminated and at the end of the header, 
+                    // e.g. [myname="value]
+                    if (pos >= end)
+                        return;
+                    break;
+                case ';':
+                case ',':
+                    // Name-only cookie with an '=' after the name token
+                    // This may not be RFC compliant
+                    valueStart = valueEnd = -1;
+                    // The position is OK (On a delimiter)
+                    break;
+                default:;
+                    if (!isSeparator(bytes[pos])) {
+                        // Token
+                        valueStart=pos;
+                        // getToken returns the position at the delimeter
+                        // or other non-token character
+                        valueEnd=getTokenEndPosition(bytes, valueStart, end);
+                        // We need pos to advance
+                        pos = valueEnd;
+                    } else  {
+                        // INVALID COOKIE, advance to next delimiter
+                        // The starting character of the cookie value was
+                        // not valid.
+                        log("Invalid cookie. Value not a token or quoted value");
+                        while (pos < end && bytes[pos] != ';' && 
+                               bytes[pos] != ',') 
+                            {pos++; };
+                        pos++;
+                        // Make sure no special avpairs can be attributed to 
+                        // the previous cookie by setting the current cookie
+                        // to null
+                        sc = null;
+                        continue;                        
+                    }
+                }
+            } else {
+                // Name only cookie
+                valueStart = valueEnd = -1;
+                pos = nameEnd;
+
+            }
+          
+            // We should have an avpair or name-only cookie at this
+            // point. Perform some basic checks to make sure we are
+            // in a good state.
+  
+            // Skip whitespace
+            while (pos < end && isWhiteSpace(bytes[pos])) {pos++; }; 
+
+
+            // Make sure that after the cookie we have a separator. This
+            // is only important if this is not the last cookie pair
+            while (pos < end && bytes[pos] != ';' && bytes[pos] != ',') { 
+                pos++;
+            }
+                 
+            pos++;
+
+            /*
+            if (nameEnd <= nameStart || valueEnd < valueStart ) {
+                // Something is wrong, but this may be a case
+                // of having two ';' characters in a row.
+                // log("Cookie name/value does not conform to RFC 2965");
+                // Advance to next delimiter (ignoring everything else)
+                while (pos < end && bytes[pos] != ';' && bytes[pos] != ',') 
+                    { pos++; };
+                pos++;
+                // Make sure no special cookies can be attributed to 
+                // the previous cookie by setting the current cookie
+                // to null
+                sc = null;
+                continue;
+            }
+            */
+
+            // All checks passed. Add the cookie, start with the 
+            // special avpairs first
+            if (isSpecial) {
+                isSpecial = false;
+                // $Version must be the first avpair in the cookie header
+                // (sc must be null)
+                if (equals( "Version", bytes, nameStart, nameEnd) && 
+                    sc == null) {
+                    // Set version
+                    if( bytes[valueStart] =='1' && valueEnd == (valueStart+1)) {
+                        version=1;
+                    } else {
+                        // unknown version (Versioning is not very strict)
+                    }
+                    continue;
+                } 
+                
+                // We need an active cookie for Path/Port/etc.
+                if (sc == null) {
+                    continue;
+                }
+
+                // Domain is more common, so it goes first
+                if (equals( "Domain", bytes, nameStart, nameEnd)) {
+                    sc.getDomain().setBytes( bytes,
+                                           valueStart,
+                                           valueEnd-valueStart);
+                    continue;
+                } 
+
+                if (equals( "Path", bytes, nameStart, nameEnd)) {
+                    sc.getPath().setBytes( bytes,
+                                           valueStart,
+                                           valueEnd-valueStart);
+                    continue;
+                } 
+
+
+                if (equals( "Port", bytes, nameStart, nameEnd)) {
+                    // sc.getPort is not currently implemented.
+                    // sc.getPort().setBytes( bytes,
+                    //                        valueStart,
+                    //                        valueEnd-valueStart );
+                    continue;
+                } 
+
+                // Unknown cookie, complain
+                log("Unknown Special Cookie");
+
+            } else { // Normal Cookie
+                sc = addCookie();
+                sc.setVersion( version );
+                sc.getName().setBytes( bytes, nameStart,
+                                       nameEnd-nameStart);
+                
+                if (valueStart != -1) { // Normal AVPair
+                    sc.getValue().setBytes( bytes, valueStart,
+                            valueEnd-valueStart);
+                    if (isQuoted) {
+                        // We know this is a byte value so this is safe
+                        ServerCookie.unescapeDoubleQuotes(
+                                sc.getValue().getByteChunk());
+                    }                    
+                } else {
+                    // Name Only
+                    sc.getValue().setString(""); 
+                }
+                continue;
+            }
+        }
     }
 
-    public static void test( String s ) {
-        System.out.println("Processing " + s );
-        Cookies cs=new Cookies(null);
-        cs.processCookieHeader( s.getBytes(), 0, s.length());
-        for( int i=0; i< cs.getCookieCount() ; i++ ) {
-            System.out.println("Cookie: " + cs.getCookie( i ));
+    /**
+     * Given the starting position of a token, this gets the end of the
+     * token, with no separator characters in between.
+     * JVK
+     */
+    public static final int getTokenEndPosition(byte bytes[], int off, int end){
+        int pos = off;
+        while (pos < end && !isSeparator(bytes[pos])) {pos++; };
+        
+        if (pos > end)
+            return end;
+        return pos;
+    }
+
+    /** 
+     * Given a starting position after an initial quote chracter, this gets
+     * the position of the end quote. This escapes anything after a '\' char
+     * JVK RFC 2616
+     */
+    public static final int getQuotedValueEndPosition(byte bytes[], int off, int end){
+        int pos = off;
+        while (pos < end) {
+            if (bytes[pos] == '"') {
+                return pos;                
+            } else if (bytes[pos] == '\\' && pos < (end - 1)) {
+                pos+=2;
+            } else {
+                pos++;
+            }
         }
-            
+        // Error, we have reached the end of the header w/o a end quote
+        return end;
     }
-    */
-
 }

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/ServerCookie.java
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/ServerCookie.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/ServerCookie.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -21,13 +21,14 @@
 import java.text.FieldPosition;
 import java.util.Date;
 
+import org.apache.tomcat.util.buf.ByteChunk;
 import org.apache.tomcat.util.buf.DateTool;
 import org.apache.tomcat.util.buf.MessageBytes;
 
 
 /**
  *  Server-side cookie representation.
- *   Allows recycling and uses MessageBytes as low-level
+ *  Allows recycling and uses MessageBytes as low-level
  *  representation ( and thus the byte-> char conversion can be delayed
  *  until we know the charset ).
  *
@@ -36,39 +37,40 @@
  */
 public class ServerCookie implements Serializable {
     
-    
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog(ServerCookie.class );
-    
+    // Version 0 (Netscape) attributes
     private MessageBytes name=MessageBytes.newInstance();
     private MessageBytes value=MessageBytes.newInstance();
+    // Expires - Not stored explicitly. Generated from Max-Age (see V1)
+    private MessageBytes path=MessageBytes.newInstance();
+    private MessageBytes domain=MessageBytes.newInstance();
+    private boolean secure;
 
-    private MessageBytes comment=MessageBytes.newInstance(); //;Comment=VALUE
-    private MessageBytes domain=MessageBytes.newInstance();  //;Domain=VALUE ...
+    // Version 1 (RFC2109) attributes
+    private MessageBytes comment=MessageBytes.newInstance();
+    private int maxAge = -1;
+    private int version = 0;
 
-    private int maxAge = -1;        // ;Max-Age=VALUE
-                                // ;Discard ... implied by maxAge < 0
-    // RFC2109: maxAge=0 will end a session
-    private MessageBytes path=MessageBytes.newInstance();        // ;Path=VALUE
-    private boolean secure;        // ;Secure
-    private int version = 0;        // ;Version=1
+    // Note: Servlet Spec =< 2.5 only refers to Netscape and RFC2109,
+    // not RFC2965
 
-    //XXX CommentURL, Port -> use notes ?
-    
+    // Version 1 (RFC2965) attributes
+    // TODO Add support for CommentURL
+    // Discard - implied by maxAge <0
+    // TODO Add support for Port
+
     public ServerCookie() {
-
     }
 
     public void recycle() {
         path.recycle();
-            name.recycle();
-            value.recycle();
-            comment.recycle();
-            maxAge=-1;
-            path.recycle();
+        name.recycle();
+        value.recycle();
+        comment.recycle();
+        maxAge=-1;
+        path.recycle();
         domain.recycle();
-            version=0;
-            secure=false;
+        version=0;
+        secure=false;
     }
 
     public MessageBytes getComment() {
@@ -87,7 +89,6 @@
         return maxAge;
     }
 
-
     public MessageBytes getPath() {
         return path;
     }
@@ -112,7 +113,6 @@
         return version;
     }
 
-
     public void setVersion(int v) {
         version = v;
     }
@@ -125,12 +125,8 @@
             + getVersion() + " " + getPath() + " " + getDomain();
     }
     
-    // Note -- disabled for now to allow full Netscape compatibility
-    // from RFC 2068, token special case characters
-    //
-    // private static final String tspecials = "()<>@,;:\\\"/[]?={} \t";
     private static final String tspecials = ",; ";
-    private static final String tspecials2 = ",; \"";
+    private static final String tspecials2 = "()<>@,;:\\\"/[]?={} \t";
 
     /*
      * Tests a string and returns true if the string counts as a
@@ -149,12 +145,27 @@
         for (int i = 0; i < len; i++) {
             char c = value.charAt(i);
 
-            if (c < 0x20 || c >= 0x7f || tspecials.indexOf(c) != -1)
+            if (tspecials.indexOf(c) != -1)
                 return false;
         }
         return true;
     }
 
+    public static boolean containsCTL(String value, int version) {
+        if( value==null) return false;
+        int len = value.length();
+        for (int i = 0; i < len; i++) {
+            char c = value.charAt(i);
+            if (c < 0x20 || c >= 0x7f) {
+                if (c == 0x09)
+                    continue; //allow horizontal tabs
+                return true;
+            }
+        }
+        return false;
+    }
+    
+        
     public static boolean isToken2(String value) {
         if( value==null) return true;
         int len = value.length();
@@ -162,23 +173,27 @@
         for (int i = 0; i < len; i++) {
             char c = value.charAt(i);
 
-            if (c < 0x20 || c >= 0x7f || tspecials2.indexOf(c) != -1)
+            if (tspecials2.indexOf(c) != -1)
                 return false;
         }
         return true;
     }
 
 
+    /**
+     * @deprecated - Not used
+     */
     public static boolean checkName( String name ) {
         if (!isToken(name)
-                || name.equalsIgnoreCase("Comment")        // rfc2019
-                || name.equalsIgnoreCase("Discard")        // 2019++
-                || name.equalsIgnoreCase("Domain")
-                || name.equalsIgnoreCase("Expires")        // (old cookies)
-                || name.equalsIgnoreCase("Max-Age")        // rfc2019
-                || name.equalsIgnoreCase("Path")
-                || name.equalsIgnoreCase("Secure")
-                || name.equalsIgnoreCase("Version")
+                || name.equalsIgnoreCase("Comment")     // rfc2019
+                || name.equalsIgnoreCase("Discard")     // rfc2965
+                || name.equalsIgnoreCase("Domain")      // rfc2019
+                || name.equalsIgnoreCase("Expires")     // Netscape
+                || name.equalsIgnoreCase("Max-Age")     // rfc2019
+                || name.equalsIgnoreCase("Path")        // rfc2019
+                || name.equalsIgnoreCase("Secure")      // rfc2019
+                || name.equalsIgnoreCase("Version")     // rfc2019
+                // TODO remaining RFC2965 attributes
             ) {
             return false;
         }
@@ -188,8 +203,8 @@
     // -------------------- Cookie parsing tools
 
     
-    /** Return the header name to set the cookie, based on cookie
-     *  version
+    /**
+     * Return the header name to set the cookie, based on cookie version.
      */
     public String getCookieHeaderName() {
         return getCookieHeaderName(version);
@@ -199,14 +214,16 @@
      *  version
      */
     public static String getCookieHeaderName(int version) {
-        if( dbg>0 ) log( (version==1) ? "Set-Cookie2" : "Set-Cookie");
+        // TODO Re-enable logging when RFC2965 is implemented
+        // log( (version==1) ? "Set-Cookie2" : "Set-Cookie");
         if (version == 1) {
+            // XXX RFC2965 not referenced in Servlet Spec
+            // Set-Cookie2 is not supported by Netscape 4, 6, IE 3, 5
+            // Set-Cookie2 is supported by Lynx and Opera
+            // Need to check on later IE and FF releases but for now...
             // RFC2109
             return "Set-Cookie";
-            // XXX RFC2965 is not standard yet, and Set-Cookie2
-            // is not supported by Netscape 4, 6, IE 3, 5 .
-            // It is supported by Lynx, and there is hope 
-            //            return "Set-Cookie2";
+            // return "Set-Cookie2";
         } else {
             // Old Netscape
             return "Set-Cookie";
@@ -216,7 +233,8 @@
     private static final String ancientDate =
         DateTool.formatOldCookie(new Date(10000));
 
-    public static void appendCookieValue( StringBuffer buf,
+    // TODO RFC2965 fields also need to be passed
+    public static void appendCookieValue( StringBuffer headerBuf,
                                           int version,
                                           String name,
                                           String value,
@@ -226,13 +244,15 @@
                                           int maxAge,
                                           boolean isSecure )
     {
-        // this part is the same for all cookies
+        StringBuffer buf = new StringBuffer();
+        // Servlet implementation checks name
         buf.append( name );
         buf.append("=");
+        // Servlet implementation does not check anything else
+        
         maybeQuote2(version, buf, value);
 
-        // XXX Netscape cookie: "; "
-         // add version 1 specific information
+        // Add version 1 specific information
         if (version == 1) {
             // Version=1 ... required
             buf.append ("; Version=1");
@@ -240,26 +260,23 @@
             // Comment=comment
             if ( comment!=null ) {
                 buf.append ("; Comment=");
-                maybeQuote (version, buf, comment);
+                maybeQuote2(version, buf, comment);
             }
         }
         
-        // add domain information, if present
-
+        // Add domain information, if present
         if (domain!=null) {
             buf.append("; Domain=");
-            maybeQuote (version, buf, domain);
+            maybeQuote2(version, buf, domain);
         }
 
-        // Max-Age=secs/Discard ... or use old "Expires" format
+        // Max-Age=secs ... or use old "Expires" format
+        // TODO RFC2965 Discard
         if (maxAge >= 0) {
             if (version == 0) {
-                // XXX XXX XXX We need to send both, for
-                // interoperatibility (long word )
+                // Wdy, DD-Mon-YY HH:MM:SS GMT ( Expires Netscape format )
                 buf.append ("; Expires=");
-                // Wdy, DD-Mon-YY HH:MM:SS GMT ( Expires netscape format )
-                // To expire we need to set the time back in future
-                // ( pfrieden at dChain.com )
+                // To expire immediately we need to set the time in past
                 if (maxAge == 0)
                     buf.append( ancientDate );
                 else
@@ -277,7 +294,7 @@
         // Path=path
         if (path!=null) {
             buf.append ("; Path=");
-            maybeQuote (version, buf, path);
+            maybeQuote2(version, buf, path);
         }
 
         // Secure
@@ -285,69 +302,116 @@
           buf.append ("; Secure");
         }
         
-        
+        headerBuf.append(buf);
     }
 
-    public static void maybeQuote (int version, StringBuffer buf,
-            String value) {
+    /**
+     * @deprecated - Not used
+     */
+    public static void maybeQuote(int version, StringBuffer buf, String value) {
         // special case - a \n or \r  shouldn't happen in any case
         if (isToken(value)) {
             buf.append(value);
         } else {
             buf.append('"');
-            buf.append(escapeDoubleQuotes(value));
+            buf.append(escapeDoubleQuotes(value,0,value.length()));
             buf.append('"');
         }
     }
 
+
+    public static boolean alreadyQuoted (String value) {
+        if (value==null || value.length()==0) return false;
+        return (value.charAt(0)=='\"' && value.charAt(value.length()-1)=='\"');
+    }
     
-    public static void maybeQuote2 (int version, StringBuffer buf,
+        
+    /**
+     * Quotes values using rules that vary depending on Cookie version.
+     * @param version
+     * @param buf
+     * @param value
+     */
+    public static void maybeQuote2(int version, StringBuffer buf,
             String value) {
-        // special case - a \n or \r  shouldn't happen in any case
-        if (isToken2(value)) {
-            buf.append(value);
-        } else {
+        if (value==null || value.length()==0) {
+            buf.append("\"\"");
+        } else if (containsCTL(value,version)) 
+            throw new IllegalArgumentException("Control character in cookie value, consider BASE64 encoding your value");
+        else if (alreadyQuoted(value)) {
             buf.append('"');
-            buf.append(escapeDoubleQuotes(value));
+            buf.append(escapeDoubleQuotes(value,1,value.length()-1));            buf.append('"');
             buf.append('"');
+        } else if (version==0 && !isToken(value)) {
+            buf.append('"');
+            buf.append(escapeDoubleQuotes(value,0,value.length()));
+            buf.append('"');
+        } else if (version==1 && !isToken2(value)) {
+            buf.append('"');
+            buf.append(escapeDoubleQuotes(value,0,value.length()));
+            buf.append('"');
+        } else {
+            buf.append(value);
         }
     }
     
-    
-    // log
-    static final int dbg=1;
-    public static void log(String s ) {
-        if (log.isDebugEnabled())
-            log.debug("ServerCookie: " + s);
-    }
-
-
     /**
      * Escapes any double quotes in the given string.
      *
      * @param s the input string
-     *
+     * @param beginIndex start index inclusive
+     * @param endIndex exclusive
      * @return The (possibly) escaped string
      */
-    private static String escapeDoubleQuotes(String s) {
+    private static String escapeDoubleQuotes(String s, int beginIndex,
+            int endIndex) {
 
         if (s == null || s.length() == 0 || s.indexOf('"') == -1) {
             return s;
         }
 
         StringBuffer b = new StringBuffer();
-        char p = s.charAt(0);
-        for (int i = 0; i < s.length(); i++) {
+        for (int i = beginIndex; i < endIndex; i++) {
             char c = s.charAt(i);
-            if (c == '"' && p != '\\')
+            if (c == '\\' ) {
+                b.append(c);
+                //ignore the character after an escape, just append it
+                if (++i>=endIndex) throw new IllegalArgumentException("Invalid escape character in cookie value.");
+                b.append(s.charAt(i));
+            } else if (c == '"')
                 b.append('\\').append('"');
             else
                 b.append(c);
-            p = c;
         }
 
         return b.toString();
     }
 
+    /**
+     * Unescapes any double quotes in the given cookie value.
+     *
+     * @param bc The cookie value to modify
+     */
+    public static void unescapeDoubleQuotes(ByteChunk bc) {
+
+        if (bc == null || bc.getLength() == 0 || bc.indexOf('"', 0) == -1) {
+            return;
+        }
+
+        int src = bc.getStart();
+        int end = bc.getEnd();
+        int dest = src;
+        byte[] buffer = bc.getBuffer();
+        
+        while (src < end) {
+            if (buffer[src] == '\\' && src < end && buffer[src+1]  == '"') {
+                src++;
+            }
+            buffer[dest] = buffer[src];
+            dest ++;
+            src ++;
+        }
+        bc.setEnd(dest);
+    }
 }
 

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/package.html
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <html>
 <head>
 <title>util.http</title>

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/res/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/res/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/res/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # HttpMessages
 sc.100=Continue
 sc.101=Switching Protocols

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/res/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/res/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/res/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # HttpMessages
 sc.100=Continuar
 sc.101=Cambiando Protocolos

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/res/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/res/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/http/res/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 sc.100=Continuer
 sc.101=Changement de Protocols
 sc.200=OK

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1460,7 +1460,7 @@
             if (rv == Status.APR_SUCCESS) {
                 sendfileCount--;
             }
-            sendfileData.remove(data);
+            sendfileData.remove(new Long(data.socket));
         }
 
         /**
@@ -1469,6 +1469,7 @@
          */
         public void run() {
 
+            long maintainTime = 0;
             // Loop until we receive a shutdown command
             while (running) {
 
@@ -1482,6 +1483,8 @@
                 }
 
                 while (sendfileCount < 1 && addS.size() < 1) {
+                    // Reset maintain time.
+                    maintainTime = 0;
                     try {
                         synchronized (this) {
                             this.wait();
@@ -1510,6 +1513,8 @@
                             addS.clear();
                         }
                     }
+
+                    maintainTime += pollTime;
                     // Pool for the specified interval
                     int rv = Poll.poll(sendfilePollset, pollTime, desc, false);
                     if (rv > 0) {
@@ -1573,7 +1578,23 @@
                             continue;
                         }
                     }
-                    /* TODO: See if we need to call the maintain for sendfile poller */
+                    // Call maintain for the sendfile poller
+                    if (soTimeout > 0 && maintainTime > 1000000L && running) {
+                        rv = Poll.maintain(sendfilePollset, desc, true);
+                        maintainTime = 0;
+                        if (rv > 0) {
+                            for (int n = 0; n < rv; n++) {
+                                // Get the sendfile state
+                                SendfileData state =
+                                    (SendfileData) sendfileData.get(new Long(desc[n]));
+                                // Close socket and clear pool
+                                remove(state);
+                                // Destroy file descriptor pool, which should close the file
+                                // Close the socket, as the response would be incomplete
+                                Socket.destroy(state.socket);
+                            }
+                        }
+                    }
                 } catch (Throwable t) {
                     log.error(sm.getString("endpoint.poll.error"), t);
                 }

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/SSLSupport.java
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/SSLSupport.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/SSLSupport.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -61,7 +61,9 @@
         new CipherData("_WITH_RC4_128_", 128),
         new CipherData("_WITH_DES40_CBC_", 40),
         new CipherData("_WITH_DES_CBC_", 56),
-        new CipherData("_WITH_3DES_EDE_CBC_", 168)
+        new CipherData("_WITH_3DES_EDE_CBC_", 168),
+        new CipherData("_WITH_AES_128_CBC_", 128),
+        new CipherData("_WITH_AES_256_CBC_", 256)
     };
 
     /**

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -37,6 +37,8 @@
 	"org.apache.tomcat.util.net.jsse.JSSE15Factory";
     static final String JSSE14Factory = 
         "org.apache.tomcat.util.net.jsse.JSSE14Factory";
+    static final String JSSE13Factory = 
+        "org.apache.tomcat.util.net.jsse.JSSE13Factory";
     static final String SSLSocketClass = "javax.net.ssl.SSLSocket";
 
     static org.apache.commons.logging.Log logger = 
@@ -66,9 +68,7 @@
                 }
             }
         } if(factory == null) {
-	     if(logger.isDebugEnabled()) {
-                    logger.debug("Error getting JDK 14/15 factory - JDK 1.3 is not supported by Debian package !");
-             }
+            factory = new JSSE13Factory();
         }
     }
 

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 jsse.alias_no_key_entry=Alias name {0} does not identify a key entry

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 jsse.alias_no_key_entry=El nombre de Alias {0} no identifica una entrada de clave

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 jsse.alias_no_key_entry=Le nom alias {0} n''identifie pas une entrée de clef

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/jsse/res/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,2 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 jsse.alias_no_key_entry=\u5225\u540d {0} \u306f\u30ad\u30fc\u30a8\u30f3\u30c8\u30ea\u3092\u767a\u898b\u3067\u304d\u307e\u305b\u3093
 

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # net resources
 endpoint.err.fatal=Endpoint {0} shutdown due to exception: {1}
 endpoint.err.nonfatal=Endpoint {0} ignored exception: {1}

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # net resources
 endpoint.err.fatal=Punto Final (Endpoint) {0} parado debido a excepción: {1}
 endpoint.err.nonfatal=El Punto Final (Endpoint) {0} ignoró excepción: {1}

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # net resources
 endpoint.err.fatal=Le point de contact {0} a été éteint suite à l''exception{1}
 endpoint.err.nonfatal=Le point de contact {0} a ignoré l''exception: {1}

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # net resources
 endpoint.err.fatal=\u4f8b\u5916\u306e\u305f\u3081\u306b\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8 {0} \u306f\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u3057\u307e\u3059: {1}
 endpoint.err.nonfatal=\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8 {0} \u306f\u4f8b\u5916\u3092\u7121\u8996\u3057\u307e\u3057\u305f: {1}

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 threadpool.busy=All threads ({0}) are currently busy, waiting. Increase maxThreads ({1}) or check the servlet status
 threadpool.max_threads_too_low=maxThreads setting ({0}) too low, set to {1}
 threadpool.thread_error=Caught exception ({0}) executing {1}, terminating thread

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 threadpool.busy=Todos los hilos ({0}) están ahora ocupados, esperando. Incremente maxThreads ({1}) o revise el estado del servlet
 threadpool.max_threads_too_low=valor de maxThreads ({0}) demasiado bajo, puesto a {1}
 threadpool.thread_error=Cogida excepción ({0}) ejecutando {1}, terminando hilo

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 threadpool.busy=Tous les threads ({0}) sont actuellement occupés, attente. Augmentez maxThreads ({1}) ou vérifiez le servlet status
 threadpool.max_threads_too_low=le réglage maxThreads ({0}) est trop bas, mis à {1}
 threadpool.thread_error=Réception d''une exception ({0}) en exécutant {1}, arrêt du thread

Modified: trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 threadpool.busy=\u3059\u3079\u3066\u306e\u30b9\u30ec\u30c3\u30c9 ({0}) \u304c\u73fe\u5728\u7a3c\u50cd\u4e2d\u3067\u5f85\u6a5f\u3057\u3066\u3044\u307e\u3059\u3002maxThreads ({1}) \u3092\u5897\u3084\u3059\u304b\u3001\u305d\u306e\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044
 threadpool.max_threads_too_low=maxThreads\u306e\u8a2d\u5b9a ({0}) \u304c\u5c0f\u3055\u3059\u304e\u308b\u306e\u3067\u3001{1}\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044
 threadpool.thread_error={1} \u3092\u5b9f\u884c\u4e2d\u306b\u4f8b\u5916 ({0}) \u3092\u30ad\u30e3\u30c3\u30c1\u3057\u305f\u306e\u3067\u3001\u30b9\u30ec\u30c3\u30c9\u3092\u7d42\u4e86\u3057\u307e\u3059

Modified: trunk/tomcat5.5/connectors/util/loader/loader.properties
===================================================================
--- trunk/tomcat5.5/connectors/util/loader/loader.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/loader/loader.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 catalina.home=/opt/50
 
 loader.auto-startup=org.apache.tomcat.util.jmx.JmxRemoteLoader,\

Modified: trunk/tomcat5.5/connectors/util/loader/org/apache/tomcat/util/loader/package.html
===================================================================
--- trunk/tomcat5.5/connectors/util/loader/org/apache/tomcat/util/loader/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/connectors/util/loader/org/apache/tomcat/util/loader/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <html>
 <body>
 

Modified: trunk/tomcat5.5/container/.classpath
===================================================================
--- trunk/tomcat5.5/container/.classpath	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/.classpath	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <classpath>
 	<classpathentry excluding="org/apache/naming/factory/MailSessionFactory.java|org/apache/naming/factory/SendMailFactory.java" kind="src" path="catalina/src/share"/>
 	<classpathentry kind="src" path="modules/cluster/src/share"/>
@@ -11,21 +27,15 @@
 	<classpathentry kind="src" path="webapps/manager/WEB-INF/classes"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-logging-1.0.4/commons-logging-api.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/mx4j-3.0.1/lib/mx4j.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-launcher-0.9/bin/commons-launcher.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/struts-1.2.7/lib/antlr.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/struts-1.2.7/lib/commons-beanutils.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/struts-1.2.7/lib/commons-digester.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/struts-1.2.7/lib/commons-fileupload.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/struts-1.2.7/lib/commons-logging.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/struts-1.2.7/lib/commons-validator.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/struts-1.2.7/lib/jakarta-oro.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/struts-1.2.7/lib/struts.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/connectors"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/build"/>
+	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-logging-1.1.1/commons-logging-1.1.1.jar"/>
+	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/struts-1.2.9-bin/lib/struts.jar"/>
 	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/servlet-api-2.4/lib/servlet-api.jar"/>
+	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-modeler-2.0.1/commons-modeler-2.0.1.jar"/>
 	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/jsp-api-2.0/lib/jsp-api.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-modeler-2.0/commons-modeler-2.0.jar"/>
+	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-fileupload-1.2/lib/commons-fileupload-1.2.jar"/>
+	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-launcher/bin/commons-launcher.jar"/>
+	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-beanutils-1.7.0/commons-beanutils.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

Modified: trunk/tomcat5.5/container/.project
===================================================================
--- trunk/tomcat5.5/container/.project	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/.project	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <projectDescription>
 	<name>container</name>
 	<comment></comment>

Modified: trunk/tomcat5.5/container/Tomcat5.5.launch
===================================================================
--- trunk/tomcat5.5/container/Tomcat5.5.launch	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/Tomcat5.5.launch	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.catalina.startup.Catalina"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="start"/>

Modified: trunk/tomcat5.5/container/build.xml
===================================================================
--- trunk/tomcat5.5/container/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="Catalina 2.0" default="deploy" basedir=".">
 
 

Modified: trunk/tomcat5.5/container/catalina/build.xml
===================================================================
--- trunk/tomcat5.5/container/catalina/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <project name="Catalina" default="deploy" basedir=".">
 
 
@@ -550,6 +566,8 @@
 <!--
     <copy todir="${catalina.build}/common/lib" file="${servlet-api.jar}"/>
 -->
+    <copy todir="${catalina.build}/common/lib"
+           file="${tomcat-dbcp.jar}" />
 
     <!-- Configuration Files -->
     <copy todir="${catalina.build}/conf">

Modified: trunk/tomcat5.5/container/catalina/etc/bootstrap.MF
===================================================================
--- trunk/tomcat5.5/container/catalina/etc/bootstrap.MF	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/etc/bootstrap.MF	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,5 @@
 Manifest-Version: 1.0
 Main-Class: org.apache.catalina.startup.Bootstrap
-Class-Path: jmx.jar commons-daemon.jar commons-logging-api.jar tomcat-juli.jar
+Class-Path: jmx.jar commons-daemon.jar commons-logging-api-1.1.1.jar tomcat-juli.jar
 Specification-Title: Catalina
 Specification-Version: 1.0

Modified: trunk/tomcat5.5/container/catalina/src/bin/catalina.bat
===================================================================
--- trunk/tomcat5.5/container/catalina/src/bin/catalina.bat	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/bin/catalina.bat	2008-04-06 12:38:06 UTC (rev 6107)
@@ -49,7 +49,7 @@
 rem                   -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,
 rem                       address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
 rem
-rem $Id: catalina.bat 537517 2007-05-12 21:11:17Z markt $
+rem $Id: catalina.bat 609438 2008-01-06 22:14:28Z markt $
 rem ---------------------------------------------------------------------------
 
 rem Guess CATALINA_HOME if not defined
@@ -68,7 +68,12 @@
 :okHome
 
 rem Get standard environment variables
+if "%CATALINA_BASE%" == "" goto gotSetenvHome
+if exist "%CATALINA_BASE%\bin\setenv.bat" call "%CATALINA_BASE%\bin\setenv.bat"
+goto gotSetenvBase
+:gotSetenvHome
 if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
+:gotSetenvBase
 
 rem Get standard Java environment variables
 if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath

Modified: trunk/tomcat5.5/container/catalina/src/bin/catalina.sh
===================================================================
--- trunk/tomcat5.5/container/catalina/src/bin/catalina.sh	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/bin/catalina.sh	2008-04-06 12:38:06 UTC (rev 6107)
@@ -51,7 +51,7 @@
 #   CATALINA_PID    (Optional) Path of the file which should contains the pid
 #                   of catalina startup java process, when start (fork) is used
 #
-# $Id: catalina.sh 498126 2007-01-20 15:38:39Z markt $
+# $Id: catalina.sh 609438 2008-01-06 22:14:28Z markt $
 # -----------------------------------------------------------------------------
 
 # OS specific support.  $var _must_ be set to either true or false.
@@ -83,7 +83,9 @@
 # Only set CATALINA_HOME if not already set
 [ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`
 
-if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
+if [ -r "$CATALINA_BASE"/bin/setenv.sh ]; then
+  . "$CATALINA_BASE"/bin/setenv.sh
+elif [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
   . "$CATALINA_HOME"/bin/setenv.sh
 fi
 
@@ -128,11 +130,8 @@
   fi
 fi
 
-gcj=no
-"$_RUNJAVA" -version 2>&1 | grep -q "^gij (GNU libgcj)" && gcj=yes
-
 # Add on extra jar files to CLASSPATH
-if [ -n "$JSSE_HOME" -a "$gcj" != "yes" ]; then
+if [ -n "$JSSE_HOME" ]; then
   CLASSPATH="$CLASSPATH":"$JSSE_HOME"/lib/jcert.jar:"$JSSE_HOME"/lib/jnet.jar:"$JSSE_HOME"/lib/jsse.jar
 fi
 CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/commons-logging-api.jar
@@ -165,8 +164,7 @@
 fi
 
 # Set juli LogManager if it is present
-# Dont use juli LogManager when running with gcj
-if [ -r "$CATALINA_HOME"/bin/tomcat-juli.jar -a "$gcj" != "yes" ]; then
+if [ -r "$CATALINA_HOME"/bin/tomcat-juli.jar ]; then
   JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" "-Djava.util.logging.config.file="$CATALINA_BASE/conf/logging.properties"
 fi
 
@@ -258,12 +256,6 @@
   shift
   touch "$CATALINA_BASE"/logs/catalina.out
   if [ "$1" = "-security" ] ; then
-    if [ "$gcj" = "yes" ]; then
-      echo "The java-gcj-compat-dev environment currently doesn't support"
-      echo "a security manager. Please check the TOMCAT5_SECURITY variable"
-      echo "in /etc/default/tomcat5.5."
-      exit 1
-    fi
     echo "Using Security Manager"
     shift
     "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \

Modified: trunk/tomcat5.5/container/catalina/src/bin/service.bat
===================================================================
--- trunk/tomcat5.5/container/catalina/src/bin/service.bat	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/bin/service.bat	2008-04-06 12:38:06 UTC (rev 6107)
@@ -11,7 +11,7 @@
 rem name        (optional) If the second argument is present it is considered
 rem                        to be new service name                                           
 rem
-rem $Id: service.bat 414655 2006-06-15 18:56:42Z yoavs $
+rem $Id: service.bat 609414 2008-01-06 21:42:23Z markt $
 rem ---------------------------------------------------------------------------
 
 rem Guess CATALINA_HOME if not defined
@@ -110,7 +110,7 @@
 set PR_LOGPATH=%CATALINA_BASE%\logs
 set PR_STDOUTPUT=auto
 set PR_STDERROR=auto
-"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMs 128 --JvmMx 256
+"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties" --JvmMs 128 --JvmMx 256
 echo The service '%SERVICE_NAME%' has been installed.
 
 :end

Modified: trunk/tomcat5.5/container/catalina/src/conf/catalina.policy
===================================================================
--- trunk/tomcat5.5/container/catalina/src/conf/catalina.policy	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/conf/catalina.policy	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You 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.
+
 // ============================================================================
 // catalina.corepolicy - Security Policy Permissions for Tomcat 5
 //
@@ -8,7 +23,7 @@
 //
 // * Read access to the document root directory
 //
-// $Id: catalina.policy 543025 2007-05-31 02:44:18Z markt $
+// $Id: catalina.policy 609451 2008-01-06 22:38:14Z markt $
 // ============================================================================
 
 
@@ -67,7 +82,19 @@
 
 // These permissions apply to JULI
 grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
-        permission java.security.AllPermission;
+        permission java.util.PropertyPermission "java.util.logging.config.class", "read";
+        permission java.util.PropertyPermission "java.util.logging.config.file", "read";
+        permission java.lang.RuntimePermission "shutdownHooks";
+        permission java.io.FilePermission "${catalina.base}${file.separator}conf${file.separator}logging.properties", "read";
+        permission java.util.PropertyPermission "catalina.base", "read";
+        permission java.util.logging.LoggingPermission "control";
+        permission java.io.FilePermission "${catalina.base}${file.separator}logs", "read, write";
+        permission java.io.FilePermission "${catalina.base}${file.separator}logs${file.separator}*", "read, write";
+        permission java.lang.RuntimePermission "getClassLoader";
+        // To enable per context logging configuration, permit read access to the appropriate file.
+        // Be sure that the logging configuration is secure before enabling such access
+        // eg for the examples web application:
+        // permission java.io.FilePermission "${catalina.base}${file.separator}webapps${file.separator}examples${file.separator}WEB-INF${file.separator}classes${file.separator}logging.properties", "read";
 };
 
 // These permissions apply to the servlet API classes

Modified: trunk/tomcat5.5/container/catalina/src/conf/catalina.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/conf/catalina.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/conf/catalina.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+#
 # List of comma-separated packages that start with or equal this string
 # will cause a security exception to be thrown when
 # passed to checkPackageAccess unless the

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/antlib.xml
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/antlib.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/antlib.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <antlib>
   <typedef
         name="list"

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/catalina.tasks
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/catalina.tasks	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/catalina.tasks	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # Pure catalina tasks
 deploy=org.apache.catalina.ant.DeployTask
 list=org.apache.catalina.ant.ListTask

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/jmx/antlib.xml
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/jmx/antlib.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/jmx/antlib.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <antlib>
   <typedef
         name="open"

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/jmx/jmxaccessor.tasks
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/jmx/jmxaccessor.tasks	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/jmx/jmxaccessor.tasks	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # JMX
 jmxOpen=org.apache.catalina.ant.jmx.JMXAccessorTask
 jmxSet=org.apache.catalina.ant.jmx.JMXAccessorSetTask

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/jmx/package.html
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/jmx/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/jmx/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <body>
 
 <p>This package contains a set of <code>JMX Task</code> implementations for

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/package.html
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ant/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <body>
 
 <p>This package contains a set of <code>Task</code> implementations for

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -50,7 +50,7 @@
  *
  * @author Craig R. McClanahan
  * @author Remy Maucherat
- * @version $Revision: 536382 $ $Date: 2007-05-09 02:05:00 +0200 (Wed, 09 May 2007) $
+ * @version $Revision: 602593 $ $Date: 2007-12-08 17:44:26 -0700 (Sat, 08 Dec 2007) $
  */
 
 public class FormAuthenticator
@@ -402,12 +402,20 @@
 
         MimeHeaders rmh = request.getCoyoteRequest().getMimeHeaders();
         rmh.recycle();
+        boolean cachable = "GET".equalsIgnoreCase(saved.getMethod()) ||
+                           "HEAD".equalsIgnoreCase(saved.getMethod());
         Iterator names = saved.getHeaderNames();
         while (names.hasNext()) {
             String name = (String) names.next();
-            Iterator values = saved.getHeaderValues(name);
-            while (values.hasNext()) {
-                rmh.addValue(name).setString( (String)values.next() );
+            // The browser isn't expecting this conditional response now.
+            // Assuming that it can quietly recover from an unexpected 412.
+            // BZ 43687
+            if(!("If-Modified-Since".equalsIgnoreCase(name) ||
+                 (cachable && "If-None-Match".equalsIgnoreCase(name)))) {
+                Iterator values = saved.getHeaderValues(name);
+                while (values.hasNext()) {
+                    rmh.addValue(name).setString( (String)values.next() );
+                }
             }
         }
         

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 authenticator.alreadyStarted=Security Interceptor has already been started
 authenticator.certificates=No client certificate chain in this request
 authenticator.forbidden=Access to the requested resource has been denied

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 authenticator.alreadyStarted=El interceptor de seguridad ya ha sido arrancado
 authenticator.certificates=No hay cadena de certificados del cliente en esta petición
 authenticator.forbidden=El acceso al recurso pedido ha sido denegado

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 authenticator.alreadyStarted=L''intercepteur de sécurité (security interceptor) a déjà été démarré
 authenticator.certificates=Aucune chaîne de certificat client (client certificate chain) dans cette requête
 authenticator.forbidden=L''accès à la ressource demandée a été interdit

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 authenticator.alreadyStarted=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30a4\u30f3\u30bf\u30fc\u30bb\u30d7\u30bf\u306f\u65e2\u306b\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u3059
 authenticator.certificates=\u3053\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a8d\u8a3c\u30c1\u30a7\u30fc\u30f3\u304c\u3042\u308a\u307e\u305b\u3093
 authenticator.forbidden=\u30ea\u30af\u30a8\u30b9\u30c8\u3055\u308c\u305f\u30ea\u30bd\u30fc\u30b9\u3078\u306e\u30a2\u30af\u30bb\u30b9\u304c\u62d2\u5426\u3055\u308c\u307e\u3057\u305f

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <mbeans-descriptors>
 
   <mbean name="BasicAuthenticator"

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/package.html
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/authenticator/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <body>
 
 <p>This package contains <code>Authenticator</code> implementations for the

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/CoyoteAdapter.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/CoyoteAdapter.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/CoyoteAdapter.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -24,6 +24,7 @@
 import org.apache.catalina.Globals;
 import org.apache.catalina.Wrapper;
 import org.apache.catalina.util.StringManager;
+import org.apache.catalina.util.URLEncoder;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.coyote.ActionCode;
@@ -42,7 +43,7 @@
  *
  * @author Craig R. McClanahan
  * @author Remy Maucherat
- * @version $Revision: 523135 $ $Date: 2007-03-28 03:36:22 +0200 (Wed, 28 Mar 2007) $
+ * @version $Revision: 609463 $ $Date: 2008-01-06 16:10:34 -0700 (Sun, 06 Jan 2008) $
  */
 
 public class CoyoteAdapter
@@ -103,6 +104,28 @@
         StringManager.getManager(Constants.Package);
 
 
+    /**
+     * Encoder for the Location URL in HTTP redirects.
+     */
+    protected static URLEncoder urlEncoder;
+
+
+    // ----------------------------------------------------- Static Initializer
+
+
+    /**
+     * The safe character set.
+     */
+    static {
+        urlEncoder = new URLEncoder();
+        urlEncoder.addSafeCharacter('-');
+        urlEncoder.addSafeCharacter('_');
+        urlEncoder.addSafeCharacter('.');
+        urlEncoder.addSafeCharacter('*');
+        urlEncoder.addSafeCharacter('/');
+    }
+
+
     // -------------------------------------------------------- Adapter Methods
 
 
@@ -311,7 +334,7 @@
         // Possible redirect
         MessageBytes redirectPathMB = request.getMappingData().redirectPath;
         if (!redirectPathMB.isNull()) {
-            String redirectPath = redirectPathMB.toString();
+            String redirectPath = urlEncoder.encode(redirectPathMB.toString());
             String query = request.getQueryString();
             if (request.isRequestedSessionIdFromURL()) {
                 // This is not optimal, but as this is not very common, it
@@ -383,6 +406,14 @@
      */
     protected void parseSessionCookiesId(org.apache.coyote.Request req, Request request) {
 
+        // If session tracking via cookies has been disabled for the current
+        // context, don't go looking for a session ID in a cookie as a cookie
+        // from a parent context with a session ID may be present which would
+        // overwrite the valid session ID encoded in the URL
+        Context context = (Context) request.getMappingData().context;
+        if (context != null && !context.getCookies())
+            return;
+
         // Parse session id from cookies
         Cookies serverCookies = req.getCookies();
         int count = serverCookies.getCookieCount();

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/InputBuffer.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/InputBuffer.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/InputBuffer.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -46,7 +46,6 @@
 
     // -------------------------------------------------------------- Constants
 
-
     public static final String DEFAULT_ENCODING = 
         org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING;
     public static final int DEFAULT_BUFFER_SIZE = 8*1024;
@@ -259,9 +258,9 @@
             return -1;
         if (coyoteRequest == null)
             return -1;
+        if(state == INITIAL_STATE)
+            state = BYTE_STATE;
 
-        state = BYTE_STATE;
-
         int result = coyoteRequest.doRead(bb);
 
         return result;
@@ -293,6 +292,8 @@
     public void realWriteChars(char c[], int off, int len) 
         throws IOException {
         markPos = -1;
+        cb.setOffset(0);
+        cb.setEnd(0);
     }
 
 
@@ -318,13 +319,9 @@
             cb.setOffset(0);
             cb.setEnd(0);
         }
-
-        int limit = bb.getLength()+cb.getStart();
-        if( cb.getLimit() < limit ) 
-            cb.setLimit(limit);
-        conv.convert(bb, cb);
-        bb.setOffset(bb.getEnd());
         state = CHAR_STATE;
+        conv.convert(bb, cb, len);
+        bb.setOffset(bb.getEnd());
 
         return cb.getLength();
 

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+
 #
 # CoyoteConnector
 #

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+
 #
 # CoyoteConnector
 #

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+
 #
 # CoyoteConnector
 #

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+
 #
 # CoyoteConnector
 #

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/Request.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/Request.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/Request.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -77,7 +77,7 @@
  *
  * @author Remy Maucherat
  * @author Craig R. McClanahan
- * @version $Revision: 486929 $ $Date: 2006-12-13 19:07:32 -0700 (Wed, 13 Dec 2006) $
+ * @version $Revision: 609406 $ $Date: 2008-01-06 14:23:24 -0700 (Sun, 06 Jan 2008) $
  */
 
 public class Request
@@ -2271,6 +2271,22 @@
         }
     }
 
+    protected String unescape(String s) {
+        if (s==null) return null;
+        if (s.indexOf('\\') == -1) return s;
+        StringBuffer buf = new StringBuffer();
+        for (int i=0; i<s.length(); i++) {
+            char c = s.charAt(i);
+            if (c!='\\') buf.append(c);
+            else {
+                if (++i >= s.length()) throw new IllegalArgumentException();//invalid escape, hence invalid cookie
+                c = s.charAt(i);
+                buf.append(c);
+            }
+        }
+        return buf.toString();
+    }
+    
     /**
      * Parse cookies.
      */
@@ -2289,14 +2305,18 @@
         for (int i = 0; i < count; i++) {
             ServerCookie scookie = serverCookies.getCookie(i);
             try {
-                Cookie cookie = new Cookie(scookie.getName().toString(),
-                                           scookie.getValue().toString());
-                cookie.setPath(scookie.getPath().toString());
-                cookie.setVersion(scookie.getVersion());
+                /*
+                we must unescape the '\\' escape character
+                */
+                Cookie cookie = new Cookie(scookie.getName().toString(),null);
+                int version = scookie.getVersion();
+                cookie.setVersion(version);
+                cookie.setValue(unescape(scookie.getValue().toString()));
+                cookie.setPath(unescape(scookie.getPath().toString()));
                 String domain = scookie.getDomain().toString();
-                if (domain != null) {
-                    cookie.setDomain(scookie.getDomain().toString());
-                }
+                if (domain!=null) cookie.setDomain(unescape(domain));//avoid NPE
+                String comment = scookie.getComment().toString();
+                cookie.setComment(version==1?unescape(comment):null);
                 cookies[idx++] = cookie;
             } catch(IllegalArgumentException e) {
                 // Ignore bad cookie

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/Response.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/Response.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/Response.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -58,7 +58,7 @@
  *
  * @author Remy Maucherat
  * @author Craig R. McClanahan
- * @version $Revision: 567009 $ $Date: 2007-08-17 04:54:37 -0600 (Fri, 17 Aug 2007) $
+ * @version $Revision: 609449 $ $Date: 2008-01-06 15:31:10 -0700 (Sun, 06 Jan 2008) $
  */
 
 public class Response
@@ -652,6 +652,9 @@
 
         coyoteResponse.reset();
         outputBuffer.reset();
+        usingOutputStream = false;
+        usingWriter = false;
+        isCharacterEncodingSet = false;
     }
 
 
@@ -937,9 +940,9 @@
         if (included)
             return;
 
-        cookies.add(cookie);
-
         final StringBuffer sb = new StringBuffer();
+        //web application code can receive a IllegalArgumentException 
+        //from the appendCookieValue invokation
         if (SecurityUtil.isPackageProtectionEnabled()) {
             AccessController.doPrivileged(new PrivilegedAction() {
                 public Object run(){
@@ -958,11 +961,13 @@
                      cookie.getMaxAge(), cookie.getSecure());
         }
 
+        // if we reached here, no exception, cookie is valid
         // the header name is Set-Cookie for both "old" and v.1 ( RFC2109 )
         // RFC2965 is not supported by browsers and the Servlet spec
         // asks for 2109.
         addHeader("Set-Cookie", sb.toString());
 
+        cookies.add(cookie);
     }
 
 

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/connector/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <mbeans-descriptors>
 
   <mbean         name="CoyoteConnector"

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/ApplicationContext.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/ApplicationContext.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -60,7 +60,7 @@
  *
  * @author Craig R. McClanahan
  * @author Remy Maucherat
- * @version $Revision: 466608 $ $Date: 2006-10-21 17:10:15 -0600 (Sat, 21 Oct 2006) $
+ * @version $Revision: 609447 $ $Date: 2008-01-06 15:28:12 -0700 (Sun, 06 Jan 2008) $
  */
 
 public class ApplicationContext
@@ -523,7 +523,7 @@
     public InputStream getResourceAsStream(String path) {
 
         path = normalize(path);
-        if (path == null)
+        if (path == null || !path.startsWith("/"))
             return (null);
 
         DirContext resources = context.getResources();
@@ -884,7 +884,7 @@
 
         String normalized = path;
 
-        // Normalize the slashes and add leading slash if necessary
+        // Normalize the slashes
         if (normalized.indexOf('\\') >= 0)
             normalized = normalized.replace('\\', '/');
 

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -60,7 +60,7 @@
  * <code>javax.servlet.ServletResponseWrapper</code>.
  *
  * @author Craig R. McClanahan
- * @version $Revision: 545175 $ $Date: 2007-06-07 15:31:16 +0200 (Thu, 07 Jun 2007) $
+ * @version $Revision: 572854 $ $Date: 2007-09-04 19:53:49 -0600 (Tue, 04 Sep 2007) $
  */
 
 final class ApplicationDispatcher
@@ -362,10 +362,6 @@
             wrequest.setQueryString(hrequest.getQueryString());
 
             processRequest(request,response,state);
-
-            wrequest.recycle();
-            unwrapRequest(state);
-
         }
 
         // Handle an HTTP path-based forward
@@ -401,10 +397,6 @@
             }
 
             processRequest(request,response,state);
-
-            wrequest.recycle();
-            unwrapRequest(state);
-
         }
 
         // This is not a real close in order to support error processing
@@ -554,8 +546,6 @@
                     ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR,
                     servletPath);
             invoke(state.outerRequest, state.outerResponse, state);
-
-            wrequest.recycle();
         }
 
         // Handle an HTTP path based include
@@ -592,8 +582,6 @@
                     ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR,
                     servletPath);
             invoke(state.outerRequest, state.outerResponse, state);
-
-            wrequest.recycle();
         }
 
     }
@@ -768,6 +756,8 @@
         // See Bugzilla 30949
         unwrapRequest(state);
         unwrapResponse(state);
+        // Recycle request if necessary (also BZ 30949)
+        recycleRequestWrapper(state);
 
         // Rethrow an exception if one was thrown by the invoked servlet
         if (ioException != null)
@@ -1026,4 +1016,10 @@
                     "applicationDispatcher.specViolation.response"));
         }
     }
+    
+    private void recycleRequestWrapper(State state) {
+        if (state.wrapRequest instanceof ApplicationHttpRequest) {
+            ((ApplicationHttpRequest) state.wrapRequest).recycle();
+        }
+    }
 }

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 applicationContext.attributeEvent=Exception thrown by attributes event listener
 applicationContext.mapping.error=Error during mapping
 applicationContext.requestDispatcher.iae=Path {0} does not start with a "/" character

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 applicationContext.attributeEvent=Excepción lanzada por escuchador de eventos de atributos
 applicationContext.mapping.error=Error durante mapeo
 applicationContext.requestDispatcher.iae=La Trayectoria {0} no comienza con carácter "/"

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 applicationContext.attributeEvent=Exception lancée par l''écouteur (listener) d''évènement attributs
 applicationContext.requestDispatcher.iae=Le chemin {0} ne commence pas par le caractère "/"
 applicationContext.setAttribute.namenull=le nom ne peut être nul

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 applicationContext.attributeEvent=\u5c5e\u6027\u30a4\u30d9\u30f3\u30c8\u30ea\u30b9\u30ca\u306b\u3088\u3063\u3066\u4f8b\u5916\u304c\u6295\u3052\u3089\u308c\u307e\u3057\u305f
 applicationContext.mapping.error=\u30de\u30c3\u30d4\u30f3\u30b0\u4e2d\u306e\u30a8\u30e9\u30fc\u3067\u3059
 applicationContext.requestDispatcher.iae=\u30d1\u30b9 {0} \u304c"/"\u6587\u5b57\u3067\u59cb\u307e\u308a\u307e\u305b\u3093

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/StandardContext.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/StandardContext.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/StandardContext.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -103,7 +103,7 @@
  *
  * @author Craig R. McClanahan
  * @author Remy Maucherat
- * @version $Revision: 522870 $ $Date: 2007-03-27 13:37:32 +0200 (Tue, 27 Mar 2007) $
+ * @version $Revision: 522870 $ $Date: 2007-03-27 05:37:32 -0600 (Tue, 27 Mar 2007) $
  */
 
 public class StandardContext

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/StandardWrapper.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/StandardWrapper.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -69,7 +69,7 @@
  *
  * @author Craig R. McClanahan
  * @author Remy Maucherat
- * @version $Revision: 499215 $ $Date: 2007-01-23 19:55:06 -0700 (Tue, 23 Jan 2007) $
+ * @version $Revision: 609411 $ $Date: 2008-01-06 14:34:21 -0700 (Sun, 06 Jan 2008) $
  */
 public class StandardWrapper
     extends ContainerBase
@@ -1748,7 +1748,7 @@
                 broadcaster.sendNotification(notification);
             }
         } catch( Exception ex ) {
-            log.info("Error registering servlet with jmx " + this);
+            log.info("Error registering servlet with jmx " + this, ex);
         }
 
         if (isJspServlet) {
@@ -1763,7 +1763,7 @@
                     .registerComponent(instance, jspMonitorON, null);
             } catch( Exception ex ) {
                 log.info("Error registering JSP monitoring with jmx " +
-                         instance);
+                         instance, ex);
             }
         }
     }

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <mbeans-descriptors>
 
   <mbean name="NamingContextListener"

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/deploy/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/deploy/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/deploy/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <mbeans-descriptors>
 
   <mbean name="ContextEnvironment"

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/deploy/package.html
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/deploy/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/deploy/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <body>
 
 <p>This package contains Java objects that represent complex data structures

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocaStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocaStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocaStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 fileClassLoader.canRead=Le réceptacle (repository) {0} ne peut être lu
 fileClassLoader.exists=Le réceptacle (repository) {0} n''existe pas
 fileClassLoader.jarFile=Impossible de lire le fichier JAR {0}

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 fileClassLoader.canRead=Repository {0} cannot be read
 fileClassLoader.exists=Repository {0} does not exist
 fileClassLoader.jarFile=Cannot read JAR file {0}

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 fileClassLoader.canRead=No se puede leer el Repositorio {0}
 fileClassLoader.exists=No existe el Repositorio {0}
 fileClassLoader.jarFile=No puedo leer archivo JAR {0}

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 fileClassLoader.canRead=\u30ea\u30dd\u30b8\u30c8\u30ea {0} \u304c\u8aad\u3081\u307e\u305b\u3093
 fileClassLoader.exists=\u30ea\u30dd\u30b8\u30c8\u30ea {0} \u304c\u5b58\u5728\u3057\u307e\u305b\u3093
 fileClassLoader.jarFile=JAR\u30d5\u30a1\u30a4\u30eb {0} \u304c\u8aad\u3081\u307e\u305b\u3093

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -102,13 +102,12 @@
  *
  * @author Remy Maucherat
  * @author Craig R. McClanahan
- * @version $Revision: 530625 $ $Date: 2007-04-20 05:19:12 +0200 (Fri, 20 Apr 2007) $
+ * @version $Revision: 609439 $ $Date: 2008-01-06 15:18:38 -0700 (Sun, 06 Jan 2008) $
  */
 public class WebappClassLoader
     extends URLClassLoader
     implements Reloader, Lifecycle
  {
-
     protected static org.apache.commons.logging.Log log=
         org.apache.commons.logging.LogFactory.getLog( WebappClassLoader.class );
 
@@ -887,7 +886,9 @@
             }
             if ((clazz == null) && hasExternalRepositories) {
                 try {
-                    clazz = super.findClass(name);
+                    synchronized (this) {
+                        clazz = super.findClass(name);
+                    }
                 } catch(AccessControlException ace) {
                     throw new ClassNotFoundException(name, ace);
                 } catch (RuntimeException e) {

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/loader/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <mbeans-descriptors>
 
   <mbean         name="WebappLoader"

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <mbeans-descriptors>
 
   <mbean         name="MBeanFactory"

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <mbeans-descriptors>
 
   <mbean name="Group"

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/JAASRealm.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/JAASRealm.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/JAASRealm.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -120,7 +120,7 @@
 *
 * @author Craig R. McClanahan
 * @author Yoav Shapira
- * @version $Revision: 522354 $ $Date: 2007-03-25 23:31:22 +0200 (Sun, 25 Mar 2007) $
+ * @version $Revision: 609456 $ $Date: 2008-01-06 15:53:15 -0700 (Sun, 06 Jan 2008) $
  */
 
 public class JAASRealm
@@ -250,7 +250,6 @@
       */
      public void setRoleClassNames(String roleClassNames) {
          this.roleClassNames = roleClassNames;
-         parseClassNames(roleClassNames, roleClasses);
      }
      
      /**
@@ -264,12 +263,17 @@
      protected void parseClassNames(String classNamesString, List classNamesList) {
          classNamesList.clear();
          if (classNamesString == null) return;
-         
+
+         ClassLoader loader = this.getClass().getClassLoader();
+         if (isUseContextClassLoader())
+             loader = Thread.currentThread().getContextClassLoader();
+
          String[] classNames = classNamesString.split("[ ]*,[ ]*");
          for (int i=0; i<classNames.length; i++) {
              if (classNames[i].length()==0) continue;        
              try {
-                 Class principalClass = Class.forName(classNames[i]);
+                 Class principalClass = Class.forName(classNames[i], false,
+                         loader);
                  if (Principal.class.isAssignableFrom(principalClass)) {
                      classNamesList.add(classNames[i]);
                  } else {
@@ -302,7 +306,6 @@
      */
     public void setUserClassNames(String userClassNames) {
         this.userClassNames = userClassNames;
-        parseClassNames(userClassNames, userClasses);
     }
 
 
@@ -335,9 +338,10 @@
         // What if the LoginModule is in the container class loader ?
         ClassLoader ocl = null;
 
-        if (isUseContextClassLoader()) {
-          ocl=Thread.currentThread().getContextClassLoader();
-          Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
+        if (!isUseContextClassLoader()) {
+            ocl=Thread.currentThread().getContextClassLoader();
+            Thread.currentThread().setContextClassLoader(
+                    this.getClass().getClassLoader());
         }
 
         try {
@@ -348,7 +352,7 @@
             log.error(sm.getString("jaasRealm.unexpectedError"), e);
             return (null);
         } finally {
-            if( isUseContextClassLoader()) {
+            if(!isUseContextClassLoader()) {
               Thread.currentThread().setContextClassLoader(ocl);
             }
         }
@@ -547,6 +551,10 @@
         // Perform normal superclass initialization
         super.start();
 
+        // These need to be called after loading configuration, in case
+        // useContextClassLoader appears after them in xml config
+        parseClassNames(userClassNames, userClasses);
+        parseClassNames(roleClassNames, roleClasses);
     }
 
 

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -151,7 +151,7 @@
  *
  * @author John Holman
  * @author Craig R. McClanahan
- * @version $Revision: 543692 $ $Date: 2007-06-02 03:41:58 +0200 (Sat, 02 Jun 2007) $
+ * @version $Revision: 572860 $ $Date: 2007-09-04 20:15:35 -0600 (Tue, 04 Sep 2007) $
  */
 
 public class JNDIRealm extends RealmBase {
@@ -1533,6 +1533,21 @@
                 // Try the authentication again.
                 principal = getPrincipal(context, username);
 
+            } catch (ServiceUnavailableException e) {
+
+                // log the exception so we know it's there.
+                containerLog.warn(sm.getString("jndiRealm.exception"), e);
+
+                // close the connection so we know it will be reopened.
+                if (context != null)
+                    close(context);
+
+                // open a new directory context.
+                context = open();
+
+                // Try the authentication again.
+                principal = getPrincipal(context, username);
+
             }
 
 

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,20 @@
-# $Id: LocalStrings.properties 303678 2005-02-03 15:14:34Z remm $
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+# $Id: LocalStrings.properties 572160 2007-09-02 21:16:25Z markt $
+
 # language
 
 # package org.apache.catalina.realm

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,20 @@
-# $Id: LocalStrings_es.properties 302991 2004-07-03 04:16:41Z billbarker $
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+# $Id: LocalStrings_es.properties 572160 2007-09-02 21:16:25Z markt $
+
 # language es
 
 # package org.apache.catalina.realm

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,20 @@
-# $Id: LocalStrings_fr.properties 302991 2004-07-03 04:16:41Z billbarker $
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+# $Id: LocalStrings_fr.properties 572160 2007-09-02 21:16:25Z markt $
+
 # language
 
 # package org.apache.catalina.realm

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,20 @@
-# $Id: LocalStrings_ja.properties 302991 2004-07-03 04:16:41Z billbarker $
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+# $Id: LocalStrings_ja.properties 572160 2007-09-02 21:16:25Z markt $
+
 # language ja
 
 # package org.apache.catalina.realm

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <mbeans-descriptors>
 
   <mbean         name="DataSourceRealm"

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/package.html
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/realm/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <body>
 
 <p>This package contains <code>Realm</code> implementations for the

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,2 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 SecurityUtil.doAsPrivilege=An exception occurs when running the PrivilegedExceptionAction block.
 

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,2 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 SecurityUtil.doAsPrivilege=Ha tenido lugar una excepción al ejecutar el bloque PrivilegedExceptionAction.
 

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,2 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 SecurityUtil.doAsPrivilege=Une exception s''est produite lors de l''exécution du bloc "PrivilegedExceptionAction".
 

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/security/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,2 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 SecurityUtil.doAsPrivilege=PrivilegedExceptionAction\u30d6\u30ed\u30c3\u30af\u3092\u5b9f\u884c\u4e2d\u306b\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
 

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -235,7 +235,7 @@
  *
  * @author Martin T Dengler [root at martindengler.com]
  * @author Amy Roh
- * @version $Revision: 505740 $, $Date: 2007-02-10 11:45:24 -0700 (Sat, 10 Feb 2007) $
+ * @version $Revision: 609298 $, $Date: 2008-01-06 05:27:05 -0700 (Sun, 06 Jan 2008) $
  * @since Tomcat 4.0
  *
  */
@@ -707,7 +707,7 @@
      * <p>
      * </p>
      *
-     * @version  $Revision: 505740 $, $Date: 2007-02-10 11:45:24 -0700 (Sat, 10 Feb 2007) $
+     * @version  $Revision: 609298 $, $Date: 2008-01-06 05:27:05 -0700 (Sun, 06 Jan 2008) $
      * @since    Tomcat 4.0
      *
      */
@@ -797,10 +797,26 @@
          */
         protected void setupFromRequest(HttpServletRequest req)
                 throws UnsupportedEncodingException {
-            
-            this.contextPath = req.getContextPath();
-            this.servletPath = req.getServletPath();
-            this.pathInfo = req.getPathInfo();
+
+            boolean isIncluded = false;
+
+            // Look to see if this request is an include
+            if (req.getAttribute(Globals.INCLUDE_REQUEST_URI_ATTR) != null) {
+                isIncluded = true;
+            }
+            if (isIncluded) {
+                this.contextPath = (String) req.getAttribute(
+                        Globals.INCLUDE_CONTEXT_PATH_ATTR);
+                this.servletPath = (String) req.getAttribute(
+                        Globals.INCLUDE_SERVLET_PATH_ATTR);
+                this.pathInfo = (String) req.getAttribute(
+                        Globals.INCLUDE_PATH_INFO_ATTR);
+            } else {
+                this.contextPath = req.getContextPath();
+                this.servletPath = req.getServletPath();
+                this.pathInfo = req.getPathInfo();
+            }
+
             // If getPathInfo() returns null, must be using extension mapping
             // In this case, pathInfo should be same as servletPath
             if (this.pathInfo == null) {
@@ -814,7 +830,13 @@
             if (req.getMethod().equals("GET")
                 || req.getMethod().equals("POST")
                 || req.getMethod().equals("HEAD")) {
-                String qs = req.getQueryString();
+                String qs;
+                if (isIncluded) {
+                    qs = (String) req.getAttribute(
+                            Globals.INCLUDE_QUERY_STRING_ATTR);
+                } else {
+                    qs = req.getQueryString();
+                }
                 if (qs != null && qs.indexOf("=") == -1) {
                     StringTokenizer qsTokens = new StringTokenizer(qs, "+");
                     while ( qsTokens.hasMoreTokens() ) {
@@ -1429,7 +1451,7 @@
      * and <code>setResponse</code> methods, respectively.
      * </p>
      *
-     * @version   $Revision: 505740 $, $Date: 2007-02-10 11:45:24 -0700 (Sat, 10 Feb 2007) $
+     * @version   $Revision: 609298 $, $Date: 2008-01-06 05:27:05 -0700 (Sun, 06 Jan 2008) $
      */
 
     protected class CGIRunner {

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 defaultServlet.missingResource=The requested resource ({0}) is not available
 defaultservlet.directorylistingfor=Directory Listing for:
 defaultservlet.upto=Up to:
@@ -10,6 +25,7 @@
 invokerServlet.notNamed=Cannot call invoker servlet with a named dispatcher
 invokerServlet.noWrapper=Container has not called setWrapper() for this servlet
 webdavservlet.jaxpfailed=JAXP initialization failed
+webdavservlet.externalEntityIgnored=The request included a reference to an external entity with PublicID {0} and SystemID {1} which was ignored
 directory.filename=Filename
 directory.lastModified=Last Modified
 directory.parent=Up To {0}

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 defaultservlet.directorylistingfor=Listado de Directorio para:
 defaultservlet.upto=Atrás a:
 defaultservlet.subdirectories=Subdirectorios:

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 defaultservlet.directorylistingfor=Liste du répertoire pour :
 defaultservlet.upto=Jusqu''à:
 defaultservlet.subdirectories=Sous-répertoires:

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 defaultservlet.directorylistingfor=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e00\u89a7: 
 defaultservlet.upto=\u89aa\u30c7\u30a3\u30ec\u30af\u30c8\u30ea: 
 defaultservlet.subdirectories=\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea:

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -20,6 +20,7 @@
 
 
 import java.io.IOException;
+import java.io.StringReader;
 import java.io.StringWriter;
 import java.io.Writer;
 import java.security.MessageDigest;
@@ -40,6 +41,7 @@
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.DirContext;
+import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.UnavailableException;
 import javax.servlet.http.HttpServletRequest;
@@ -61,6 +63,7 @@
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
+import org.xml.sax.EntityResolver;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 
@@ -75,7 +78,7 @@
  * the /* URL pattern.
  *
  * @author Remy Maucherat
- * @version $Revision: 561183 $ $Date: 2007-07-30 17:22:00 -0600 (Mon, 30 Jul 2007) $
+ * @version $Revision: 609297 $ $Date: 2008-01-06 05:00:31 -0700 (Sun, 06 Jan 2008) $
  */
 
 public class WebdavServlet  extends DefaultServlet {
@@ -252,8 +255,10 @@
         try {
             documentBuilderFactory = DocumentBuilderFactory.newInstance();
             documentBuilderFactory.setNamespaceAware(true);
-	    documentBuilderFactory.setExpandEntityReferences(false);
+            documentBuilderFactory.setExpandEntityReferences(false);
             documentBuilder = documentBuilderFactory.newDocumentBuilder();
+            documentBuilder.setEntityResolver(
+                    new WebdavResolver(this.getServletContext()));
         } catch(ParserConfigurationException e) {
             throw new ServletException
                 (sm.getString("webdavservlet.jaxpfailed"));
@@ -2769,7 +2774,26 @@
 
     }
 
+    // --------------------------------------------- WebdavResolver Inner Class
+    /**
+     * Work around for XML parsers that don't fully respect
+     * {@link DocumentBuilderFactory#setExpandEntityReferences(false)}. External
+     * references are filtered out for security reasons. See CVE-2007-5461.
+     */
+    private class WebdavResolver implements EntityResolver {
+        private ServletContext context;
+        
+        public WebdavResolver(ServletContext theContext) {
+            context = theContext;
+        }
 
+        public InputSource resolveEntity (String publicId, String systemId) {
+            context.log(sm.getString("webdavservlet.externalEntityIgnored",
+                    publicId, systemId));
+            return new InputSource(
+                    new StringReader("Ignored external entity"));
+        }
+    }
 };
 
 

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/package.html
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/servlets/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <body>
 
 <p>This package contains <code>Servlets</code> that implement some of the

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 applicationSession.session.ise=invalid session state
 applicationSession.value.iae=null value
 fileStore.alreadyStarted=File Store has already been started

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 applicationSession.session.ise=estado inválido de sesión
 applicationSession.value.iae=valor nulo
 fileStore.alreadyStarted=Ya ha sido arrancado el Almacén de Archivos

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 applicationSession.session.ise=état de session invalide
 applicationSession.value.iae=valeur nulle
 fileStore.alreadyStarted=Le "File Store" a déjà été démarré

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 applicationSession.session.ise=\u7121\u52b9\u306a\u30bb\u30c3\u30b7\u30e7\u30f3\u72b6\u614b\u3067\u3059
 applicationSession.value.iae=null\u5024\u3067\u3059
 fileStore.alreadyStarted=\u30d5\u30a1\u30a4\u30eb\u30b9\u30c8\u30a2\u304c\u65e2\u306b\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u3059

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/ManagerBase.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/ManagerBase.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/ManagerBase.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -58,7 +58,7 @@
  * be subclassed to create more sophisticated Manager implementations.
  *
  * @author Craig R. McClanahan
- * @version $Revision: 531678 $ $Date: 2007-04-24 04:16:55 +0200 (Tue, 24 Apr 2007) $
+ * @version $Revision: 573959 $ $Date: 2007-09-09 02:41:35 -0600 (Sun, 09 Sep 2007) $
  */
 
 public abstract class ManagerBase implements Manager, MBeanRegistration {
@@ -1218,12 +1218,22 @@
     public String getLastAccessedTime( String sessionId ) {
         Session s=(Session)sessions.get(sessionId);
         if( s==null ) {
-            log.info("Session not found " + sessionId);
+            if(log.isInfoEnabled())
+                log.info("Session not found " + sessionId);
             return "";
         }
         return new Date(s.getLastAccessedTime()).toString();
     }
 
+    public String getCreationTime( String sessionId ) {
+        Session s=(Session)sessions.get(sessionId);
+        if( s==null ) {
+            if(log.isInfoEnabled())
+                log.info("Session not found " + sessionId);
+            return "";
+        }
+        return new Date(s.getCreationTime()).toString();
+    }
 
     // -------------------- JMX and Registration  --------------------
     protected String domain;

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/StandardManager.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/StandardManager.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/StandardManager.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -59,7 +59,7 @@
  *
  * @author Craig R. McClanahan
  * @author Jean-Francois Arcand
- * @version $Revision: 479370 $ $Date: 2006-11-26 08:31:29 -0700 (Sun, 26 Nov 2006) $
+ * @version $Revision: 613527 $ $Date: 2008-01-20 02:58:17 -0700 (Sun, 20 Jan 2008) $
  */
 
 public class StandardManager
@@ -395,10 +395,10 @@
                     session.setManager(this);
                     sessions.put(session.getIdInternal(), session);
                     session.activate();
-                    session.endAccess();
+                    sessionCounter++;
                 }
             } catch (ClassNotFoundException e) {
-              log.error(sm.getString("standardManager.loading.cnfe", e), e);
+                log.error(sm.getString("standardManager.loading.cnfe", e), e);
                 if (ois != null) {
                     try {
                         ois.close();
@@ -409,7 +409,7 @@
                 }
                 throw e;
             } catch (IOException e) {
-              log.error(sm.getString("standardManager.loading.ioe", e), e);
+                log.error(sm.getString("standardManager.loading.ioe", e), e);
                 if (ois != null) {
                     try {
                         ois.close();

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <mbeans-descriptors>
 
   <mbean         name="StandardManager"
@@ -144,6 +160,15 @@
                  type="java.lang.String"/>
     </operation>
 
+    <operation   name="getCreationTime"
+          description="Get the creation time"
+               impact="ACTION"
+           returnType="java.lang.String">
+      <parameter name="sessionId"
+          description="Id of the session"
+                 type="java.lang.String"/>
+    </operation>
+
   </mbean>
 
   <mbean         name="PersistentManager"
@@ -296,6 +321,15 @@
                  type="java.lang.String"/>
     </operation>
 
+    <operation   name="getCreationTime"
+          description="Get the creation time"
+               impact="ACTION"
+           returnType="java.lang.String">
+      <parameter name="sessionId"
+          description="Id of the session"
+                 type="java.lang.String"/>
+    </operation>
+
   </mbean>
 
 </mbeans-descriptors>

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/package.html
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/session/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <body>
 
 <p>This package contains the standard <code>Manager</code> and

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ssi/package.html
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ssi/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/ssi/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <body>
 <p>This package contains code that is used by the SsiInvoker.</p>
 <p>This class consists of <code>SsiMediator.java</code> which works as a

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/Authenticators.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/Authenticators.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/Authenticators.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 # These must match the allowed values for auth-method as defined by the spec 
 BASIC=org.apache.catalina.authenticator.BasicAuthenticator
 CLIENT-CERT=org.apache.catalina.authenticator.SSLAuthenticator

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/HostConfig.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/HostConfig.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/HostConfig.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -52,7 +52,7 @@
  *
  * @author Craig R. McClanahan
  * @author Remy Maucherat
- * @version $Revision: 466608 $ $Date: 2006-10-21 17:10:15 -0600 (Sat, 21 Oct 2006) $
+ * @version $Revision: 613792 $ $Date: 2008-01-21 01:27:41 -0700 (Mon, 21 Jan 2008) $
  */
 public class HostConfig
     implements LifecycleListener {
@@ -636,11 +636,16 @@
                     name = path;
                 }
             }
-            File expandedDocBase = new File(name);
-            File warDocBase = new File(name + ".war");
-            if (!expandedDocBase.isAbsolute()) {
-                expandedDocBase = new File(appBase(), name);
-                warDocBase = new File(appBase(), name + ".war");
+            
+            // default to appBase dir + name
+            File expandedDocBase = new File(appBase(), name);
+            if (context.getDocBase() != null) {
+                // first assume docBase is absolute
+                expandedDocBase = new File(context.getDocBase());
+                if (!expandedDocBase.isAbsolute()) {
+                    // if docBase specified and relative, it must be relative to appBase
+                    expandedDocBase = new File(appBase(), context.getDocBase());
+                }
             }
             // Add the eventual unpacked WAR and all the resources which will be
             // watched inside it
@@ -652,6 +657,7 @@
                 addWatchedResources(deployedApp, expandedDocBase.getAbsolutePath(), context);
             } else {
                 // Find an existing matching war and expanded folder
+                File warDocBase = new File(expandedDocBase.getAbsolutePath() + ".war");
                 if (warDocBase.exists()) {
                     deployedApp.redeployResources.put(warDocBase.getAbsolutePath(),
                             new Long(warDocBase.lastModified()));
@@ -966,9 +972,14 @@
                 if (docBase != null) {
                     resource = new File(docBaseFile, watchedResources[i]);
                 } else {
+                    if(log.isDebugEnabled())
+                        log.debug("Ignoring non-existent WatchedResource '" 
+                                + resource.getAbsolutePath() + "'"); 
                     continue;
                 }
             }
+            if(log.isDebugEnabled())
+                log.debug("Watching WatchedResource '" + resource.getAbsolutePath() + "'");
             app.reloadResources.put(resource.getAbsolutePath(), 
                     new Long(resource.lastModified()));
         }

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 contextConfig.applicationClose=Error closing application web.xml
 contextConfig.applicationConfig=Configuration error in application web.xml
 contextConfig.applicationListener=Exception creating listener of class {0}

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 contextConfig.applicationClose=Error durante el cierre del archivo web.xml de la aplicación
 contextConfig.applicationConfig=Error de configuración en el archivo web.xml de la aplicación
 contextConfig.applicationListener=Excepción durante la creación de la clase de escucha (listener) {0}

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 contextConfig.applicationClose=Erreur lors de la fermeture du fichier web.xml de l''application
 contextConfig.applicationConfig=Erreur de configuration dans le fichier web.xml de l''application
 contextConfig.applicationListener=Exception lors de la création de la classe d''écoute (listener) {0}

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 contextConfig.applicationClose=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eweb.xml\u3092\u30af\u30ed\u30fc\u30ba\u4e2d\u306e\u30a8\u30e9\u30fc\u3067\u3059
 contextConfig.applicationConfig=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eweb.xml\u306e\u8a2d\u5b9a\u30a8\u30e9\u30fc\u3067\u3059
 contextConfig.applicationListener=\u30af\u30e9\u30b9 {0} \u306e\u30ea\u30b9\u30ca\u3092\u4f5c\u6210\u4e2d\u306e\u4f8b\u5916\u3067\u3059

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/catalina.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/catalina.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/catalina.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+#
 # List of comma-separated packages that start with or equal this string
 # will cause a security exception to be thrown when
 # passed to checkPackageAccess unless the

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/startup/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <mbeans-descriptors>
 
   <mbean name="ContextConfig"

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 memoryUserDatabase.invalidGroup=Invalid group name {0}
 memoryUserDatabase.renameOld=Cannot rename original file to {0}
 memoryUserDatabase.renameNew=Cannot rename new file to {0}

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 memoryUserDatabase.invalidGroup=Nombre de grupo {0} inválido
 memoryUserDatabase.renameOld=Imposible de renombrar el archivo original a {0}
 memoryUserDatabase.renameNew=Imposible de renombrar el archivo nuevo a {0}

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 memoryUserDatabase.invalidGroup=Nom de groupe invalide {0}
 memoryUserDatabase.renameOld=Impossible de renommer le fichier original en {0}
 memoryUserDatabase.renameNew=Impossible de renommer le nouveau fichier en {0}

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 memoryUserDatabase.invalidGroup=\u7121\u52b9\u306a\u30b0\u30eb\u30fc\u30d7\u540d {0}
 memoryUserDatabase.renameOld=\u5143\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3092 {0} \u306b\u5909\u66f4\u3067\u304d\u307e\u305b\u3093
 memoryUserDatabase.renameNew=\u65b0\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u540d\u3092 {0} \u306b\u5909\u66f4\u3067\u304d\u307e\u305b\u3093

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <mbeans-descriptors>
 
   <mbean         name="JDBCUserDatabase"

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/CharsetMapperDefault.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/CharsetMapperDefault.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/CharsetMapperDefault.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,2 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 en=ISO-8859-1
 fr=ISO-8859-1

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 parameterMap.locked=No modifications are allowed to a locked ParameterMap
 resourceSet.locked=No modifications are allowed to a locked ResourceSet
 hexUtil.bad=Bad hexadecimal digit

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 parameterMap.locked=No se permiten modificaciones en un ParameterMap bloqueado
 resourceSet.locked=No se permiten modificaciones en un ResourceSet bloqueado
 hexUtil.bad=Dígito hexadecimal incorrecto

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 parameterMap.locked=Aucune modification n''est authorisée sur un ParameterMap vérrouillé
 resourceSet.locked=Aucune modification n''est authorisée sur un ResourceSet vérrouillé
 hexUtil.bad=Mauvais digit hexadecimal

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 parameterMap.locked=\u30ed\u30c3\u30af\u3055\u308c\u305fParameterMap\u306f\u5909\u66f4\u304c\u8a31\u3055\u308c\u307e\u305b\u3093
 resourceSet.locked=\u30ed\u30c3\u30af\u3055\u308c\u305fResourceSet\u306f\u5909\u66f4\u304c\u8a31\u3055\u308c\u307e\u305b\u3093
 hexUtil.bad=\u7121\u52b9\u306a16\u9032\u6570\u5024\u3067\u3059

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/ServerInfo.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/ServerInfo.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/util/ServerInfo.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 server.info=Apache Tomcat/@VERSION@
 server.number=@VERSION_NUMBER@
 server.built=@VERSION_BUILT@

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -41,6 +41,7 @@
 import org.apache.catalina.connector.Response;
 import org.apache.catalina.util.LifecycleSupport;
 import org.apache.catalina.util.StringManager;
+import org.apache.coyote.RequestInfo;
 
 
 /**
@@ -75,6 +76,7 @@
  * <li><b>%v</b> - Local server name
  * <li><b>%D</b> - Time taken to process the request, in millis
  * <li><b>%T</b> - Time taken to process the request, in seconds
+ * <li><b>%I</b> - current request thread name (can compare later with stacktraces)
  * </ul>
  * <p>In addition, the caller can specify one of the following aliases for
  * commonly utilized patterns:</p>
@@ -107,7 +109,7 @@
  * @author Craig R. McClanahan
  * @author Jason Brittain
  * @author Peter Rossbach
- * @version $Revision: 567009 $ $Date: 2007-08-17 04:54:37 -0600 (Fri, 17 Aug 2007) $
+ * @version $Revision: 613522 $ $Date: 2008-01-20 02:45:45 -0700 (Sun, 20 Jan 2008) $
  */
 
 public class AccessLogValve
@@ -118,6 +120,8 @@
     // ----------------------------------------------------------- Constructors
 
 
+    private static final String MARK_EMPTY = "-";
+
     /**
      * Construct a new instance of this class with default property values.
      */
@@ -150,7 +154,7 @@
      * The descriptive information about this implementation.
      */
     protected static final String info =
-        "org.apache.catalina.valves.AccessLogValve/1.0";
+        "org.apache.catalina.valves.AccessLogValve/1.1";
 
 
     /**
@@ -603,7 +607,7 @@
 
             long length = response.getContentCountLong() ;
             if (length <= 0)
-                value = "-";
+                value = MARK_EMPTY;
             else
                 value = "" + length;
             result.append(value);
@@ -615,7 +619,7 @@
                 if(referer != null)
                     result.append(referer);
                 else
-                    result.append("-");
+                    result.append(MARK_EMPTY);
                 result.append("\"");
 
                 result.append(space);
@@ -624,7 +628,7 @@
                 if(ua != null)
                     result.append(ua);
                 else
-                    result.append("-");
+                    result.append(MARK_EMPTY);
                 result.append("\"");
             }
 
@@ -808,7 +812,7 @@
         } else if (pattern == 'b') {
             long length = response.getContentCountLong() ;
             if (length <= 0)
-                value = "-";
+                value = MARK_EMPTY;
             else
                 value = "" + length;
         } else if (pattern == 'B') {
@@ -818,7 +822,7 @@
         } else if (pattern == 'H') {
             value = request.getProtocol();
         } else if (pattern == 'l') {
-            value = "-";
+            value = MARK_EMPTY;
         } else if (pattern == 'm') {
             if (request != null)
                 value = request.getMethod();
@@ -849,22 +853,21 @@
                 sb.append(space);
                 sb.append(request.getProtocol());
             } else {
-                sb.append("- - ");
-                sb.append(request.getProtocol());
+                sb.append("- - -");
             }
             value = sb.toString();
         } else if (pattern == 'S') {
             if (request != null)
                 if (request.getSession(false) != null)
                     value = request.getSessionInternal(false).getIdInternal();
-                else value = "-";
+                else value = MARK_EMPTY;
             else
-                value = "-";
+                value = MARK_EMPTY;
         } else if (pattern == 's') {
             if (response != null)
                 value = "" + response.getStatus();
             else
-                value = "-";
+                value = MARK_EMPTY;
         } else if (pattern == 't') {
             StringBuffer temp = new StringBuffer("[");
             temp.append(dayFormatter.format(date));             // Day
@@ -884,14 +887,21 @@
             if (request != null)
                 value = request.getRemoteUser();
             if (value == null)
-                value = "-";
+                value = MARK_EMPTY;
         } else if (pattern == 'U') {
             if (request != null)
                 value = request.getRequestURI();
             else
-                value = "-";
+                value = MARK_EMPTY;
         } else if (pattern == 'v') {
             value = request.getServerName();
+        } else if (pattern == 'I' ) {
+            RequestInfo info = request.getCoyoteRequest().getRequestProcessor();
+            if(info != null) {
+                value= info.getWorkerThreadName();
+            } else {
+                value = MARK_EMPTY;
+            }
         } else {
             value = "???" + pattern + "???";
         }
@@ -974,9 +984,9 @@
                 else
                     return value.toString();
             else
-               return "-";
+               return MARK_EMPTY;
         } catch(Throwable e) {
-            return "-";
+            return MARK_EMPTY;
         }
     }
 
@@ -1017,7 +1027,7 @@
     private String calculateTimeZoneOffset(long offset) {
         StringBuffer tz = new StringBuffer();
         if ((offset<0))  {
-            tz.append("-");
+            tz.append(MARK_EMPTY);
             offset = -offset;
         } else {
             tz.append("+");

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/ExtendedAccessLogValve.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/ExtendedAccessLogValve.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/ExtendedAccessLogValve.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -72,6 +72,7 @@
  * <li><code>time-taken</code>:  Time (in seconds) taken to serve the request</li>
  * <li><code>x-A(XXX)</code>: Pull XXX attribute from the servlet context </li>
  * <li><code>x-C(XXX)</code>: Pull the first cookie of the name XXX </li>
+ * <li><code>x-O(XXX)</code>: Pull the all response header values XXX </li>
  * <li><code>x-R(XXX)</code>: Pull XXX attribute from the servlet request </li>
  * <li><code>x-S(XXX)</code>: Pull XXX attribute from the session </li>
  * <li><code>x-P(...)</code>:  Call request.getParameter(...)
@@ -130,7 +131,8 @@
  *
  *
  * @author Tim Funk
- * @version $Revision: 567009 $ $Date: 2007-08-17 04:54:37 -0600 (Fri, 17 Aug 2007) $
+ * @author Peter Rossbach
+ * @version $Revision: 575482 $ $Date: 2007-09-13 16:05:56 -0600 (Thu, 13 Sep 2007) $
  */
 
 public class ExtendedAccessLogValve
@@ -160,7 +162,7 @@
      * The descriptive information about this implementation.
      */
     protected static final String info =
-        "org.apache.catalina.valves.ExtendedAccessLogValve/1.0";
+        "org.apache.catalina.valves.ExtendedAccessLogValve/1.1";
 
 
     /**
@@ -697,7 +699,29 @@
 
     }
 
+    /**
+     * write a specific response header - x-O{xxx}
+     */
+    protected String responseHeader(Request request,String header) {
+        Response response = request.getResponse() ;
+        if (null != response) {
+            String[] values = response.getHeaderValues(header);
+            if(values.length > 0) {
+                StringBuffer buf = new StringBuffer();
+                for (int i = 0; i < values.length; i++) {
+                    String string = values[i];
+                    buf.append(string) ;
+                    if(i+1<values.length)
+                        buf.append(",");
 
+                }
+                return buf.toString() ;
+            }
+        }
+        return "-" ;
+    }
+    
+    
     /**
      * Get app specific data.
      * @param fieldInfo The field to decode
@@ -711,6 +735,8 @@
                 return wrap(urlEncode(request.getParameter(fieldInfo.value)));
             case FieldInfo.X_REQUEST:
                 return wrap(request.getAttribute(fieldInfo.value));
+            case FieldInfo.X_RESPONSE:
+                return wrap(responseHeader(request,fieldInfo.value));
             case FieldInfo.X_SESSION:
                 HttpSession session = null;
                 if (request!=null){
@@ -1258,6 +1284,7 @@
       * x-A(...) - Value in servletContext
       * x-S(...) - Value in session
       * x-R(...) - Value in servletRequest
+      * x-O(...) - Header value in servletResponse
       * @param fields The pattern to decode
       * @param i The string index where we are decoding.
       * @param fieldInfo Where to store the results
@@ -1281,6 +1308,9 @@
             case 'C':
                 fieldInfo.xType = FieldInfo.X_COOKIE;
                 break;
+            case 'O':
+                fieldInfo.xType = FieldInfo.X_RESPONSE;
+                break;
             case 'R':
                 fieldInfo.xType = FieldInfo.X_REQUEST;
                 break;
@@ -1397,6 +1427,7 @@
     static final short X_APP     = 4; /* For x app specific */
     static final short X_SERVLET_REQUEST = 5; /* For x app specific */
     static final short X_PARAMETER = 6; /* For x app specific */
+    static final short X_RESPONSE = 7; /* For x app specific */
 
     static final short X_LOC_AUTHTYPE                       = 1;
     static final short X_LOC_REMOTEUSER                     = 2;

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/JDBCAccessLogValve.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/JDBCAccessLogValve.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/JDBCAccessLogValve.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -45,7 +45,7 @@
  * To use, copy into the server/classes directory of the Tomcat installation
  * and configure in server.xml as:
  * <pre>
- * 		&lt;Valve className="JDBCAccessLogValve"
+ * 		&lt;Valve className="org.apache.catalina.valves.JDBCAccessLogValve"
  *        	driverName="<i>your_jdbc_driver</i>"
  *        	connectionURL="<i>your_jdbc_url</i>"
  *        	pattern="combined" resolveHosts="false"

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 accessLogValve.alreadyStarted=Access Logger has already been started
 accessLogValve.notStarted=Access Logger has not yet been started
 semaphoreValve.alreadyStarted=Semaphore valve has already been started

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 accessLogValve.alreadyStarted=El Registrador de accesos ya se había iniciado
 accessLogValve.notStarted=El Registrador de accesos no se ha iniciado
 certificatesValve.alreadyStarted=La válvula de certificados ya se había iniciado

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 accessLogValve.alreadyStarted=Le traceur d''accès a déjà été démarré
 accessLogValve.notStarted=Le traceur d''accès n''a pas encore été démarré
 certificatesValve.alreadyStarted=La Valve de Certificats a déjà été démarrée

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 accessLogValve.alreadyStarted=\u30a2\u30af\u30bb\u30b9\u30ed\u30ac\u30fc\u306f\u65e2\u306b\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u3059
 accessLogValve.notStarted=\u30a2\u30af\u30bb\u30b9\u30ed\u30ac\u30fc\u306f\u307e\u3060\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u305b\u3093
 certificatesValve.alreadyStarted=\u8a8d\u8a3c\u30d0\u30eb\u30d6\u306f\u65e2\u306b\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u3059

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,4 +1,20 @@
 <?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <mbeans-descriptors>
 
   <mbean name="AccessLogValve"

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/package.html
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/catalina/valves/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <body>
 
 <p>This package contains a variety of small Valve implementations that do

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 contextBindings.unknownContext=Unknown context name : {0}
 contextBindings.noContextBoundToThread=No naming context bound to this thread
 contextBindings.noContextBoundToCL=No naming context bound to this class loader

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,5 +1,20 @@
-# $Id: LocalStrings_es.properties 301082 2002-07-18 16:47:23Z remm $
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
 
+# $Id: LocalStrings_es.properties 572160 2007-09-02 21:16:25Z markt $
+
 # language es
 
 # package org.apache.naming

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 contextBindings.unknownContext=Nom de Contexte inconnu : {0}
 contextBindings.noContextBoundToThread=Aucun Contexte de nommage lié à ce thread
 contextBindings.noContextBoundToCL=Aucun Contexte de nommage lié à ce chargeur de classes

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 contextBindings.unknownContext=\u672a\u77e5\u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u540d\u3067\u3059: {0}
 contextBindings.noContextBoundToThread=\u540d\u524d\u4ed8\u3051\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306f\u3053\u306e\u30b9\u30ec\u30c3\u30c9\u306b\u30d0\u30a4\u30f3\u30c9\u3055\u308c\u3066\u3044\u307e\u305b\u3093
 contextBindings.noContextBoundToCL=\u540d\u524d\u4ed8\u3051\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306f\u3053\u306e\u30af\u30e9\u30b9\u30ed\u30fc\u30c0\u306b\u30d0\u30a4\u30f3\u30c9\u3055\u308c\u3066\u3044\u307e\u305b\u3093

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/factory/Constants.java
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/factory/Constants.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/factory/Constants.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -43,7 +43,7 @@
         Package + ".EjbFactory";
 
     public static final String DBCP_DATASOURCE_FACTORY = 
-        "org.apache.commons.dbcp.BasicDataSourceFactory";
+        "org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory";
 
     public static final String OPENEJB_EJB_FACTORY = 
         Package + ".OpenEjbFactory";

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/factory/package.html
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/factory/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/factory/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <body>
 
 <p>This package contains object factories used by the naming service.</p>

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/java/package.html
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/java/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/java/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <body>
 
 <p>This package contains the URL context factory for the "java" namespace.</p>

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/package.html
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <body>
 
 <p>This package contains a memory based naming service provider.</p>

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 fileResources.base=Document base {0} does not exist or is not a readable directory
 fileResources.listingNull=Could not get dir listing for {0}
 warResources.notWar=Doc base must point to a WAR file

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings_es.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings_es.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings_es.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 fileResources.base=El Documento base {0} no existe o no es un directorio legible
 warResources.notWar=Doc base debe de apuntar a un archivo WAR
 warResources.invalidWar=Archivo WAR inválido o ilegible: {0}

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings_fr.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings_fr.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings_fr.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 fileResources.base=Le document base {0} n''existe pas ou n''est pas un répertoire lisible
 warResources.notWar=Doc base doit pointé vers un fichier WAR
 warResources.invalidWar=Fichier WAR invalide ou illisible  : {0}

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings_ja.properties
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings_ja.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/LocalStrings_ja.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
 fileResources.base=\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30d9\u30fc\u30b9 {0} \u304c\u5b58\u5728\u3057\u306a\u3044\u3001\u53c8\u306f\u8aad\u3081\u306a\u3044\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u3059
 fileResources.listingNull={0} \u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30ea\u30b9\u30c8\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093
 warResources.notWar=\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30d9\u30fc\u30b9\u306fWAR\u30d5\u30a1\u30a4\u30eb\u3092\u793a\u3055\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093

Modified: trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/package.html
===================================================================
--- trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/share/org/apache/naming/resources/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <body>
 
 <p>This package contains the resources directory context implemetation.

Modified: trunk/tomcat5.5/container/catalina/src/temp/README.txt
===================================================================
--- trunk/tomcat5.5/container/catalina/src/temp/README.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/catalina/src/temp/README.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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 temp directory is used by the JVM for temporary file storage.
 The JVM is configured to use this as its java.io.tmpdir in the
 catalina.sh and catalina.bat scripts.  Tomcat is configured to use

Modified: trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/deploy/FarmWarDeployer.java
===================================================================
--- trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/deploy/FarmWarDeployer.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/deploy/FarmWarDeployer.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -25,6 +25,7 @@
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
+import org.apache.catalina.Container;
 import org.apache.catalina.Context;
 import org.apache.catalina.Engine;
 import org.apache.catalina.Host;
@@ -53,7 +54,7 @@
  * 
  * @author Filip Hanik
  * @author Peter Rossbach
- * @version $Revision: 466608 $
+ * @version $Revision: 613788 $
  */
 public class FarmWarDeployer implements ClusterDeployer, FileChangeListener {
     /*--Static Variables----------------------------------------*/
@@ -137,23 +138,36 @@
     public void start() throws Exception {
         if (started)
             return;
-        getCluster().addClusterListener(this);
-        if (watchEnabled) {
-            watcher = new WarWatcher(this, new File(getWatchDir()));
-            if (log.isInfoEnabled())
-                log.info("Cluster deployment is watching " + getWatchDir()
-                        + " for changes.");
+        Container hcontainer = getCluster().getContainer();
+        if(!(hcontainer instanceof Host)) {
+            log.error("FarmWarDeployer can only work as host cluster subelement!");
+            return ;
         }
-
         // Check to correct engine and host setup
-        host = (Host) getCluster().getContainer();
-        Engine engine = (Engine) host.getParent();
+        host = (Host) hcontainer;
+        Container econtainer = host.getParent();
+        if(econtainer == null && econtainer instanceof Engine) {
+            log.error("FarmWarDeployer can only work if parent of " + host.getName()+ " is an engine!"); 
+            return ;
+        }
+        Engine engine = (Engine) econtainer;
         try {
             oname = new ObjectName(engine.getName() + ":type=Deployer,host="
                     + host.getName());
         } catch (Exception e) {
             log.error("Can't construct MBean object name" + e);
+            return ;
         }
+        
+        if (watchEnabled) {
+            watcher = new WarWatcher(this, new File(getWatchDir()));
+            if (log.isInfoEnabled())
+                log.info("Cluster deployment is watching " + getWatchDir()
+                        + " for changes.");
+        }
+        
+        getCluster().addClusterListener(this);
+        
         configBase = new File(System.getProperty("catalina.base"), "conf");
         if (engine != null) {
             configBase = new File(configBase, engine.getName());

Modified: trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java
===================================================================
--- trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -36,7 +36,7 @@
  * just use a timeout on the receive
  * @author Filip Hanik
  * @author Peter Rossbach
- * @version $Revision: 567470 $, $Date: 2007-08-19 15:04:15 -0600 (Sun, 19 Aug 2007) $
+ * @version $Revision: 571971 $, $Date: 2007-09-02 07:02:53 -0600 (Sun, 02 Sep 2007) $
  */
 public class McastServiceImpl
 {
@@ -255,14 +255,14 @@
     protected Object expiredMutex = new Object();
 
     /**
-     * check member exipre or alive
+     * check member expire or alive
      */
     protected void checkExpire() {
         synchronized (expiredMutex) {
             McastMember[] expired = membership.expire(timeToExpiration);
             for ( int i=0; i<expired.length; i++) {
                 if(log.isDebugEnabled())
-                    log.debug("Mcast exipre member " + expired[i]);
+                    log.debug("Mcast expire member " + expired[i]);
                 service.memberDisappeared(expired[i]);
             }
         }
@@ -396,7 +396,7 @@
        
         public RecoveryThread(McastServiceImpl parent) {
             this.parent = parent;
-            if (!init(this)) parent = null;
+            if (!init(this)) this.parent = null;
         }
         
         public static synchronized boolean init(RecoveryThread t) {

Modified: trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java
===================================================================
--- trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -68,7 +68,7 @@
  * @author Craig R. McClanahan
  * @author Jean-Francois Arcand
  * @author Peter Rossbach
- * @version $Revision: 565650 $ $Date: 2007-08-14 02:04:19 -0600 (Tue, 14 Aug 2007) $
+ * @version $Revision: 571202 $ $Date: 2007-08-30 09:14:48 -0600 (Thu, 30 Aug 2007) $
  */
 
 public class DeltaManager extends ManagerBase implements Lifecycle,
@@ -1655,6 +1655,7 @@
                     "deltaManager.receiveMessage.createNewSession",
                     getName(), msg.getSessionID()));
         DeltaSession session = (DeltaSession) createEmptySession();
+        sessionCounter++;
         session.setManager(this);
         session.setValid(true);
         session.setPrimarySession(false);

Modified: trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -19,41 +19,85 @@
    "-//Apache Software Foundation//DTD Model MBeans Configuration File"
    "http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd">
 <mbeans-descriptors>
+    
     <mbean name="JvmRouteBinderValve" description="mod_jk jvmRoute jsessionid cookie backup correction" domain="Catalina"
         group="Valve" type="org.apache.catalina.cluster.session.JvmRouteBinderValve">
+      
         <attribute name="className"
                description="Fully qualified class name of the managed object"
                type="java.lang.String"
                writeable="false"/>        
+      
         <attribute name="info" 
 		           description="describe version" type="java.lang.String" writeable="false"/>
+      
         <attribute name="enabled" 
 		           description="enable a jvm Route check" type="boolean"/>
+      
         <attribute name="numberOfSessions"
 		           description="number of jvmRoute session corrections" type="long" writeable="false"/>
+      
         <attribute name="sessionIdAttribute" 
-		    description="Name of attribute with sessionid value before turnover a session" 
+		    description="Name of request attribute with sessionid value before turnover a session" 
 		    type="java.lang.String" 
 		    />
+      
         <operation name="start" description="Stops the Cluster JvmRouteBinderValve" 
 		           impact="ACTION" returnType="void"/>
+      
         <operation name="stop" description="Stops the Cluster JvmRouteBinderValve" 
 		           impact="ACTION" returnType="void"/>
     </mbean>
+    
+    <mbean name="JvmRouteMigrationValve" description="migrate session to other cluster nodes" domain="Catalina"
+        group="Valve" type="org.apache.catalina.cluster.session.JvmRouteMigrationValve">
+        <attribute name="className"
+               description="Fully qualified class name of the managed object"
+               type="java.lang.String"
+               writeable="false"/>        
+      
+        <attribute name="info" 
+		           description="describe version" type="java.lang.String" writeable="false"/>
+      
+        <attribute name="enabled" 
+		           description="enable migration" type="boolean"/>
+      
+        <attribute name="jvmRoutes" 
+		    description="comma-delimited set of the jvmRoutes for migration nodes" 
+		    type="java.lang.String" 
+		    />
+      
+        <attribute name="numberOfSessions"
+		           description="number of migrated sessions" type="long" writeable="false"/>
+      
+        <attribute name="sessionIdAttribute" 
+		    description="Name of request attribute with sessionid value before migrate a session" 
+		    type="java.lang.String" 
+		    />
+      
+        <operation name="start" description="Stops the Cluster JvmRouteMigrationValve" 
+		           impact="ACTION" returnType="void"/>
+      
+        <operation name="stop" description="Stops the Cluster JvmRouteMigrationValve" 
+		           impact="ACTION" returnType="void"/>
+    </mbean>
+    
 	<mbean name="JvmRouteSessionIDBinderListener"
 		description="Monitors the jvmRoute activity"
 		domain="Catalina"
         group="Listener"
 		type="org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener">
+      
         <attribute name="info" 
 		           description="describe version" type="java.lang.String" writeable="false"/>
+      
         <attribute name="numberOfSessions" 
 		    description="number of jvmRoute session corrections" 
 		    type="long" 
 		    writeable="false"/>
     </mbean>
     
-   <mbean        name="DeltaManager"
+    <mbean        name="DeltaManager"
           description="Cluster Manager implementation of the Manager interface"
                domain="Catalina"
                 group="Manager"
@@ -325,6 +369,15 @@
                  type="java.lang.String"/>
     </operation>
     
+    <operation   name="getCreationTime"
+          description="Get the creation time"
+               impact="ACTION"
+           returnType="java.lang.String">
+      <parameter name="sessionId"
+          description="Id of the session"
+                 type="java.lang.String"/>
+    </operation>
+    
 	<operation name="expireAllLocalSessions"
                description="Exipre all active local sessions and replicate the invalid sessions"
                impact="ACTION"

Modified: trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java
===================================================================
--- trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -24,6 +24,7 @@
 import java.net.Socket;
 import java.net.SocketAddress;
 import java.net.SocketException;
+import java.util.Date;
 
 import org.apache.catalina.cluster.ClusterMessage;
 import org.apache.catalina.cluster.io.XByteBuffer;
@@ -35,7 +36,7 @@
  * 
  * @author Peter Rossbach
  * @author Filip Hanik
- * @version $Revision: 567298 $ $Date: 2007-08-18 11:14:07 -0600 (Sat, 18 Aug 2007) $
+ * @version $Revision: 571204 $ $Date: 2007-08-30 09:25:46 -0600 (Thu, 30 Aug 2007) $
  * @since 5.5.7
  */
 public class DataSender implements IDataSender {
@@ -104,6 +105,11 @@
     private int soTrafficClass = 0x04 | 0x08 | 0x010;
      
     /**
+     * createTime
+     */
+    protected long createTime ;
+
+    /**
      * number of requests
      */
     protected long nrOfRequests = 0;
@@ -229,8 +235,9 @@
         this.address = host;
         this.port = port;
         this.domain = domain;
+        this.createTime = System.currentTimeMillis() ;
         if (log.isDebugEnabled())
-            log.debug(sm.getString("IDataSender.create",address, new Integer(port)));
+            log.debug(sm.getString("IDataSender.create",address, new Integer(port), new Date(createTime)));
     }
 
     public DataSender(String domain,InetAddress host, int port, SenderState state) {
@@ -251,6 +258,13 @@
     }
 
     /**
+     * @return the createTime
+     */
+    public long getCreateTime() {
+        return createTime;
+    }
+
+    /**
      * @return Returns the nrOfRequests.
      */
     public long getNrOfRequests() {

Modified: trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -30,7 +30,7 @@
 IDataSender.ack.wrong=Missing correct ACK after 10 bytes read at local port [{0}:{1,number,integer}]
 IDataSender.closeSocket=Sender close socket to [{0}:{1,number,integer}] (close count {2,number,integer})
 IDataSender.connect=Sender connect to [{0}:{1,number,integer}] (connect count {2,number,integer})
-IDataSender.create=Create sender [{0}:{1,number,integer}]
+IDataSender.create=Create sender [{0}:{1,number,integer}] at [{2,date}]
 IDataSender.disconnect=Sender disconnect from [{0}:{1,number,integer}] (disconnect count {2,number,integer})
 IDataSender.message.disconnect=Message transfered: Sender can't disconnect from [{0}:{1,number,integer}]
 IDataSender.message.create=Message transfered: Sender can't create current socket [{0}:{1,number,integer}]

Modified: trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationValve.java
===================================================================
--- trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationValve.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationValve.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -57,7 +57,7 @@
  * @author Craig R. McClanahan
  * @author Filip Hanik
  * @author Peter Rossbach
- * @version $Revision: 466608 $ $Date: 2006-10-21 17:10:15 -0600 (Sat, 21 Oct 2006) $
+ * @version $Revision: 613523 $ $Date: 2008-01-20 02:47:26 -0700 (Sun, 20 Jan 2008) $
  */
 
 public class ReplicationValve
@@ -469,7 +469,7 @@
      */
     protected void resetReplicationRequest(Request request, boolean isCrossContext) {
         Session contextSession = request.getSessionInternal(false);
-        if(contextSession != null & contextSession instanceof DeltaSession){
+        if(contextSession != null && contextSession instanceof DeltaSession){
             resetDeltaRequest(contextSession);
             ((DeltaSession)contextSession).setPrimarySession(true);
         }

Modified: trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/mbeans-descriptors.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/modules/cluster/src/share/org/apache/catalina/cluster/tcp/mbeans-descriptors.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -625,6 +625,10 @@
           description="counts all successfully sended messages"
                  type="long"
                  writeable="false"/>
+    <attribute   name="createTime"
+          description="create time of sender"
+                 type="long"
+                 writeable="false"/>
 	<operation name="connect"
                description="connect to other replication node"
                impact="ACTION"
@@ -877,6 +881,10 @@
           description="queue remove wait time (queue thread waits) (msec)"
                  type="long"
                  writeable="false"/>
+    <attribute   name="createTime"
+          description="create time of sender"
+                 type="long"
+                 writeable="false"/>
  	<operation name="connect"
                description="connect to other replication node"
                impact="ACTION"
@@ -1003,6 +1011,10 @@
           description="counts disconnects"
                  type="long"
                  writeable="false"/>
+    <attribute   name="createTime"
+          description="create time of sender"
+                 type="long"
+                 writeable="false"/>
 	<operation name="connect"
                description="start Queue to connect to ohter replication node"
                impact="ACTION"
@@ -1192,6 +1204,10 @@
           description="counts data send failures"
                  type="long"
                  writeable="false"/>
+    <attribute   name="createTime"
+          description="create time of sender"
+                 type="long"
+                 writeable="false"/>
 	<operation name="connect"
                description="connect to other replication node"
                impact="ACTION"

Modified: trunk/tomcat5.5/container/webapps/admin/build.xml
===================================================================
--- trunk/tomcat5.5/container/webapps/admin/build.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/webapps/admin/build.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -177,6 +177,11 @@
   <target name="copy-struts.jar" if="struts.present">
     <copy todir="${webapps.build}/${webapp.name}/WEB-INF/lib" file="${struts-core.jar}"/>
     <copy todir="${webapps.build}/${webapp.name}/WEB-INF/lib" file="${struts-taglib.jar}" />
+  	<copy todir="${webapps.build}/${webapp.name}/WEB-INF">
+  	  <fileset dir="${struts.lib}">
+  	    <include name="*.tld" />
+      </fileset>
+  	</copy>
   </target>
 
 
@@ -192,6 +197,10 @@
 
   <!-- ================ BUILD: Copy Static Files ========================== -->
   <target name="build-static" depends="flags,flags.display,build-prepare,copy-struts.jar">
+    <copy todir="${webapps.build}/${webapp.name}/WEB-INF/lib" file="${commons-beanutils.jar}"/>
+    <copy tofile="${webapps.build}/${webapp.name}/WEB-INF/lib/commons-collections.jar" 
+    	file="${commons-collections.jar}"/>
+    <copy todir="${webapps.build}/${webapp.name}/WEB-INF/lib" file="${commons-digester.jar}"/>
     <copy todir="${webapps.build}/${webapp.name}">
       <fileset dir=".">
         <exclude name="build.*"/>

Modified: trunk/tomcat5.5/container/webapps/balancer/WEB-INF/classes/org/apache/webapp/balancer/rules/package.html
===================================================================
--- trunk/tomcat5.5/container/webapps/balancer/WEB-INF/classes/org/apache/webapp/balancer/rules/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/webapps/balancer/WEB-INF/classes/org/apache/webapp/balancer/rules/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,19 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <html>
 <head>
 <title>org.apache.webapp.balancer.rules Package Overview</title>

Modified: trunk/tomcat5.5/container/webapps/docs/appdev/build.xml.txt
===================================================================
--- trunk/tomcat5.5/container/webapps/docs/appdev/build.xml.txt	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/webapps/docs/appdev/build.xml.txt	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,4 @@
+<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
@@ -12,6 +13,7 @@
   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.
+-->
 
 <!--
      General purpose build script for web applications and web services,
@@ -33,7 +35,7 @@
                              image files), including the WEB-INF subdirectory
                              and its configuration file contents.
 
-     $Id: build.xml.txt 565211 2007-08-13 00:09:38Z markt $
+     $Id: build.xml.txt 572161 2007-09-02 21:18:19Z markt $
 -->
 
 

Modified: trunk/tomcat5.5/container/webapps/docs/changelog.xml
===================================================================
--- trunk/tomcat5.5/container/webapps/docs/changelog.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/webapps/docs/changelog.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -26,10 +26,227 @@
     <author email="remm at apache.org">Remy Maucherat</author>
     <author email="yoavs at apache.org">Yoav Shapira</author>
     <author email="fhanik at apache.org">Filip Hanik</author>
+    <author email="pero at apache.org">Peter Rossbach</author>
     <title>Changelog</title>
   </properties>
 
 <body>
+<section name="Tomcat 5.5.26 (fhanik)">
+  <subsection name="General">
+    <changelog>
+      <update>
+        Use Eclipse JDT 3.3.1. (pero)
+      </update>
+      <update>
+        Use new commons download location. (markt)
+      </update>
+      <update>
+        Use commons-launcher 1.1. (markt)
+      </update>
+      <update>
+        Use commons-digester 1.8. (markt)
+      </update>
+      <update>
+        Use Xerces 2.9.1. (markt)
+      </update>
+      <update>
+        Remove usused commons-httpclient. (funkman)
+      </update>
+      <update>
+        Use commons-collections 3.2. (markt)
+      </update>
+      <update>
+        Use commons-fileupload 1.2. (markt)
+      </update>
+      <update>
+        Use MX4J 3.0.2. (markt)
+      </update>
+      <update>
+        Use JUnit 3.8.2. (markt)
+      </update>
+      <update>
+        Use NSIS 2.34. (markt)
+      </update>
+      <update>
+        Use Struts 1.2.9. (markt)
+      </update>
+      <update>
+        Use JAF 1.1.1. (markt)
+      </update>
+      <update>
+        Use JTA 1.1. (markt)
+      </update>
+      <update>
+        Use JavaMail 1.4.1. (markt)
+      </update>
+      <update>
+        Use PureTLS 0.9b5. (markt)
+      </update>
+      <update>
+        Use commons-pool 1.4. (markt)
+      </update>
+      <fix>
+        <bug>43594</bug>: Use setenv from CATALINA_BASE (if set) in preference
+        to the one in CATALINA_HOME. Patch provided by Shaddy Baddah. (markt)
+      </fix>
+      <fix>
+        Fix CVE-2007-5342 by limiting permissions granted to JULI. (markt)
+      </fix>
+    </changelog>
+  </subsection>  
+  <subsection name="Catalina">
+    <changelog>
+      <fix><bug>38131</bug>: WatchedResource doesn't work if app is outside host appbase webapps. 
+        Patch provided by Peter Lynch (pero)
+      </fix>
+      <fix>
+        Set correct sessionCounter at StandardManager after reload sessions. (pero)
+      </fix>
+      <fix>
+      	Fix NPE situation at AccessLogValve (pero)
+      </fix>
+      <fix>
+        <bug>30949</bug>: Improve previous fix. Ensure requests are recycled
+        on cross-context includes and forwards when an exception occurs in the
+        target page. (markt)
+      </fix>
+      <fix>
+        <bug>43216</bug>: Set correct StandardSession#accessCount as system property STRICT_SERVLET_COMPLIANCE is true after application restart with SESSION.ser file.
+        Patch provided by Takayuki Kaneko (pero)
+      </fix>
+      <add>
+        Made session createTime accessible for all SessionManager via JMX (pero)
+      </add>
+      <add>
+        Support logging of all response header values at ExtendedAccessLogValve (ex. add x-O(Set-Cookie) to your pattern). (pero)
+      </add>
+      <add>
+        Support logging of current thread name at AccessLogValve (ex. add %I to your pattern).
+        Usefull to compare access logging entry later with a stacktraces. (pero)
+      </add>  
+      <fix>
+        o.a.juli.ClassLoaderLogManager handle more then one system property replacement at file logging.properties. (pero)
+      </fix>
+      <fix>
+        <bug>43236</bug>: Reset usingWriter and associated flags when response
+        is reset. (markt)
+      </fix>
+      <fix>
+        <bug>43241</bug>: ServletContext.getResourceAsStream() not spec
+        compliant. Patch provided by John Kew. (markt)
+      </fix>
+      <fix>
+        <bug>43675</bug>: Fix a possible logging related class loader leak.
+        (markt)
+      </fix>
+      <fix>
+        <bug>43687</bug>: Remove conditional headers on Form Auth replay, since the UA (esp. FireFox) isn't expecting it. (billbarker)
+      </fix>
+      <fix>
+        Fix bug in CGI Servlet that caused it to fail when a CGI resource was
+        included in another resource. (markt)
+      </fix>
+      <fix>
+        Cookie handling/parsing changes!
+        The following behavior has been changed with regards to Tomcat's cookie
+        handling:<br/>
+        a) Cookies containing control characters, except 0x09(HT), are rejected
+        using an InvalidArgumentException.<br/>
+        b) If cookies are not quoted, they will be quoted if they contain
+        <code>tspecials(ver0)</code> or <code>tspecials2(ver1)</code>
+        characters.<br/>
+        c) Escape character '\\' is allowed and respected as a escape character,
+        and will be unescaped during parsing.
+      </fix>
+      <fix>
+        <bug>43839</bug>: URL based session tracking fails when session cookie
+        from parent context is present. Based on a patch by Yuan Qingyun.
+        (markt)
+      </fix>
+      <fix>
+        <bug>43887</bug>: Include exception in the log message. (markt)
+      </fix>
+      <fix>
+        <bug>43914</bug>: Location headers must be encoded. Patch provided by
+        Ivan Todoroski. (markt)
+      </fix>
+      <fix>
+        <bug>43957</bug>: Service.bat didn't configure logging correctly.
+        Patch provided by Richard Fearn. (markt)
+      </fix>
+      <fix>
+        <bug>44041</bug>: Fix duplicate class definition error under load.
+        (markt)
+      </fix>
+      <fix>
+        <bug>44084</bug>: JASSRealm is broken for application provided
+        Principals. Patch provided by Noah Levitt. (markt)
+      </fix>
+    </changelog>
+  </subsection>
+  <subsection name="Jasper" >
+    <changelog>
+      <fix>
+        <bug>43702</bug>: Reduce length of unnecessarily long class names for
+        the inner helper class when using simple tags. (markt)
+      </fix>
+      <fix>
+        <bug>43757</bug>: Rather than use string matching to work out the line
+        in the JSP with the error, use the SMAP info and the knowledge that for
+        a scriptlet there is a one to one line mapping. (markt)
+      </fix>
+    </changelog>
+  </subsection>
+  <subsection name="Cluster">
+    <changelog>
+      <fix>
+        Fix FarmWarDeployer can be only configured at host subelement (pero)
+      </fix>
+      <fix>
+      	Fix wrong &amp;&amp; at ReplicationValve (pero)
+      </fix>
+      <fix>
+        DeltaManager sessionCounter must be also increment at relicated sessions. (pero)
+      </fix>
+      <add>
+        Made attribute createTime accessible for all DataSenders. (pero)
+      </add>  
+    </changelog>
+  </subsection>
+  <subsection name="Webapps" >
+    <changelog>
+      <fix>
+        Fix CVE-2007-5461, an important information disclosure vulnerability in
+        the WebDAV Servlet. (markt)
+      </fix>
+      <fix>
+        <bug>43611</bug>: Provide an error message when trying to upload a WAR
+        for a context that has been defined in server.xml. (markt)
+      </fix>
+      <fix>
+        <bug>44094</bug>: Add note to docs about side-effects of setting
+        privileged on a context. (markt)
+      </fix>
+    </changelog>
+  </subsection>
+  <subsection name="Coyote" >
+    <changelog>
+      <fix>
+        <bug>43479</bug>: Fix memory leak cleaning up sendfile connections.
+        (markt)
+      </fix>
+      <fix>
+        <bug>43622</bug>: Don't always overwrite min compression size with
+        default. (markt)
+      </fix>
+      <fix>
+        <bug>43995</bug>: No timeout for sendfile (TODO item had been
+        forgotten). (markt)
+      </fix>
+    </changelog>
+  </subsection>
+</section>
+     
 <section name="Tomcat 5.5.25 (fhanik)">
   <subsection name="General">
     <changelog>

Modified: trunk/tomcat5.5/container/webapps/docs/config/context.xml
===================================================================
--- trunk/tomcat5.5/container/webapps/docs/config/context.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/webapps/docs/config/context.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -169,8 +169,11 @@
         <p>Do not choose a docBase that starts with your Host's appBase string.
         The default appBase is "webapps" so do not choose a docBase like
         "webapps-foo."  Doing so will lead to deployment errors: see 
-        <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=39013" title="Bugzilla 39013">Bugzilla</a>
-        for details.</p>
+        <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=39013"
+        title="Bugzilla 39013">Bugzilla</a> for details.</p>
+        <p>The value of this field must not be set when the Context is
+        configured using a <code>META-INF/context.xml</code> file as it will be
+        inferred by the automatic deployment process.</p>
       </attribute>
 
       <attribute name="override" required="false">
@@ -183,7 +186,10 @@
 
       <attribute name="privileged" required="false">
         <p>Set to <code>true</code> to allow this context to use container
-        servlets, like the manager servlet.</p>
+        servlets, like the manager servlet. Use of the <code>privileged</code>
+        attribute will change the context's parent class loader to be the
+        <em>Catalina</em> class loader rather than the <em>Shared</em> class
+        loader.</p>
       </attribute>
 
       <attribute name="path" required="false">
@@ -193,10 +199,10 @@
         within a particular <a href="host.html">Host</a> must be unique.
         If you specify a context path of an empty string (""), you are
         defining the <em>default</em> web application for this Host, which
-        will process all requests not assigned to other Contexts. The value of
-        this field must not be set except when statically defining a Context in
-        server.xml, as it will be inferred from the filenames used for either the 
-        .xml context file or the docBase.</p>
+        will process all requests not assigned to other Contexts.</p>
+        <p>The value of this field must not be set except when statically
+        defining a Context in server.xml, as it will be inferred from the
+        filenames used for either the .xml context file or the docBase.</p>
       </attribute>
 
       <attribute name="reloadable" required="false">

Modified: trunk/tomcat5.5/container/webapps/docs/config/valve.xml
===================================================================
--- trunk/tomcat5.5/container/webapps/docs/config/valve.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/webapps/docs/config/valve.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -176,6 +176,7 @@
     <li><b>%v</b> - Local server name</li>
     <li><b>%D</b> - Time taken to process the request, in millis</li>
     <li><b>%T</b> - Time taken to process the request, in seconds</li>
+    <li><b>%I</b> - current request thread name (can compare later with stacktraces)</li>
     </ul>
 
     <p>

Modified: trunk/tomcat5.5/container/webapps/docs/logging.xml
===================================================================
--- trunk/tomcat5.5/container/webapps/docs/logging.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/webapps/docs/logging.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -33,7 +33,7 @@
   <section name="Introduction">
   <p>
     Tomcat 5.5 uses 
-    <a href="http://jakarta.apache.org/commons/logging">Commons Logging</a>
+    <a href="http://commons.apache.org/logging">Commons Logging</a>
     throughout its internal code allowing the 
     developer to choose a logging configuration that suits their needs, e.g
     java.util.logging or 
@@ -92,7 +92,7 @@
 	<li><a href="http://logging.apache.org/log4j">Download Log4J</a> 
             (v1.2 or later) and place the log4j jar in $CATALINA_HOME/common/lib.</li>
 
-        <li><a href="http://jakarta.apache.org/site/downloads/downloads_commons-logging.cgi">
+        <li><a href="http://commons.apache.org/downloads/download_logging.cgi">
             Download Commons Logging</a> and place the commons-logging.jar 
             (not commons-logging-api.jar) in $CATALINA_HOME/common/lib with 
             the log4j jar.</li>

Modified: trunk/tomcat5.5/container/webapps/docs/virtual-hosting-howto.xml
===================================================================
--- trunk/tomcat5.5/container/webapps/docs/virtual-hosting-howto.xml	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/webapps/docs/virtual-hosting-howto.xml	2008-04-06 12:38:06 UTC (rev 6107)
@@ -48,14 +48,18 @@
     </p>
     <source>
 &lt;Engine name="Catalina" defaultHost="ren"&gt;
-    &lt;Host name="ren"    appBase="webapps/ren"/&gt;
-    &lt;Host name="stimpy" appBase="webapps/stimpy"/&gt;
+    &lt;Host name="ren"    appBase="renapps"/&gt;
+    &lt;Host name="stimpy" appBase="stimpyapps"/&gt;
 &lt;/Engine&gt;
     </source>
     <p>
+      Note that the directory structures under the appBase for each host should
+      not overlap each other.
+    </p>
+    <p>
       Consult the configuration documentation for other attributes of the
       <a href="config/engine.html">Engine</a> and <a href="config/host.html">
-      Host</a>elements.
+      Host</a> elements.
     </p>
   </section>
 
@@ -64,23 +68,36 @@
       Create directories for each of the virtual hosts:
     </p>
     <source>
-mkdir $CATALINA_HOME/webapps/ren
-mkdir $CATALINA_HOME/webapps/stimpy
+mkdir $CATALINA_HOME/renapps
+mkdir $CATALINA_HOME/stimpyapps
     </source>
   </section>
 
   <section name="Configuring Your Contexts">
-    <subsection name="Approach #1">
+    <subsection name="General">
+      <p>Contexts are normally located underneath the appBase directory. For
+       example, to deploy the <code>foobar</code> context as a war file in
+       the <code>ren</code> host, use
+       <code>$CATALINA_HOME/renapps/foobar.war</code>. Note that the
+       default or ROOT context for <code>ren</code> would be deployed as
+       <code>$CATALINA_HOME/renapps/ROOT.war</code> (WAR) or
+       <code>$CATALINA_HOME/renapps/ROOR</code> (directory).
+      </p>
+      <p><strong>NOTE: The <code>docBase</code> for a context should never be
+        the same as the <code>appBase</code> for a host.</strong>
+      </p>
+    </subsection>
+    <subsection name="context.xml - approach #1">
       <p>
         Within your Context, create a <code>META-INF</code> directory and then
         place your Context definition in it in a file named
         <code>context.xml</code>. i.e.
-        <code>$CATALINA_HOME/webapps/ren/ROOT/META-INF/context.xml</code>
+        <code>$CATALINA_HOME/renapps/ROOT/META-INF/context.xml</code>
         This makes deployment easier, particularly if you're distributing a WAR
         file.
       </p>
     </subsection>
-    <subsection name="Approach #2">
+    <subsection name="context.xml - approach #2">
       <p>
         Create a structure under <code>$CATALINA_HOME/conf/Catalina</code>
         corresponding to your virtual hosts, e.g.:
@@ -118,6 +135,5 @@
       </p>
     </subsection>
   </section>
-
 </body>
 </document>

Modified: trunk/tomcat5.5/container/webapps/jmxremote/README
===================================================================
--- trunk/tomcat5.5/container/webapps/jmxremote/README	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/webapps/jmxremote/README	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,3 +1,18 @@
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
 Simple webapp that loads the Jmx remote connector. 
 
 You need to add mx4j-remote.jar to your common loader or use JDK1.5. Any other JMX implementation

Modified: trunk/tomcat5.5/container/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java
===================================================================
--- trunk/tomcat5.5/container/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -57,7 +57,7 @@
 * @author Bip Thelin
 * @author Malcolm Edgar
 * @author Glenn L. Nielsen
-* @version $Revision: 547082 $, $Date: 2007-06-14 04:12:04 +0200 (Thu, 14 Jun 2007) $
+* @version $Revision: 609430 $, $Date: 2008-01-06 15:08:30 -0700 (Sun, 06 Jan 2008) $
 * @see ManagerServlet
 */
 
@@ -204,7 +204,11 @@
                 } else {
                     path = "/" + basename;
                 }
-
+                if ((host.findChild(path) != null) && !isDeployed(path)) {
+                    message = sm.getString
+                        ("htmlManagerServlet.deployUploadInServerXml", war);
+                    break;
+                }
                 if (!isServiced(path)) {
                     addServiced(path);
                     try {

Modified: trunk/tomcat5.5/container/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/LocalStrings.properties
===================================================================
--- trunk/tomcat5.5/container/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/LocalStrings.properties	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/container/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/LocalStrings.properties	2008-04-06 12:38:06 UTC (rev 6107)
@@ -36,6 +36,7 @@
 htmlManagerServlet.deployUploadFail=FAIL - Deploy Upload Failed, Exception: {0}
 htmlManagerServlet.deployUploadFile=Select WAR file to upload
 htmlManagerServlet.deployUploadNotWar=FAIL - File uploaded \"{0}\" must be a .war
+htmlManagerServlet.deployUploadInServerXml=FAIL - War file \"{0}\" cannot be uploaded if context is defined in server.xml 
 htmlManagerServlet.deployUploadNoFile=FAIL - File upload failed, no file
 htmlManagerServlet.deployUploadWarExists=FAIL - War file \"{0}\" already exists on server
 htmlManagerServlet.deployWar=WAR or Directory URL:

Modified: trunk/tomcat5.5/debian/changelog
===================================================================
--- trunk/tomcat5.5/debian/changelog	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/debian/changelog	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,6 +1,9 @@
-tomcat5.5 (5.5.25-6) UNRELEASED; urgency=low
+tomcat5.5 (5.5.26-1) UNRELEASED; urgency=low
 
   [ Michael Koch ]
+  * New upstream release.
+    - CVE-2007-5333: unauthorized disclosure of information. Closes: #465645
+    - CVS-2007-6286: handling of empty requests.
   * debian/rules: Don't file when files to delete don't exist.
     Closes: #458977
   * debian/tomcat5.5.init: Change directory to $CATALINA_BASE/temp before

Modified: trunk/tomcat5.5/jasper/.classpath
===================================================================
--- trunk/tomcat5.5/jasper/.classpath	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/jasper/.classpath	2008-04-06 12:38:06 UTC (rev 6107)
@@ -18,11 +18,11 @@
 <classpath>
 	<classpathentry kind="src" path="src/share"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-logging-1.0.4/commons-logging-api.jar"/>
 	<classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-el-1.0/commons-el.jar"/>
-	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/eclipse/plugins/org.eclipse.jdt.core_3.1.1.jar"/>
 	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/jsp-api-2.0/lib/jsp-api.jar"/>
 	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/servlet-api-2.4/lib/servlet-api.jar"/>
+	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/eclipse/plugins/org.eclipse.jdt.core_3.3.1.v_780_R33x.jar"/>
+	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-el-1.0/commons-el.jar"/>
+	<classpathentry kind="var" path="TOMCAT_LIBS_BASE/commons-logging-1.1.1/commons-logging-1.1.1.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

Modified: trunk/tomcat5.5/jasper/.project
===================================================================
--- trunk/tomcat5.5/jasper/.project	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/jasper/.project	2008-04-06 12:38:06 UTC (rev 6107)
@@ -15,7 +15,6 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
 	<name>jasper</name>
 	<comment></comment>

Modified: trunk/tomcat5.5/jasper/src/share/org/apache/jasper/compiler/DefaultErrorHandler.java
===================================================================
--- trunk/tomcat5.5/jasper/src/share/org/apache/jasper/compiler/DefaultErrorHandler.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/jasper/src/share/org/apache/jasper/compiler/DefaultErrorHandler.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -69,8 +69,6 @@
         for (int i=0; i < details.length; i++) {
             buf.append("\n");
             if (details[i].getJspBeginLineNumber() >= 0) {
-                buf.append("JSP FileName:").append(details[i].getJspFileName()).append("\n");
-                buf.append("Java FileName:").append(details[i].getJavaFileName()).append("\n");
                 args = new Object[] {
                         new Integer(details[i].getJspBeginLineNumber()), 
                         details[i].getJspFileName() };
@@ -82,8 +80,6 @@
                 buf.append("\n"); 
                 buf.append(details[i].getJspExtract());
             } else {
-                buf.append("JSP FileName:").append(details[i].getJspFileName()).append("\n");
-                buf.append("Java FileName:").append(details[i].getJavaFileName()).append("\n");
                 args = new Object[] {
                         new Integer(details[i].getJavaLineNumber()) };
                 buf.append("\n\n");
@@ -93,7 +89,6 @@
                 buf.append(details[i].getErrorMessage());
             }
         }
-        System.out.println("[COVALENT-DEBUG] JSP Compile Error: "+buf);
         buf.append("\n\nStacktrace:");
         throw new JasperException(Localizer.getMessage("jsp.error.unable.compile") + ": " + buf);
     }
@@ -106,8 +101,7 @@
      */
     public void javacError(String errorReport, Exception exception)
     throws JasperException {
-        System.out.println("[COVALENT-DEBUG] JSP Compile Error: "+errorReport);
-        exception.printStackTrace();
+        
         throw new JasperException(
                 Localizer.getMessage("jsp.error.unable.compile"), exception);
     }

Modified: trunk/tomcat5.5/jasper/src/share/org/apache/jasper/compiler/ErrorDispatcher.java
===================================================================
--- trunk/tomcat5.5/jasper/src/share/org/apache/jasper/compiler/ErrorDispatcher.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/jasper/src/share/org/apache/jasper/compiler/ErrorDispatcher.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -526,13 +526,26 @@
         page.visit(errVisitor);
         Node errNode = errVisitor.getJspSourceNode();
         if ((errNode != null) && (errNode.getStart() != null)) {
-            javacError = new JavacErrorDetail(
-                    fname,
-                    lineNum,
-                    errNode.getStart().getFile(),
-                    errNode.getStart().getLineNumber(),
-                    errMsgBuf,
-                    ctxt);
+            // If this is a scriplet node then there is a one to one mapping
+            // between JSP lines and Java lines
+            if (errVisitor.getJspSourceNode() instanceof Node.Scriptlet) {
+                javacError = new JavacErrorDetail(
+                        fname,
+                        lineNum,
+                        errNode.getStart().getFile(),
+                        errNode.getStart().getLineNumber() + lineNum -
+                            errVisitor.getJspSourceNode().getBeginJavaLine(),
+                        errMsgBuf,
+                        ctxt);
+            } else {
+                javacError = new JavacErrorDetail(
+                        fname,
+                        lineNum,
+                        errNode.getStart().getFile(),
+                        errNode.getStart().getLineNumber(),
+                        errMsgBuf,
+                        ctxt);
+            }
         } else {
             /*
              * javac error line number cannot be mapped to JSP page

Modified: trunk/tomcat5.5/jasper/src/share/org/apache/jasper/compiler/Generator.java
===================================================================
--- trunk/tomcat5.5/jasper/src/share/org/apache/jasper/compiler/Generator.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/jasper/src/share/org/apache/jasper/compiler/Generator.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -3253,8 +3253,7 @@
         charArrayBuffer = null;
         err = compiler.getErrorDispatcher();
         ctxt = compiler.getCompilationContext();
-        fragmentHelperClass =
-            new FragmentHelperClass(ctxt.getServletClassName() + "Helper");
+        fragmentHelperClass = new FragmentHelperClass("Helper");
         pageInfo = compiler.getPageInfo();
 
         /*

Modified: trunk/tomcat5.5/jasper/src/share/org/apache/jasper/xmlparser/ParserUtils.java
===================================================================
--- trunk/tomcat5.5/jasper/src/share/org/apache/jasper/xmlparser/ParserUtils.java	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/jasper/src/share/org/apache/jasper/xmlparser/ParserUtils.java	2008-04-06 12:38:06 UTC (rev 6107)
@@ -48,7 +48,7 @@
  * use a separate class loader for the parser to be used.
  *
  * @author Craig R. McClanahan
- * @version $Revision: 466606 $ $Date: 2006-10-21 17:07:12 -0600 (Sat, 21 Oct 2006) $
+ * @version $Revision: 609409 $ $Date: 2008-01-06 14:31:23 -0700 (Sun, 06 Jan 2008) $
  */
 
 public class ParserUtils {
@@ -191,9 +191,6 @@
 
 class MyEntityResolver implements EntityResolver {
 
-    // Logger
-    private Log log = LogFactory.getLog(MyEntityResolver.class);
-
     public InputSource resolveEntity(String publicId, String systemId)
             throws SAXException {
         for (int i = 0; i < Constants.CACHED_DTD_PUBLIC_IDS.length; i++) {
@@ -210,6 +207,7 @@
                 return isrc;
             }
         }
+        Log log = LogFactory.getLog(MyEntityResolver.class);
         if (log.isDebugEnabled())
             log.debug("Resolve entity failed" + publicId + " " + systemId);
         log.error(Localizer.getMessage("jsp.error.parse.xml.invalidPublicId",
@@ -220,10 +218,8 @@
 
 class MyErrorHandler implements ErrorHandler {
 
-    // Logger
-    private Log log = LogFactory.getLog(MyErrorHandler.class);
-
     public void warning(SAXParseException ex) throws SAXException {
+        Log log = LogFactory.getLog(MyErrorHandler.class);
         if (log.isDebugEnabled())
             log.debug("ParserUtils: warning ", ex);
         // We ignore warnings

Modified: trunk/tomcat5.5/servletapi/jsr152/src/share/dtd/jsp_2_0.xsd
===================================================================
--- trunk/tomcat5.5/servletapi/jsr152/src/share/dtd/jsp_2_0.xsd	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/servletapi/jsr152/src/share/dtd/jsp_2_0.xsd	2008-04-06 12:38:06 UTC (rev 6107)
@@ -31,41 +31,6 @@
   <xsd:annotation>
     <xsd:documentation>
 
-      Copyright 2002 Sun Microsystems, Inc., 901 San Antonio
-      Road, Palo Alto, California 94303, U.S.A. All rights
-      reserved.
-
-      Sun Microsystems, Inc. has intellectual property rights
-      relating to technology described in this document. In
-      particular, and without limitation, these intellectual
-      property rights may include one or more of the U.S. patents
-      listed at http://www.sun.com/patents and one or more
-      additional patents or pending patent applications in the
-      U.S. and other countries.
-
-      This document and the technology which it describes are
-      distributed under licenses restricting their use, copying,
-      distribution, and decompilation. No part of this document
-      may be reproduced in any form by any means without prior
-      written authorization of Sun and its licensors, if any.
-
-      Third-party software, including font technology, is
-      copyrighted and licensed from Sun suppliers.
-
-      Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
-      JavaServer Pages, Enterprise JavaBeans and the Java Coffee
-      Cup logo are trademarks or registered trademarks of Sun
-      Microsystems, Inc. in the U.S. and other countries.
-
-      Federal Acquisitions: Commercial Software - Government Users
-      Subject to Standard License Terms and Conditions.
-
-    </xsd:documentation>
-  </xsd:annotation>
-
-  <xsd:annotation>
-    <xsd:documentation>
-
       This is the XML Schema for the JSP 2.0 deployment descriptor
       types.  The JSP 2.0 schema contains all the special
       structures and datatypes that are necessary to use JSP files

Modified: trunk/tomcat5.5/servletapi/jsr152/src/share/dtd/web-jsptaglibrary_2_0.xsd
===================================================================
--- trunk/tomcat5.5/servletapi/jsr152/src/share/dtd/web-jsptaglibrary_2_0.xsd	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/servletapi/jsr152/src/share/dtd/web-jsptaglibrary_2_0.xsd	2008-04-06 12:38:06 UTC (rev 6107)
@@ -19,6 +19,7 @@
      targetNamespace="http://java.sun.com/xml/ns/j2ee"
      xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+     xmlns:xml="http://www.w3.org/XML/1998/namespace"
      elementFormDefault="qualified"
      attributeFormDefault="unqualified"
      version="2.0">
@@ -28,44 +29,8 @@
       %W% %G%
     </xsd:documentation>
   </xsd:annotation>
-
   <xsd:annotation>
     <xsd:documentation>
-
-      Copyright 2003 Sun Microsystems, Inc., 901 San Antonio
-      Road, Palo Alto, California 94303, U.S.A. All rights
-      reserved.
-
-      Sun Microsystems, Inc. has intellectual property rights
-      relating to technology described in this document. In
-      particular, and without limitation, these intellectual
-      property rights may include one or more of the U.S. patents
-      listed at http://www.sun.com/patents and one or more
-      additional patents or pending patent applications in the
-      U.S. and other countries.
-
-      This document and the technology which it describes are
-      distributed under licenses restricting their use, copying,
-      distribution, and decompilation. No part of this document
-      may be reproduced in any form by any means without prior
-      written authorization of Sun and its licensors, if any.
-
-      Third-party software, including font technology, is
-      copyrighted and licensed from Sun suppliers.
-
-      Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
-      JavaServer Pages, Enterprise JavaBeans and the Java Coffee
-      Cup logo are trademarks or registered trademarks of Sun
-      Microsystems, Inc. in the U.S. and other countries.
-
-      Federal Acquisitions: Commercial Software - Government Users
-      Subject to Standard License Terms and Conditions.
-
-    </xsd:documentation>
-  </xsd:annotation>
-
-  <xsd:annotation>
-    <xsd:documentation>
       <![CDATA[
 
 	This is the XML Schema for the JSP Taglibrary
@@ -286,15 +251,13 @@
 
 		Where:
 
- 		    * Type is a basic type or a fully qualified
-		      Java class name (including package name),
-		      as per the 'Type' production in the Java
-		      Language Specification, Second Edition,
+ 		    * Type is a basic type or a fully qualified Java class name
+		      (including package name), as per the 'Type' production
+		      in the Java Language Specification, Second Edition,
 		      Chapter 18.
 
-                    * Identifier is a Java identifier, as per
-		      the 'Identifier' production in the Java
-		      Language Specification, Second
+                    * Identifier is a Java identifier, as per the 'Identifier'
+		      production in the Java Language Specification, Second
 		      Edition, Chapter 18.
 
 	    Example:
@@ -711,8 +674,8 @@
 
 	The taglib tag is the document root, it defines:
 
-	description     a simple string describing the "use" of this
-			taglib, should be user discernable
+	description     a simple string describing the "use" of this taglib,
+			should be user discernable
 
 	display-name    the display-name element contains a
 			short name that is intended to be displayed

Modified: trunk/tomcat5.5/servletapi/jsr154/src/share/dtd/j2ee_web_services_1_1.xsd
===================================================================
--- trunk/tomcat5.5/servletapi/jsr154/src/share/dtd/j2ee_web_services_1_1.xsd	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/servletapi/jsr154/src/share/dtd/j2ee_web_services_1_1.xsd	2008-04-06 12:38:06 UTC (rev 6107)
@@ -31,40 +31,6 @@
   <xsd:annotation>
     <xsd:documentation>
 
-      Copyright 2002 Sun Microsystems, Inc., 901 San Antonio
-      Road, Palo Alto, California 94303, U.S.A. All rights
-      reserved.
-
-      Sun Microsystems, Inc. has intellectual property rights
-      relating to technology described in this document. In
-      particular, and without limitation, these intellectual
-      property rights may include one or more of the U.S. patents
-      listed at http://www.sun.com/patents and one or more
-      additional patents or pending patent applications in the
-      U.S. and other countries.
-
-      This document and the technology which it describes are
-      distributed under licenses restricting their use, copying,
-      distribution, and decompilation. No part of this document
-      may be reproduced in any form by any means without prior
-      written authorization of Sun and its licensors, if any.
-
-      Third-party software, including font technology, is
-      copyrighted and licensed from Sun suppliers.
-
-      Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
-      JavaServer Pages, Enterprise JavaBeans and the Java Coffee
-      Cup logo are trademarks or registered trademarks of Sun
-      Microsystems, Inc. in the U.S. and other countries.
-
-      Federal Acquisitions: Commercial Software - Government Users
-      Subject to Standard License Terms and Conditions.
-
-    </xsd:documentation>
-  </xsd:annotation>
-  <xsd:annotation>
-    <xsd:documentation>
-
       (C) Copyright International Business Machines Corporation 2002
 
     </xsd:documentation>

Modified: trunk/tomcat5.5/servletapi/jsr154/src/share/dtd/j2ee_web_services_client_1_1.xsd
===================================================================
--- trunk/tomcat5.5/servletapi/jsr154/src/share/dtd/j2ee_web_services_client_1_1.xsd	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/servletapi/jsr154/src/share/dtd/j2ee_web_services_client_1_1.xsd	2008-04-06 12:38:06 UTC (rev 6107)
@@ -31,40 +31,6 @@
   <xsd:annotation>
     <xsd:documentation>
 
-      Copyright 2002 Sun Microsystems, Inc., 901 San Antonio
-      Road, Palo Alto, California 94303, U.S.A. All rights
-      reserved.
-
-      Sun Microsystems, Inc. has intellectual property rights
-      relating to technology described in this document. In
-      particular, and without limitation, these intellectual
-      property rights may include one or more of the U.S. patents
-      listed at http://www.sun.com/patents and one or more
-      additional patents or pending patent applications in the
-      U.S. and other countries.
-
-      This document and the technology which it describes are
-      distributed under licenses restricting their use, copying,
-      distribution, and decompilation. No part of this document
-      may be reproduced in any form by any means without prior
-      written authorization of Sun and its licensors, if any.
-
-      Third-party software, including font technology, is
-      copyrighted and licensed from Sun suppliers.
-
-      Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
-      JavaServer Pages, Enterprise JavaBeans and the Java Coffee
-      Cup logo are trademarks or registered trademarks of Sun
-      Microsystems, Inc. in the U.S. and other countries.
-
-      Federal Acquisitions: Commercial Software - Government Users
-      Subject to Standard License Terms and Conditions.
-
-    </xsd:documentation>
-  </xsd:annotation>
-  <xsd:annotation>
-    <xsd:documentation>
-
       (C) Copyright International Business Machines Corporation 2002
 
     </xsd:documentation>

Modified: trunk/tomcat5.5/servletapi/jsr154/src/share/javax/servlet/http/package.html
===================================================================
--- trunk/tomcat5.5/servletapi/jsr154/src/share/javax/servlet/http/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/servletapi/jsr154/src/share/javax/servlet/http/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -2,14 +2,21 @@
 <HTML>
 <HEAD>
 <!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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
 
-  Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
+      http://www.apache.org/licenses/LICENSE-2.0
 
-  This software is the proprietary information of Sun Microsystems, Inc.  
-  Use is subject to license terms.
-
+  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.
 -->
-
 </HEAD>
 <BODY BGCOLOR="white">
 

Modified: trunk/tomcat5.5/servletapi/jsr154/src/share/javax/servlet/package.html
===================================================================
--- trunk/tomcat5.5/servletapi/jsr154/src/share/javax/servlet/package.html	2008-04-06 11:50:35 UTC (rev 6106)
+++ trunk/tomcat5.5/servletapi/jsr154/src/share/javax/servlet/package.html	2008-04-06 12:38:06 UTC (rev 6107)
@@ -1,15 +1,22 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <HTML>
-<HEAD>
 <!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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
 
-  Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
+      http://www.apache.org/licenses/LICENSE-2.0
 
-  This software is the proprietary information of Sun Microsystems, Inc.  
-  Use is subject to license terms.
-
+  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.
 -->
-
+<HEAD>
 </HEAD>
 <BODY BGCOLOR="white">
 




More information about the pkg-java-commits mailing list