DO NOT REPLY [Bug 5881] - DB2 JDBC: no suitable driver!

2002-01-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5881.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5881

DB2 JDBC: no suitable driver!

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED



--- Additional Comments From [EMAIL PROTECTED]  2002-01-25 08:34 ---
ok, I fixed the problem:
after installing DB2 V7.2 (Fixpack5) and using the enclosed JDBC2.0 driver-
package db2java.zip (in directory sqllib/java12) connection works.
it would be comfortable, if there were a hint in tomcat 4.0 that you HAVE TO
use a jdbc2.0-compliant driver and jdbc1-drivers won't work anymore!

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




DO NOT REPLY [Bug 6007] - JSP-servlet cache is not deleted

2002-01-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6007.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6007

JSP-servlet cache is not deleted





--- Additional Comments From [EMAIL PROTECTED]  2002-01-25 08:49 ---
other solution is: 

you re-generate a servlet from a jsp, when a jsp is newer than a servlet

possible better solution is, the generated servlet will remember a date of the 
main JSP or dates of main JSP and included JSPs (but first possibility is 
enough). Than you will see, the main JSP is different

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




DO NOT REPLY [Bug 6028] New: - tomcats shutdowns automtically

2002-01-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6028.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6028

tomcats shutdowns automtically

   Summary: tomcats shutdowns automtically
   Product: Tomcat 4
   Version: Unknown
  Platform: PC
OS/Version: Windows 9x
Status: NEW
  Severity: Major
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Tomcat stops running automatically.
It may run for 10 minutes then it stops its service.

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/buf DateTool.java

2002-01-25 Thread Bojan Smojver

Unfortunately, I can't take any credit for this fix. All kudos goes to 
Lachlan O'Dea.

Bojan

GOMEZ Henri wrote:

 Thanks Bojan, I introduced these 2 bugs ;)
 
 -
 Henri Gomez



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




DO NOT REPLY [Bug 6007] - JSP-servlet cache is not deleted

2002-01-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6007.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6007

JSP-servlet cache is not deleted





--- Additional Comments From [EMAIL PROTECTED]  2002-01-25 11:04 ---
The date is used to decide to recompile, but that won't always work if you
replace  the webapp (unless the JSP in the other webapp is newer).
Doing b) is not acceptable for nearly all of Tomcat users, so it's not even an
option.
One solution is that you can write a container listener (for a Host) which would
do the JSP cleanup when getting a 'removeChild' event.

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Major problem with Sun External Jar : RE: [Tomcat 4.0.2-b2] Java binaries uploaded

2002-01-25 Thread Guillaume Rousse

Ainsi parlait Craig R. McClanahan :
 On Thu, 24 Jan 2002, GOMEZ Henri wrote:
  Date: Thu, 24 Jan 2002 17:04:36 +0100
  From: GOMEZ Henri [EMAIL PROTECTED]
  Reply-To: Tomcat Developers List [EMAIL PROTECTED]
  To: Tomcat Developers List [EMAIL PROTECTED]
  Subject: Major problem with Sun External Jar : RE: [Tomcat 4.0.2-b2] Java
  binaries uploaded
 
   I've got a little problems with all the jars that are
   mandatory to build TC 4.0, javamail, jta, jdbc-ext, jmxri.
  
   tyrex is allready packaged and JSSE is only optional.
  
   Could someone, may be from Sun staff, could release all of
   them in a single tarball and put it on the download area ?
  
  This isn't allowed under the license through which these JARs are
  downloaded.  You can package them with your own distribution
  (as we do in
  the .tar.gz and .exe distros of Tomcat 4), but not separately.
 
  I'd like to clarify. I could have activation, javamail, jdbc-ext,
  jndi, jta, which are Sun products, included in a Tomcat tarball
  but couldn't have them included in a separate tarball ?

 Yes.
NetBeans distributes separatly its own source code from other binaries, 
including javahelp, and they argue they do it this way precisely because of 
legal consideration. So they are clearly stating the opposite of your 
statement here. And NetBeans comes also from Sun...
-- 
Guillaume Rousse [EMAIL PROTECTED]
GPG key http://lis.snv.jussieu.fr/~rousse/gpgkey.html

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




[GUMP] Build Failure - Tomcat 4.0

2002-01-25 Thread Craig McClanahan


This email is autogenerated from the output from:
http://jakarta.apache.org/builds/gump/2002-01-25/jakarta-tomcat-4.0.html


Buildfile: build.xml

deploy-prepare:
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-4.0/build

deploy-static:

deploy:
 [echo] Target: Catalina - Deploy ...

flags:

flags.display:
 [echo] --- Build environment for Catalina ---
 [echo] If ${property_name} is displayed, then the property is not set)
 [echo] --- Build options ---
 [echo] full.dist=${full.dist}
 [echo] build.sysclasspath=only
 [echo] compile.debug=${compile.debug}
 [echo] compile.deprecation=${compile.deprecation}
 [echo] compile.optimize=${compile.optimize}
 [echo] --- Ant Flags ---
 [echo] style task available (required)=true
 [echo] --- JDK ---
 [echo] jdk.1.2.present=true
 [echo] jdk.1.3.present=true
 [echo] jdk.1.4.present=${jdk.1.4.present}
 [echo] --- Source Dependencies ---
 [echo] jtc.home.present=true
 [echo] --- Required Libraries ---
 [echo] beanutils.present=true
 [echo] collections.present=true
 [echo] digester.present=true
 [echo] jaxp.present=true
 [echo] jndi.present=true
 [echo] logging.present=true
 [echo] regexp.present=true
 [echo] servlet.present=true
 [echo] --- Optional Libraries ---
 [echo] dbcp.present=true
 [echo] jaas.present=true
 [echo] javamail.present=true
 [echo] jmx.present=true
 [echo] jsse.present=true
 [echo] jta.present=true
 [echo] junit.present=${junit.present}
 [echo] ldap.present=true
 [echo] modeler.present=true
 [echo] pool.present=true
 [echo] tyrex.present=${tyrex.present}
 [echo] --- Required JARs ---
 [echo] jndi.jar.present(except JDK 1.3+)=true
 [echo] regexp.jar.present=true
 [echo] servlet.jar.present=true
 [echo] xerces.jar.present(except JDK 1.4+)=true
 [echo] --- Optional JARs ---
 [echo] dbcp.jar.present=true
 [echo] jaas.jar.present=true
 [echo] javamail.jar.present=true
 [echo] jdbc20ext.jar.present=true
 [echo] jmx.jar.present=${jmx.jar.present}
 [echo] jta.jar.present=true
 [echo] junit.jar.present=${junit.jar.present}
 [echo] ldap.jar.present=true
 [echo] modeler.jar.present=true
 [echo] pool.jar.present=true
 [echo] tyrex.jar.present=${tyrex.jar.present}
 [echo] --- Conditional compilation flags ---
 [echo] compile.dbcp=true
 [echo] compile.jaas=true
 [echo] compile.javamail=true
 [echo] compile.jmx=true
 [echo] compile.jndi=true
 [echo] compile.jsse=true
 [echo] compile.jta=true
 [echo] compile.junit=${compile.junit}
 [echo] compile.ldap=true
 [echo] compile.ssi=true
 [echo] compile.tyrex=${compile.tyrex}
 [echo] --- Distribution flags ---
 [echo] copy.dbcp.jar=true
 [echo] copy.jaas.jar=true
 [echo] copy.jdbc20ext.jar=true
 [echo] copy.javamail.jar=true
 [echo] copy.jmx.jar=${copy.jmx.jar}
 [echo] copy.jndi.jar=${copy.jndi.jar}
 [echo] copy.jta.jar=true
 [echo] copy.ldap.jar=${copy.ldap.jar}
 [echo] copy.logging.jar=true
 [echo] copy.modeler.jar=true
 [echo] copy.pool.jar=true
 [echo] copy.tyrex.jar=${copy.tyrex.jar}
 [echo] copy.xerces.jar=true

build-prepare:
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/bin
[mkdir] Created dir: 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/common/classes
[mkdir] Created dir: 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/common/lib
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/conf
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/logs
[mkdir] Created dir: 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/server/classes
[mkdir] Created dir: 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/server/lib
[mkdir] Created dir: 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/shared/classes
[mkdir] Created dir: 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/shared/lib
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/work
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/temp

copy-activation.jar:
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/common/lib
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/common/lib

copy-dbcp.jar:
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/common/lib

copy-jaas.jar:
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/server/lib

copy-jdbc20ext.jar:
 [copy] Copying 1 file to 

Sources for Tomcat 4.0.1 Win32 Service (tomcat.exe)

2002-01-25 Thread Tom Bednarz

Hi,

I am looking for the source code of the tomcat.exe program of Version
4.0.1. I was looking in the CVS repository under
http://cvs.apache.org/viewcvs/jakarta-tomcat-4.0/service/src/native/windows

Unfortunately this repository is empty. Could anybody tell me, where I can
find the sources? (I could only find the sources for UNIX)

I am also interested in the installer script for Windows.

Many thanks for your help!

Thomas



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




mod_webapp.so (linking problems on x86 platform sol7)

2002-01-25 Thread Frank Ng

Hi,

I am having linking problems with mod_webapp.so, it compiled
fine but when I put ...

LoadModule webapp_module libexec/mod_webapp.so

in httpd.conf and try to start it, I get an error and when I
check links, I get the following errors ...

webapp-module-1.0.1-tc401/apache-1.3# ldd -r mod_webapp.so 
libm.so.1 = /usr/lib/libm.so.1
libsocket.so.1 =/usr/lib/libsocket.so.1
libnsl.so.1 =   /usr/lib/libnsl.so.1
libdl.so.1 =/usr/lib/libdl.so.1
libc.so.1 = /usr/lib/libc.so.1
libmp.so.2 =/usr/lib/libmp.so.2
symbol not found: __udivdi3 (./mod_webapp.so)
symbol not found: __divdi3  (./mod_webapp.so)
symbol not found: __moddi3  (./mod_webapp.so)
symbol not found: __divdi3  (./mod_webapp.so)
symbol not found: __moddi3  (./mod_webapp.so)
symbol not found: __moddi3  (./mod_webapp.so)
symbol not found: __divdi3  (./mod_webapp.so)
symbol not found: __moddi3  (./mod_webapp.so)
symbol not found: __divdi3  (./mod_webapp.so)
symbol not found: __divdi3  (./mod_webapp.so)
symbol not found: __moddi3  (./mod_webapp.so)
symbol not found: ap_table_get  (./mod_webapp.so)
symbol not found: ap_setup_client_block (./mod_webapp.so)
symbol not found: ap_pstrdup(./mod_webapp.so)
symbol not found: ap_log_error  (./mod_webapp.so)
symbol not found: ap_table_add  (./mod_webapp.so)
symbol not found: ap_get_remote_host(./mod_webapp.so)
symbol not found: ap_send_http_header   (./mod_webapp.so)
symbol not found: ap_should_client_block(./mod_webapp.so)
symbol not found: ap_rwrite (./mod_webapp.so)
symbol not found: ap_get_client_block   (./mod_webapp.so)
symbol not found: ap_rflush (./mod_webapp.so)

compiled with the following ...

webapp-module-1.0.1-tc401# ./support/buildconf.sh
webapp-module-1.0.1-tc401# cd apr
webapp-module-1.0.1-tc401# ./buildconf
webapp-module-1.0.1-tc401# cd ..
webapp-module-1.0.1-tc401# ./configure
--with-apxs=/usr/local/httpd/bin/apxs
--enable-java=/usr/local/j2sdk1_3_1_01
--with-tomcat=/usr/local/jakarta-tomcat-4.0.1

Here is some info about my system ...

# uname -a
SunOS halo.pado.net 5.7 Generic i86pc i386 i86pc

with apache 1.3.22, tomcat 4.0.1, php 4.1.1, mysql 3.23.47

Please help, thanks!

-Frank


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: mod_webapp.so (linking problems on x86 platform sol7)

2002-01-25 Thread jean-frederic clere

Frank Ng wrote:
 
 Hi,
 
 I am having linking problems with mod_webapp.so, it compiled
 fine but when I put ...
 
 LoadModule webapp_module libexec/mod_webapp.so
 
 in httpd.conf and try to start it, I get an error and when I
 check links, I get the following errors ...
 
 webapp-module-1.0.1-tc401/apache-1.3# ldd -r mod_webapp.so
 libm.so.1 = /usr/lib/libm.so.1
 libsocket.so.1 =/usr/lib/libsocket.so.1
 libnsl.so.1 =   /usr/lib/libnsl.so.1
 libdl.so.1 =/usr/lib/libdl.so.1
 libc.so.1 = /usr/lib/libc.so.1
 libmp.so.2 =/usr/lib/libmp.so.2
 symbol not found: __udivdi3 (./mod_webapp.so)
 symbol not found: __divdi3  (./mod_webapp.so)
 symbol not found: __moddi3  (./mod_webapp.so)
 symbol not found: __divdi3  (./mod_webapp.so)
 symbol not found: __moddi3  (./mod_webapp.so)
 symbol not found: __moddi3  (./mod_webapp.so)
 symbol not found: __divdi3  (./mod_webapp.so)
 symbol not found: __moddi3  (./mod_webapp.so)
 symbol not found: __divdi3  (./mod_webapp.so)
 symbol not found: __divdi3  (./mod_webapp.so)
 symbol not found: __moddi3  (./mod_webapp.so)
 symbol not found: ap_table_get  (./mod_webapp.so)
 symbol not found: ap_setup_client_block (./mod_webapp.so)
 symbol not found: ap_pstrdup(./mod_webapp.so)
 symbol not found: ap_log_error  (./mod_webapp.so)
 symbol not found: ap_table_add  (./mod_webapp.so)
 symbol not found: ap_get_remote_host(./mod_webapp.so)
 symbol not found: ap_send_http_header   (./mod_webapp.so)
 symbol not found: ap_should_client_block(./mod_webapp.so)
 symbol not found: ap_rwrite (./mod_webapp.so)
 symbol not found: ap_get_client_block   (./mod_webapp.so)
 symbol not found: ap_rflush (./mod_webapp.so)
 
 compiled with the following ...
 
 webapp-module-1.0.1-tc401# ./support/buildconf.sh
 webapp-module-1.0.1-tc401# cd apr
 webapp-module-1.0.1-tc401# ./buildconf
 webapp-module-1.0.1-tc401# cd ..
 webapp-module-1.0.1-tc401# ./configure
 --with-apxs=/usr/local/httpd/bin/apxs
 --enable-java=/usr/local/j2sdk1_3_1_01
 --with-tomcat=/usr/local/jakarta-tomcat-4.0.1
 
 Here is some info about my system ...
 
 # uname -a
 SunOS halo.pado.net 5.7 Generic i86pc i386 i86pc
 
 with apache 1.3.22, tomcat 4.0.1, php 4.1.1, mysql 3.23.47

It sounds that your Apache is compiled using cc and your mod_webapp using gcc.
That does not work!

 
 Please help, thanks!
 
 -Frank
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




DO NOT REPLY [Bug 6007] - JSP-servlet cache is not deleted

2002-01-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6007.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6007

JSP-servlet cache is not deleted





--- Additional Comments From [EMAIL PROTECTED]  2002-01-25 14:32 ---
Isn't it better to fire up the jsp's in a context based on the directory mount 
in netbeans, instead of always using the ROOT context for it ?
I must add that I never use jps's though..

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config ajp.xml engine.xml

2002-01-25 Thread remm

remm02/01/25 06:54:24

  Modified:webapps/tomcat-docs/config ajp.xml engine.xml
  Log:
  - Update doc on AJP.
  - Add the 'jvmRoute' attribute to the engine.
  
  Revision  ChangesPath
  1.4   +7 -2  jakarta-tomcat-4.0/webapps/tomcat-docs/config/ajp.xml
  
  Index: ajp.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/ajp.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ajp.xml   1 Dec 2001 01:12:31 -   1.3
  +++ ajp.xml   25 Jan 2002 14:54:24 -  1.4
  @@ -26,7 +26,12 @@
 better overall performance than running your applications under
 Tomcat stand-alone using the a href=http11.htmlHTTP/1.1 Connector/a.  
 However, the only way to know for sure whether it will provide better 
  -  performance for strongyour/strong application is to try it both ways./p
  +  performance for strongyour/strong application is to try it both 
  +  ways./p
  +
  +  pThis connector supports load balancing when used in conjunction with
  +  the codejvmRoute/code attribute of the 
  +  a href=engine.htmlEngine/a./p
   
   /section
   
  @@ -87,7 +92,7 @@
 pThe standard implementation of strongAJP Connector/strong is
 strongorg.apache.ajp.tomcat4.Ajp13Connector/strong./p
   
  -  pstrongThis implementation supports the AJP 1.3 protocol./strong/p
  +  pstrongThis implementation supports the AJP 1.3 and 1.4 
protocols./strong/p
   
 pIt supports the following additional attributes (in addition to the
 common attributes listed above):/p
  
  
  
  1.3   +9 -0  jakarta-tomcat-4.0/webapps/tomcat-docs/config/engine.xml
  
  Index: engine.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/engine.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- engine.xml26 Sep 2001 02:29:21 -  1.2
  +++ engine.xml25 Jan 2002 14:54:24 -  1.3
  @@ -54,6 +54,15 @@
   nested immediately inside./p
 /attribute
   
  +  attribute name=jvmRoute required=false
  +pIdentifier which must be used in load balancing scenarios to enable
  +session affinity. The indetifier, which must be unique across all
  +Tomcat 4 servers which participate in the cluster, will be appended to
  +the generated session identifier, therefore allowing the front end
  +proxy to always forward a particular session to the same Tomcat 4
  +instance./p
  +  /attribute
  +
 attribute name=name required=true
   pLogical name of this Engine, used in log and error messages./p
 /attribute
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config ajp.xml engine.xml

2002-01-25 Thread remm

remm02/01/25 06:54:37

  Modified:webapps/tomcat-docs/config Tag: tomcat_40_branch ajp.xml
engine.xml
  Log:
  - Update doc on AJP.
  - Add the 'jvmRoute' attribute to the engine.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.2.2.3   +5 -1  jakarta-tomcat-4.0/webapps/tomcat-docs/config/ajp.xml
  
  Index: ajp.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/ajp.xml,v
  retrieving revision 1.2.2.2
  retrieving revision 1.2.2.3
  diff -u -r1.2.2.2 -r1.2.2.3
  --- ajp.xml   1 Dec 2001 22:16:24 -   1.2.2.2
  +++ ajp.xml   25 Jan 2002 14:54:37 -  1.2.2.3
  @@ -28,6 +28,10 @@
 However, the only way to know for sure whether it will provide better 
 performance for strongyour/strong application is to try it both ways./p
   
  +  pThis connector supports load balancing when used in conjunction with
  +  the codejvmRoute/code attribute of the 
  +  a href=engine.htmlEngine/a./p
  +
   /section
   
   
  @@ -87,7 +91,7 @@
 pThe standard implementation of strongAJP Connector/strong is
 strongorg.apache.ajp.tomcat4.Ajp13Connector/strong./p
   
  -  pstrongThis implementation supports the AJP 1.3 protocol./strong/p
  +  pstrongThis implementation supports the AJP 1.3 and 1.4 
protocols./strong/p
   
 pIt supports the following additional attributes (in addition to the
 common attributes listed above):/p
  
  
  
  1.1.2.2   +9 -0  jakarta-tomcat-4.0/webapps/tomcat-docs/config/engine.xml
  
  Index: engine.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/engine.xml,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- engine.xml26 Sep 2001 02:28:07 -  1.1.2.1
  +++ engine.xml25 Jan 2002 14:54:37 -  1.1.2.2
  @@ -54,6 +54,15 @@
   nested immediately inside./p
 /attribute
   
  +  attribute name=jvmRoute required=false
  +pIdentifier which must be used in load balancing scenarios to enable
  +session affinity. The indetifier, which must be unique across all
  +Tomcat 4 servers which participate in the cluster, will be appended to
  +the generated session identifier, therefore allowing the front end
  +proxy to always forward a particular session to the same Tomcat 4
  +instance./p
  +  /attribute
  +
 attribute name=name required=true
   pLogical name of this Engine, used in log and error messages./p
 /attribute
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40 Worker40.java

2002-01-25 Thread remm

remm02/01/25 07:14:41

  Modified:jk/java/org/apache/jk/server/tomcat40 Worker40.java
  Log:
  - Fix the build.
  
  Revision  ChangesPath
  1.3   +0 -1  
jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/Worker40.java
  
  Index: Worker40.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/Worker40.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Worker40.java 21 Jan 2002 20:11:52 -  1.2
  +++ Worker40.java 25 Jan 2002 15:14:41 -  1.3
  @@ -64,7 +64,6 @@
   
   import org.apache.jk.*;
   
  -import org.apache.tomcat.util.net.*;
   import org.apache.tomcat.util.buf.*;
   import org.apache.tomcat.util.log.*;
   import org.apache.tomcat.util.http.*;
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk build.xml

2002-01-25 Thread remm

remm02/01/25 07:18:47

  Modified:jk   build.xml
  Log:
  - Build JK 2 also with Tomcat 4.x.
  - Repackage a bit the ajp2.jar.
  
  Revision  ChangesPath
  1.24  +1 -2  jakarta-tomcat-connectors/jk/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/build.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- build.xml 22 Jan 2002 23:11:21 -  1.23
  +++ build.xml 25 Jan 2002 15:18:47 -  1.24
  @@ -113,7 +113,6 @@
   exclude name=org/apache/ajp/tomcat33/** unless=tomcat33.detect/
   exclude name=org/apache/jk/server/tomcat33/** 
unless=tomcat33.detect/
   exclude name=org/apache/jk/server/tomcat40/** 
unless=tomcat40.detect/
  -exclude name=org/apache/jk/** unless=tomcat33.detect/
exclude name=org/apache/catalina/** unless=tomcat40.detect/
classpath refid=build-main.classpath/
/javac
  @@ -133,7 +132,7 @@
jar jarfile=${jk.build}/WEB-INF/lib/tomcat-ajp2.jar
 basedir=${jk.build}/WEB-INF/classes
   include name=org/apache/jk/** /
  -include name=org/apache/catalina/jk/** /
  +exclude name=org/apache/jk/ant/** /
   /jar

   /target
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config jk.xml jk2.xml webapp.xml project.xml ajp.xml warp.xml

2002-01-25 Thread remm

remm02/01/25 07:21:34

  Modified:webapps/tomcat-docs/config project.xml
  Added:   webapps/tomcat-docs/config jk.xml jk2.xml webapp.xml
  Removed: webapps/tomcat-docs/config ajp.xml warp.xml
  Log:
  - Rorganize a bit the connector documentation, according to the official
connector name (warp - webapp and ajp - jk).
  - Add a placeholder page on JK 2 (currently with the same content as the JK 1 page,
except the connector class name).
  
  Revision  ChangesPath
  1.7   +3 -2  jakarta-tomcat-4.0/webapps/tomcat-docs/config/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/project.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- project.xml   30 Nov 2001 06:23:13 -  1.6
  +++ project.xml   25 Jan 2002 15:21:34 -  1.7
  @@ -22,9 +22,10 @@
   /menu
   
   menu name=Connectors
  +item name=JKhref=jk.html/
  +item name=JK 2  href=jk2.html/
   item name=HTTP/1.1  href=http11.html/
  -item name=Warp  href=warp.html/
  -item name=AJP   href=ajp.html/
  +item name=Webapphref=webapp.html/
   /menu
   
   menu name=Containers
  
  
  
  1.1  jakarta-tomcat-4.0/webapps/tomcat-docs/config/jk.xml
  
  Index: jk.xml
  ===
  ?xml version=1.0?
  !DOCTYPE document [
!ENTITY project SYSTEM project.xml
  ]
  document
  
project;
  
properties
  author email=[EMAIL PROTECTED]Remy Maucherat/author
  titleThe JK Connector/title
/properties
  
  body
  
  
  section name=Introduction
  
pThe strongJK Connector/strong element represents a
strongConnector/strong component that communicates with a web
connector via the codeAJP/code protocol.  This is used for cases
where you wish to invisibly integrate Tomcat 4 into an existing (or new)
Apache installation, and you want Apache to handle the static content
contained in the web application, and/or utilize Apache's SSL
processing.  In many application environments, this will result in
better overall performance than running your applications under
Tomcat stand-alone using the a href=http11.htmlHTTP/1.1 Connector/a.  
However, the only way to know for sure whether it will provide better 
performance for strongyour/strong application is to try it both 
ways./p
  
pThis connector supports load balancing when used in conjunction with
the codejvmRoute/code attribute of the 
a href=engine.htmlEngine/a./p
  
  /section
  
  
  section name=Attributes
  
subsection name=Common Attributes
  
pAll implementations of strongConnector/strong
support the following attributes:/p
  
attributes
  
  attribute name=className required=true
pJava class name of the implementation to use.  This class must
implement the codeorg.apache.catalina.Connector/code interface.
You must specify the standard value defined below./p
  /attribute
  
  attribute name=enableLookups required=false
pSet to codetrue/code if you want calls to
coderequest.getRemoteHost()/code to perform DNS lookups in
order to return the actual host name of the remote client.  Set
to codefalse/code to skip the DNS lookup and return the IP
address in String form instead (thereby improving performance).
By default, DNS lookups are enabled./p
  /attribute
  
  attribute name=redirectPort required=false
pIf this strongConnector/strong is supporting non-SSL
requests, and a request is received for which a matching
codelt;security-constraintgt;/code requires SSL transport,
Catalina will automatically redirect the request to the port
number specified here./p
  /attribute
  
  attribute name=scheme required=false
pSet this attribute to the name of the protocol you wish to have
returned by calls to coderequest.getScheme()/code.  For
example, you would set this attribute to codehttps/code
for an SSL Connector.  The default value is codehttp/code.
See a href=#SSL SupportSSL Support/a for more information./p
  /attribute
  
  attribute name=secure required=false
pSet this attribute to codetrue/code if you wish to have
calls to coderequest.isSecure()/code to return codetrue/code
for requests received by this Connector (you would want this on an
SSL Connector).  The default value is codefalse/code./p
  /attribute
  
/attributes
  
/subsection
  
subsection name=Standard Implementation
  
pThe standard implementation of strongJK Connector/strong is

JSP Parsing during compilation

2002-01-25 Thread Mike Wannamaker

I seem to be getting this error with Jasper engine from Tomcat 4.0.2
Beta 1.  I have nested custom tags.  However I have other nested custom
tags that seem to work.

This one seems to give me this error:
t:hasContent name='test' 

t:getContent name='test' /

/t:hasContent

However if I put the end tag / in with start tag like below it
compiles fine?
t:hasContent name='test' /

t:getContent name='test' /


Any help would be appreciated.  I have included the stack trace?

What does popFile() do?  Why would it be popping a file when it is just
working on one file?

--ekiM

1011907830158 quest_handler-1 E00ERROR:   
[12]  Error Compiling == /jsp/template/portfolio/folderTemplate.jsp :
End of content reached while more parsing required: tag nesting error?
1011907830168 quest_handler-1 C00DEBUG:   
[12]  org.apache.jasper.compiler.ParseException: End of content reached
while more parsing required: tag nesting error?
at org.apache.jasper.compiler.JspReader.popFile(Unknown Source)
at org.apache.jasper.compiler.JspReader.hasMoreInput(Unknown Source)
at org.apache.jasper.compiler.JspReader.nextChar(Unknown Source)
at org.apache.jasper.compiler.JspReader.skipUntil(Unknown Source)
at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:868)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:892)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
at org.apache.jasper.compiler.ParserController.parse(Unknown Source)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210)
at com.hcl.bi.requesthandler.utils.JspPrecompiler.compileFile(Unknown
Source)
at com.hcl.bi.requesthandler.utils.JspPrecompiler.parseFiles(Unknown
Source)
at com.hcl.bi.requesthandler.utils.JspPrecompiler.doCompile(Unknown
Source)
at com.hcl.bi.requesthandler.utils.JspPrecompiler.run(Unknown Source)
at
com.hcl.raleigh.threads.HcThreadPool$WorkerThread.run(HcThreadPool.java:65)




DO NOT REPLY [Bug 6007] - JSP-servlet cache is not deleted

2002-01-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6007.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6007

JSP-servlet cache is not deleted





--- Additional Comments From [EMAIL PROTECTED]  2002-01-25 15:37 ---
I do not know, but I think it is normal to use 1 web module with empty context.
I think, it is common ispecially for IDE users, which are beginners. For 
example basic simple web app with only index.jsp is ussualy used with empty 
context (localhost:8080/index.jsp).

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Forte deployement with tocat

2002-01-25 Thread ilker ARABACI

Hi,
I want to deploy projects developed by forte to apache+ tomcat4  web server
, using webdav

is there any step by step guide to do this , both in server and client zone.



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: jakarta-tomcat-connectors-4.0.2-b2-src.tar.gz couldn't be compiled against just TC 4.0.2

2002-01-25 Thread Remy Maucherat

 jakarta-tomcat-connectors-4.0.2-b2-src.tar.gz which is a snap from
 jtc tag tc4.0.2b2 couldn't be compiled against JUST TC 4 since there
 is still many :

 import org.apache.tomcat.util.net.*;

 Shouldn't we retag jtc after Costin patches which fixes these problems
 and reupload the tarball ?

There was another similar problem which caused today's Gump build to fail.
Gump also made me notice that the build was incorrect (JK 2 wasn't being
built). Thanks Gump :)

So I'd say we shouldn't fix it, and it will be fixed in the final. Also, the
workaround is easy (remove the JK 2 sources).

Remy


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




DO NOT REPLY [Bug 6032] New: - Accessing a jsp directly behaves differently than accessing through a servlet-mapping.

2002-01-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6032.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6032

Accessing a jsp directly behaves differently than accessing through a servlet-mapping.

   Summary: Accessing a jsp directly behaves differently than
accessing through a servlet-mapping.
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


System - Windows NT Version 4.0 (Build 1381: Service Pack 6)

Apache Tomcat Version - 4.0.1 Final

Impact - Bug has a severe impact on our production software release. The 
inability to make the Reference Implementation work may have cascading effects 
on our product's usability with other containers (WebSphere, WebLogic, etc.).

Bug Summary:
When accessing the jsp directly, all is well.
127.0.0.1 - - GET /tsgui001/tsgui001/gui.jsp HTTP/1.1 200 1832
127.0.0.1 - - GET /tsgui001/tsgui001/main_menu.js HTTP/1.1 304 -
127.0.0.1 - - GET /tsgui001/CoolGen_Make.js HTTP/1.1 304 -
127.0.0.1 - - GET /tsgui001/tsgui001/main_menu.html HTTP/1.1 304 -
127.0.0.1 - - GET /tsgui001/tsgui001/main_menu_menu.js HTTP/1.1 304 -
127.0.0.1 - - GET /tsgui001/CoolGen_MenuDom.js HTTP/1.1 304 -
127.0.0.1 - - GET /tsgui001/tsgui001/gui.jsp?DYNAMIC=GETDATA HTTP/1.1 200 -
127.0.0.1 - - GET /tsgui001/CoolGen_Menutri.gif HTTP/1.1 200 1135
127.0.0.1 - - GET /tsgui001/tsgui001/main_menu.css HTTP/1.1 304 -

From the web.xml:
servlet
servlet-namegui/servlet-name
jsp-file/tsgui001/gui.jsp/jsp-file
/servlet
servlet-mapping
servlet-namegui/servlet-name
url-pattern/gui/url-pattern
/servlet-mapping

When accessing the jsp via a servlet-mapping, a relative look up fails. Notice 
the 404 for CoolGen_Make.js.
127.0.0.1 - - GET /tsgui001/gui HTTP/1.1 200 1832
127.0.0.1 - - GET /tsgui001/tsgui001/main_menu.js HTTP/1.1 304 -
127.0.0.1 - - GET /CoolGen_Make.js HTTP/1.1 404 621
127.0.0.1 - - GET /tsgui001/tsgui001/main_menu.html HTTP/1.1 304 -
127.0.0.1 - - GET /tsgui001/tsgui001/main_menu_menu.js HTTP/1.1 304 -
127.0.0.1 - - GET /tsgui001/CoolGen_MenuDom.js HTTP/1.1 304 -
127.0.0.1 - - GET /tsgui001/tsgui001/gui.jsp?DYNAMIC=GETDATA HTTP/1.1 200 1135
127.0.0.1 - - GET /tsgui001/CoolGen_Menutri.gif HTTP/1.1 304 -
127.0.0.1 - - GET /tsgui001/tsgui001/main_menu.css HTTP/1.1 304 -

1. JSP /tsgui001/tsgui001/gui.jsp is requested via /tsgui001/gui.
2. gui.jsp forwards to a Servlet.
   jsp:forward page=/servlet/tsgui001.GUI.ServletManager /
3. The ServletManager streams the html page (no physical file on the file 
system).
4. The html page has an absolute reference to main_menu.js file:
   HEAD
SCRIPT LANGUAGE='JavaScript1.2' SRC='/tsgui001/tsgui001/main_menu.js' 
TYPE='text/javascript'/SCRIPT
   /HEAD
5. main_menu.js has an relative reference CoolGen_Make.js:
   document.write(SCRIPT LANGUAGE=JavaScript SRC='../CoolGen_Make.js');

The differing behavior between the two access styles is unexpected and the 
specification does not list this as an expected behavior.

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Forte deployement with tocat

2002-01-25 Thread Martin van den Bemt

Please see http://www.netbeans.org. They just committed a module for tomcat
4 btw (default support in netbeans is still tomcat 3.x)

Mvgr,
Martin

 -Original Message-
 From: ilker ARABACI [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 25, 2002 17:19
 To: Tomcat Developers List
 Subject: Forte deployement with tocat


 Hi,
 I want to deploy projects developed by forte to apache+ tomcat4
 web server
 , using webdav

 is there any step by step guide to do this , both in server and
 client zone.



 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




DO NOT REPLY [Bug 6032] - Accessing a jsp directly behaves differently than accessing through a servlet-mapping.

2002-01-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6032.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6032

Accessing a jsp directly behaves differently than accessing through a servlet-mapping.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2002-01-25 16:18 ---
I would say the bug is invalid, because (omitting all the forwards, which are
ignored by the client browser):
1) /tsgui001/tsgui001/gui.jsp + ../CoolGen_Make.js = /tsgui001/CoolGen_Make.js
2) /tsgui001/gui + ../CoolGen_Make.js = /CoolGen_Make.js
For the client browser, I don't see the 2nd path being equal to the first path,
since the base path isn't the same (for (1) it is /tsgui001/tsgui001/, and for
(2) it is /tsgui001/).

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Where to put JAAS classfiles (loginmodules) when using it from a web app

2002-01-25 Thread Ismael Blesa Part

Hi,
I am using JAAS authentication from a web application, the problem is 
that the login modules that I use, and all the classes that the 
LoginModule uses are not loaded from the WEB-INF/classes or WEB_INF/lib 
folder. I have to put them on the jdk/jre/lib/ext. The problem is that 
the classes I put there collide with other applications that use the 
same installed JDK and also with some other webapplications that run on 
the same Tomcat server.
I have developed it using jdk1.3.1 and JAAS 1.0.
Is there a way to put specify where login module classes should be 
loaded that does not interfere with other applications (that is, I do 
not want to put any class on the jdk/ jre/lib/ext folder).
Cheers
   


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Cocoon 2 Dumps Tomcat 4.1 on Apache1.3.22 SSL

2002-01-25 Thread Unix Developer

Please find the space dump in the attached file.

I am testing new installation of Apache 1.3.22 SSL,
Tomcat 4.0.1 with mod_webapp on RH Linux 7.1

__
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

Starting service Tomcat-Apache
Apache Tomcat/4.0
Starting service MackConnector
Apache Tomcat/4.0
Server 1.6 is running
Press [Ctrl]+[C] to abort
SIGSEGV   11*  segmentation violation
si_signo [11]: SIGSEGV   11*  segmentation violation
si_errno [0]: Success
si_code [1]: SEGV_MAPERR [addr: 0x0]

stackpointer=0x448dab88

Full thread dump Classic VM (1.2.2-L, green threads):
Thread-15 (TID:0x40eb3fd0, sys_thread_t:0x9602250, state:R) prio=5
at java.lang.ClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.loadClass(ClassLoader.java:275)
at java.lang.ClassLoader.loadClass(ClassLoader.java:243)
at 
org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(Unknown Source)
at 
org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(Unknown Source)
at org.apache.cocoon.sitemap.AbstractSitemap.compose(AbstractSitemap.java:123)
at 
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(Unknown 
Source)
at 
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(Unknown 
Source)
at 
org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:135)
at 
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.addCompiledComponent(ProgramGeneratorImpl.java:345)
at 
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:179)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:208)
at java.lang.Thread.run(Thread.java:475)
Thread-14 (TID:0x40e57510, sys_thread_t:0x862f2b0, state:CW) prio=5
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:86)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
at java.io.BufferedInputStream.read(BufferedInputStream.java:204)
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:288)
at java.io.DataInputStream.readUTF(DataInputStream.java:517)
at java.io.DataInputStream.readUTF(DataInputStream.java:494)
at org.hsqldb.ServerConnection.run(ServerConnection.java:116)
Thread-12 (TID:0x40e57668, sys_thread_t:0x92ec350, state:CW) prio=5
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:86)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
at java.io.BufferedInputStream.read(BufferedInputStream.java:204)
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:288)
at java.io.DataInputStream.readUTF(DataInputStream.java:517)
at java.io.DataInputStream.readUTF(DataInputStream.java:494)
at org.hsqldb.ServerConnection.run(ServerConnection.java:116)
Thread-10 (TID:0x40e577c0, sys_thread_t:0x95bf928, state:CW) prio=5
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:86)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
at java.io.BufferedInputStream.read(BufferedInputStream.java:204)
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:288)
at java.io.DataInputStream.readUTF(DataInputStream.java:517)
at java.io.DataInputStream.readUTF(DataInputStream.java:494)
at org.hsqldb.ServerConnection.run(ServerConnection.java:116)
Thread-8 (TID:0x40e57920, sys_thread_t:0x94e4c00, state:CW) prio=5
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:86)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
at java.io.BufferedInputStream.read(BufferedInputStream.java:204)
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:288)
at java.io.DataInputStream.readUTF(DataInputStream.java:517)
at java.io.DataInputStream.readUTF(DataInputStream.java:494)
at org.hsqldb.ServerConnection.run(ServerConnection.java:116)
Thread-6 (TID:0x40ea5510, sys_thread_t:0x95c26c0, state:CW) prio=5
at java.lang.Thread.sleep(Native Method)
at org.hsqldb.Log.run(Log.java:119)
at java.lang.Thread.run(Thread.java:475)
Thread-5 (TID:0x40ee9290, sys_thread_t:0x93278c8, state:CW) prio=5
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:402)
at java.net.ServerSocket.implAccept(ServerSocket.java:236)
at 

Re: JSP Parsing during compilation

2002-01-25 Thread Mike Wannamaker

Actually I got jasper source code and recompiled with some logging and
I've solved it.  The jasper engine when parsing the is searching the
custom tags end tag.

Ex:

t:hasContent name='test' 

t:getContent name='test' /

/t:hasContent 

However because I had a space between hasContent and the  jasper did
not find it because

org.apache.jasper.compiler.JspReader.skipUntil()

is actually looking for .t:hasContent.  No space between hasContent
and the .

I would have to say that it should probably search for /t:hasContent
with no  appended to end?

--ekiM


On Fri, 2002-01-25 at 10:32, Mike Wannamaker wrote:

I seem to be getting this error with Jasper engine from Tomcat 4.0.2
Beta 1.  I have nested custom tags.  However I have other nested custom
tags that seem to work.

This one seems to give me this error:
t:hasContent name='test' 

t:getContent name='test' /

/t:hasContent 

However if I put the end tag / in with start tag like below it
compiles fine?
t:hasContent name='test' /

t:getContent name='test' /


Any help would be appreciated.  I have included the stack trace?

What does popFile() do?  Why would it be popping a file when it is just
working on one file?

--ekiM

1011907830158 quest_handler-1 E00ERROR:   
[12]  Error Compiling == /jsp/template/portfolio/folderTemplate.jsp :
End of content reached while more parsing required: tag nesting error?
1011907830168 quest_handler-1 C00DEBUG:   
[12]  org.apache.jasper.compiler.ParseException: End of content reached
while more parsing required: tag nesting error?
at org.apache.jasper.compiler.JspReader.popFile(Unknown Source)
at org.apache.jasper.compiler.JspReader.hasMoreInput(Unknown Source)
at org.apache.jasper.compiler.JspReader.nextChar(Unknown Source)
at org.apache.jasper.compiler.JspReader.skipUntil(Unknown Source)
at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:868)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:892)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
at org.apache.jasper.compiler.ParserController.parse(Unknown Source)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210)
at com.hcl.bi.requesthandler.utils.JspPrecompiler.compileFile(Unknown
Source)
at com.hcl.bi.requesthandler.utils.JspPrecompiler.parseFiles(Unknown
Source)
at com.hcl.bi.requesthandler.utils.JspPrecompiler.doCompile(Unknown
Source)
at com.hcl.bi.requesthandler.utils.JspPrecompiler.run(Unknown Source)
at
com.hcl.raleigh.threads.HcThreadPool$WorkerThread.run(HcThreadPool.java:65)





[4.0.2] Final and should-be-fixed bug list

2002-01-25 Thread Remy Maucherat

Hi,

4.0.2-b2 was a very important and successful release connector wise, so
thanks to everyone who contributed :)

I think the next release in the line should be 4.0.2 final, which should
include bugfixes to the current code.
The list of the bugs that I'd like to resolve before final is: 4518, 5201,
5330, 5735, 5795, 5825, 5827, 5855, 5908, 6010.

I'd also like to:
- if it is ready on time, release the new Java HTTP/1.1 connector as an
optional module with this release (as alpha quality code), to start to get
some testing; the release won't be delayed if it is not ready, though, as it
can be made available as a module at any time
- update the JK documentation to match how the current connector operates,
if any part of the current documentation is stale
- add some documentation about webapp (at last); of course, volunteers are
needed; we don't need much, just removing the FIXME there
(http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/warp.html) would be
a good start IMO

Schedule-wise, I would say the release could ship within 2-3 weeks.

Remy


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/http11 build.xml

2002-01-25 Thread remm

remm02/01/25 09:30:14

  Modified:http11   build.xml
  Log:
  - Harmonize JAR names (so that the JAR name matches the name of the connector
or component).
  
  Revision  ChangesPath
  1.3   +2 -2  jakarta-tomcat-connectors/http11/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/http11/build.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.xml 2 Jan 2002 15:06:35 -   1.2
  +++ build.xml 25 Jan 2002 17:30:14 -  1.3
  @@ -3,7 +3,7 @@
   
   !--
   Coyote connector framework for Jakarta Tomcat
  -$Id: build.xml,v 1.2 2002/01/02 15:06:35 remm Exp $
  +$Id: build.xml,v 1.3 2002/01/25 17:30:14 remm Exp $
   --
   
   
  @@ -35,7 +35,7 @@
   
   
 !-- The name of this component --
  -  property name=component.name  value=coyote-http11/
  +  property name=component.name  value=http11/
   
 !-- The title of this component --
 property name=component.title value=Coyote HTTP/1.1 Connector/
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




DO NOT REPLY [Bug 5769] - NT Service display name should not be used as service name

2002-01-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5769.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5769

NT Service display name should not be used as service name





--- Additional Comments From [EMAIL PROTECTED]  2002-01-25 17:38 ---
Created an attachment (id=1071)
Improved option 3. Forgot to update the usage message.

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/net JSSESupport.java PureTLSSupport.java SSLSupport.java

2002-01-25 Thread larryi

larryi  02/01/25 09:54:28

  Modified:src/share/org/apache/tomcat/util/net JSSESupport.java
PureTLSSupport.java SSLSupport.java
  Log:
  Change the object returned by getPeerCertificateChain() to actually be
  Object.  This restores the ability to compile and run with JDK 1.1.8.
  This should not cause a problem since it is returned as an Object by the
  only routine that uses it,  getInfo() in Http10Interceptor.
  
  Revision  ChangesPath
  1.2   +1 -1  
jakarta-tomcat/src/share/org/apache/tomcat/util/net/JSSESupport.java
  
  Index: JSSESupport.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/net/JSSESupport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JSSESupport.java  7 Dec 2001 04:40:06 -   1.1
  +++ JSSESupport.java  25 Jan 2002 17:54:28 -  1.2
  @@ -92,7 +92,7 @@
return Unknown;
   }
   
  -public java.security.cert.Certificate[] getPeerCertificateChain()
  +public Object[] getPeerCertificateChain()
   throws IOException
   {
   // Look up the current SSLSession
  
  
  
  1.2   +1 -1  
jakarta-tomcat/src/share/org/apache/tomcat/util/net/PureTLSSupport.java
  
  Index: PureTLSSupport.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/net/PureTLSSupport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PureTLSSupport.java   7 Dec 2001 04:40:06 -   1.1
  +++ PureTLSSupport.java   25 Jan 2002 17:54:28 -  1.2
  @@ -92,7 +92,7 @@
return SSLPolicyInt.getCipherSuiteName(cs);
   }
   
  -public java.security.cert.Certificate[] getPeerCertificateChain()
  +public Object[] getPeerCertificateChain()
throws IOException
   {
Vector v=ssl.getCertificateChain();
  
  
  
  1.2   +1 -1  
jakarta-tomcat/src/share/org/apache/tomcat/util/net/SSLSupport.java
  
  Index: SSLSupport.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/net/SSLSupport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SSLSupport.java   7 Dec 2001 04:40:06 -   1.1
  +++ SSLSupport.java   25 Jan 2002 17:54:28 -  1.2
  @@ -71,7 +71,7 @@
   
   public interface SSLSupport {
   public String getCipherSuite() throws IOException;
  -public java.security.cert.Certificate[] getPeerCertificateChain()
  +public Object[] getPeerCertificateChain()
throws IOException;
   
   /**
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




DO NOT REPLY [Bug 5647] - AJP13 connector will not pass authentication requests

2002-01-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5647.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5647

AJP13 connector will not pass authentication requests

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Normal  |Blocker
   Priority|Other   |High



--- Additional Comments From [EMAIL PROTECTED]  2002-01-25 17:54 ---
Hi,
I have observed the same. The latest mod_jk has introduced the
option not to use the login information from the apche server.

May be that there is the problem.

I can run my applications with tomcat 3.2.3 and 3.3a and the authentication 
works fine.

I want to use tomcat 4.0.1 now, but basic authentication does not work with 
mod_jk and ajp 13.

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Ant2

2002-01-25 Thread Remy Maucherat

 I don't know if you follow ant-dev,

Nope.

 but there are some discussions about
 the new version of ant which are extremely scarry for me.

 Things like throwing exceptions when a property is not defined,
 changing the build.xml syntax, and so on.

 Maybe I'm crazy, but so far I did a lot of the build.xml changes every
 time a new ant was released, with all the pain of trying (without

1.5 deprecates more attrbutes, BTW (don't know if you tried building Tomcat
with it).

 success ) to make it work with the old version and the new one. I suppose
 Remy and Craig know what I'm talking about. Given that we use ant for
 testing, and we already have a lot of ant files - please at least follow
 the discussions, it'll affect us as well. I don't have the time or energy
 to try to convince Peter and the others pushing for those changes...

If we don't like Ant 2, why would we have to use it ? If it introduces big
changes in build.xml, why upgrade when Ant 1 works fine ?

Remy


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




DO NOT REPLY [Bug 6036] New: - Problems with URI mapping

2002-01-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6036.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6036

Problems with URI mapping

   Summary: Problems with URI mapping
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: PC
OS/Version: Other
Status: NEW
  Severity: Blocker
  Priority: Other
 Component: WARP Connector
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Hi,
I have a JSP File  containing this
code:

/script
/HEAD

frameset rows=40, * border=0  framespacing=0
   frame
name=Flow
scrolling=no
src=flow.jsp
marginwidth=0
marginheight=0
border=0
FRAMEBORDER=0


  /frame

  frame
name=Navigation
scrolling=auto
src=tocframe.html
  /frame
/frameset



/HTML

The Apache Server with the WARP Connector is not able to resolve the frame 
sources. If I use the same JSP with Tomcat 4.0 stand alone all works fine.

Also it works fine with the AJPConnector.

Best regards

Thomas

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




DO NOT REPLY [Bug 6037] New: - Support of distributed docbases

2002-01-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6037.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6037

Support of distributed docbases

   Summary: Support of distributed docbases
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: PC
OS/Version: Other
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: WARP Connector
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Hi,
if the WARPConnector should replace the AJP Connectors, it should support other 
docbases than webapps.

Best regards

Thomas

PS.: One of the connectors should work completely without bugs.

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Ant2

2002-01-25 Thread Pier Fumagalli

[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 I don't know if you follow ant-dev, but there are some discussions about
 the new version of ant which are extremely scarry for me.
 
 Things like throwing exceptions when a property is not defined,
 changing the build.xml syntax, and so on.
 
 Maybe I'm crazy, but so far I did a lot of the build.xml changes every
 time a new ant was released, with all the pain of trying (without
 success ) to make it work with the old version and the new one. I suppose
 Remy and Craig know what I'm talking about. Given that we use ant for
 testing, and we already have a lot of ant files - please at least follow
 the discussions, it'll affect us as well. I don't have the time or energy
 to try to convince Peter and the others pushing for those changes...

We walked down that path... James saw it, predicted it, and was kicked badly
for that... And now he's proven right... Bah...

Pier


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Ant2

2002-01-25 Thread Sam Ruby

Costin Manolache wrote:

 1.5 deprecates more attrbutes, BTW (don't know if you tried building Tomcat
 with it).

 I'll try. The attribute deprecation between 1.3 and 1.4 was IMHO completey
 unjustified, and if 1.5 does the same we'll have the same problem once
 again.

There is no need to try.  I daily build the latest Tomcat 3 against the
latest Ant...  if there every are any problems, you will find out quickly.

- Sam Ruby


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Ant2

2002-01-25 Thread costinm

On Fri, 25 Jan 2002, Sam Ruby wrote:

  I'll try. The attribute deprecation between 1.3 and 1.4 was IMHO completey
  unjustified, and if 1.5 does the same we'll have the same problem once
  again.

 There is no need to try.  I daily build the latest Tomcat 3 against the
 latest Ant...  if there every are any problems, you will find out quickly.

 - Sam Ruby

I'm actually worried about jtc and native2 - the C code is built
using ant, and I don't think this is covered by gump yet. It shouldn't be
hard if you have libtool and gcc and apache2 installed  - but the build
process is not very tested on anything but linux, and I want to be sure
everything is stable before getting it into gump.


Costin


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Tools for Building Web Services

2002-01-25 Thread Craig R. McClanahan


If your interest in Tomcat is for developing Web Services, you will be
interested in the Java Web Services Developer Pack (version 1.0ea1) that
was just released by Sun:

  http://java.sun.com/webservices

The Java WSDP includes early releases of base XML technology: JAXP 1.2
(with schema support), SOAP-based RPC (JAX-RPC), SOAP-based messaging
(JAXM), and registry client support (JAXR).  Although this is an EA1
release of the product we are targeting for this summer, we also include a
tutorial as well as a number of development features to help you get up
and running quickly, including building tools (Apache's Ant), a UDDI based
registry server for testing, some management tools (more in later EAs).
We also include a version of Apache Tomcat so develoeprs can start using
the JWSDP right away.  All of these technologies depend on J2EE 1.3 APIs.

Craig McClanahan



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger LoggerBase.java

2002-01-25 Thread amyroh

amyroh  02/01/25 12:12:20

  Modified:catalina/src/share/org/apache/catalina/logger
LoggerBase.java
  Log:
  Add debug property so it's accessible from its MBeans.
  
  Revision  ChangesPath
  1.5   +32 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/LoggerBase.java
  
  Index: LoggerBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/LoggerBase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- LoggerBase.java   6 Nov 2001 23:50:10 -   1.4
  +++ LoggerBase.java   25 Jan 2002 20:12:20 -  1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/LoggerBase.java,v
 1.4 2001/11/06 23:50:10 amyroh Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/11/06 23:50:10 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/LoggerBase.java,v
 1.5 2002/01/25 20:12:20 amyroh Exp $
  + * $Revision: 1.5 $
  + * $Date: 2002/01/25 20:12:20 $
*
* 
*
  @@ -81,7 +81,7 @@
* any property setting and lifecycle methods required for configuration.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2001/11/06 23:50:10 $
  + * @version $Revision: 1.5 $ $Date: 2002/01/25 20:12:20 $
*/
   
   public abstract class LoggerBase
  @@ -98,6 +98,12 @@
   
   
   /**
  + * The debugging detail level for this component.
  + */
  +protected int debug = 0;
  +
  +
  +/**
* The descriptive information about this implementation.
*/
   protected static final String info =
  @@ -139,6 +145,28 @@
   Container oldContainer = this.container;
   this.container = container;
   support.firePropertyChange(container, oldContainer, this.container);
  +
  +}
  +
  +
  +/**
  + * Return the debugging detail level for this component.
  + */
  +public int getDebug() {
  +
  +return (this.debug);
  +
  +}
  +
  +
  +/**
  + * Set the debugging detail level for this component.
  + *
  + * @param debug The new debugging detail level
  + */
  +public void setDebug(int debug) {
  +
  +this.debug = debug;
   
   }
   
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves ValveBase.java

2002-01-25 Thread amyroh

amyroh  02/01/25 12:12:27

  Modified:catalina/src/share/org/apache/catalina/valves ValveBase.java
  Log:
  Add debug property so it's accessible from its MBeans.
  
  Revision  ChangesPath
  1.4   +32 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/ValveBase.java
  
  Index: ValveBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/ValveBase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ValveBase.java22 Jul 2001 20:25:15 -  1.3
  +++ ValveBase.java25 Jan 2002 20:12:27 -  1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/ValveBase.java,v
 1.3 2001/07/22 20:25:15 pier Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/07/22 20:25:15 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/ValveBase.java,v
 1.4 2002/01/25 20:12:27 amyroh Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/01/25 20:12:27 $
*
* 
*
  @@ -84,7 +84,7 @@
* management and lifecycle support.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2001/07/22 20:25:15 $
  + * @version $Revision: 1.4 $ $Date: 2002/01/25 20:12:27 $
*/
   
   public abstract class ValveBase
  @@ -101,6 +101,12 @@
   
   
   /**
  + * The debugging detail level for this component.
  + */
  +protected int debug = 0;
  +
  +
  +/**
* Descriptive information about this Valve implementation.  This value
* should be overridden by subclasses.
*/
  @@ -136,6 +142,28 @@
   public void setContainer(Container container) {
   
   this.container = container;
  +
  +}
  +
  +
  +   /**
  + * Return the debugging detail level for this component.
  + */
  +public int getDebug() {
  +
  +return (this.debug);
  +
  +}
  +
  +
  +/**
  + * Set the debugging detail level for this component.
  + *
  + * @param debug The new debugging detail level
  + */
  +public void setDebug(int debug) {
  +
  +this.debug = debug;
   
   }
   
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




StandardSession.expire() race?

2002-01-25 Thread Christopher K. St. John


 There's code in StandardSession that looks like this:

  public void expire(boolean notify)
if (expiring)
return;
expiring = true;

 The test isn't thread safe, and it looks like it's 
possible to have expire() called from the StandardManager
reaper thread and a servlet thread (through invalidate)
simultaneously.

 'expiring' is tested in other places in StandardSession,
but I'm not sure enough of the possible call paths to tell
offhand if they're also dangerous.

 I think it would be enough to declare expire volatile
and put a synchronized block around the test-and-set
in expire(), but I wanted to double check my logic 
before I submitted a patch...
  

-- 
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Ant2

2002-01-25 Thread Remy Maucherat

 On Fri, 25 Jan 2002, Remy Maucherat wrote:

  If we don't like Ant 2, why would we have to use it ? If it introduces
big
  changes in build.xml, why upgrade when Ant 1 works fine ?

 Sooner or later ant2 will be released and people will start using it in
 some projects - we can stick with ant1.4 if we want, but other projects
 will use ant1.5, some may stick with ant1.3 - it'll be a nightmare to
 build any collection of projects.
 And gump can't do too much - if you make build.xml work with ant2 it'll no
 longer work with ant1.4, same for the reverse.


 The problem is that the differences between 1.3 - 1.4 - 1.5 that caused us
 a lot of trouble are nothing compared with what seems to be happening in
 ant2. It would be much better getting ant2 to be (reasonably) backward
 compatible in the DTD than sticking with ant1.4.

I'm subscribed to ant-dev now to try to follow what's going on.
I really DO hope it'll end up being compatible with either 1.4 or 1.5.
They'll definitely hear me complain if that's not the case (although I guess
they probably won't care).

 P.S. I can volunteer to write the Makefiles, since soon this may be the
 cleanest way to build tomcat...

Lol. I hope it won't end up being true, so I'll take it as a joke (for now)
:)

Remy


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Ant2

2002-01-25 Thread Josh Nylander

I know little of ant and probably less about this particular issue but I thought XSL 
Stylesheets were supposed to make it relatively painless to go between different XML 
files.  Take you build.xml and pase it throught the approriate XSL Stylesheet for the 
build.xml file and the ant version.  Just my $0.02

Josh

 [EMAIL PROTECTED] 01/25/02 01:35PM 
 On Fri, 25 Jan 2002, Remy Maucherat wrote:

  If we don't like Ant 2, why would we have to use it ? If it introduces
big
  changes in build.xml, why upgrade when Ant 1 works fine ?

 Sooner or later ant2 will be released and people will start using it in
 some projects - we can stick with ant1.4 if we want, but other projects
 will use ant1.5, some may stick with ant1.3 - it'll be a nightmare to
 build any collection of projects.
 And gump can't do too much - if you make build.xml work with ant2 it'll no
 longer work with ant1.4, same for the reverse.


 The problem is that the differences between 1.3 - 1.4 - 1.5 that caused us
 a lot of trouble are nothing compared with what seems to be happening in
 ant2. It would be much better getting ant2 to be (reasonably) backward
 compatible in the DTD than sticking with ant1.4.

I'm subscribed to ant-dev now to try to follow what's going on.
I really DO hope it'll end up being compatible with either 1.4 or 1.5.
They'll definitely hear me complain if that's not the case (although I guess
they probably won't care).

 P.S. I can volunteer to write the Makefiles, since soon this may be the
 cleanest way to build tomcat...

Lol. I hope it won't end up being true, so I'll take it as a joke (for now)
:)

Remy


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




DO NOT REPLY [Bug 5861] - java.lang.NumberFormatException when using non-standard HTTP headers with length of 8 characters and non numeric value

2002-01-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5861.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5861

java.lang.NumberFormatException when using non-standard HTTP headers with length of 8 
characters and non numeric value





--- Additional Comments From [EMAIL PROTECTED]  2002-01-25 22:52 ---
Created an attachment (id=1073)
A JSP test which will cause the NumberFormatException when directed at a Tomcat 
server. Tested against 4.0.1 final.

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans MBeanUtils.java

2002-01-25 Thread amyroh

amyroh  02/01/25 15:15:09

  Modified:catalina/src/share/org/apache/catalina/mbeans
MBeanUtils.java
  Log:
  Add sequence parameter to MBean object names for Valves
  so it returns unique names for each Valve Mbean
  
  Revision  ChangesPath
  1.16  +33 -12
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java
  
  Index: MBeanUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- MBeanUtils.java   24 Jan 2002 19:26:11 -  1.15
  +++ MBeanUtils.java   25 Jan 2002 23:15:09 -  1.16
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
 1.15 2002/01/24 19:26:11 craigmcc Exp $
  - * $Revision: 1.15 $
  - * $Date: 2002/01/24 19:26:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
 1.16 2002/01/25 23:15:09 amyroh Exp $
  + * $Revision: 1.16 $
  + * $Date: 2002/01/25 23:15:09 $
*
* 
*
  @@ -106,7 +106,7 @@
*
* @author Craig R. McClanahan
* @author Amy Roh
  - * @version $Revision: 1.15 $ $Date: 2002/01/24 19:26:11 $
  + * @version $Revision: 1.16 $ $Date: 2002/01/25 23:15:09 $
*/
   
   public class MBeanUtils {
  @@ -144,6 +144,14 @@
   private static MBeanServer mserver = createServer();
   
   
  +/**
  + * The sequence number for Valve
  + */
  +private static int contextValveSequence = 0;
  +private static int hostValveSequence = 0;
  +private static int engineValveSequence = 0;
  +
  +
   // - Static Methods
   
   
  @@ -1019,13 +1027,21 @@
   
   if (container instanceof Engine) {
   Service service = ((Engine)container).getService();
  -name = new ObjectName(domain + :type=Valve,service= +
  -  service.getName());  //FIX ME - add sequence #
  +Integer sequenceInt = new Integer(engineValveSequence);
  +String sequenceStr = sequenceInt.toString();
  +name = new ObjectName(domain + :type=Valve,sequence= +
  +sequenceStr + ,service= +
  +service.getName());
  +engineValveSequence++;
   } else if (container instanceof Host) {
   Service service = ((Engine)container.getParent()).getService();
  -name = new ObjectName(domain + :type=Valve,host= +
  -  container.getName() + ,service= +
  -  service.getName());  //FIX ME - add sequence #
  +Integer sequenceInt = new Integer(hostValveSequence);
  +String sequenceStr = sequenceInt.toString();
  +name = new ObjectName(domain + :type=Valve,sequence= +
  +sequenceStr + ,host= +
  +container.getName() + ,service= +
  +service.getName());
  +hostValveSequence++;
   } else if (container instanceof Context) {
   String path = ((Context)container).getPath();
   if (path.length()  1) {
  @@ -1033,9 +1049,14 @@
   }
   Host host = (Host) container.getParent();
   Service service = ((Engine)container.getParent()).getService();
  -name = new ObjectName(domain + :type=Valve,path= + path +
  -  ,host= + host.getName() + ,service= +
  -  service.getName());  //FIX ME - add sequence #
  +Integer sequenceInt = new Integer(contextValveSequence);
  +String sequenceStr = sequenceInt.toString();
  +name = new ObjectName(domain + :type=Valve,sequence= +
  +sequenceStr + ,path= +
  +path + ,host= +
  +host.getName() + ,service= +
  +service.getName());
  +contextValveSequence++;
   }
   
   return (name);
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans ServerLifecycleListener.java

2002-01-25 Thread amyroh

amyroh  02/01/25 16:02:16

  Modified:catalina/src/share/org/apache/catalina/core
StandardServer.java
   catalina/src/share/org/apache/catalina/mbeans
ServerLifecycleListener.java
  Log:
  Remove unnecessary line and fix comments.
  
  Revision  ChangesPath
  1.20  +4 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java
  
  Index: StandardServer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- StandardServer.java   25 Jan 2002 23:57:55 -  1.19
  +++ StandardServer.java   26 Jan 2002 00:02:16 -  1.20
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java,v
 1.19 2002/01/25 23:57:55 amyroh Exp $
  - * $Revision: 1.19 $
  - * $Date: 2002/01/25 23:57:55 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java,v
 1.20 2002/01/26 00:02:16 amyroh Exp $
  + * $Revision: 1.20 $
  + * $Date: 2002/01/26 00:02:16 $
*
* 
*
  @@ -92,7 +92,7 @@
* (but not required) when deploying and starting Catalina.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.19 $ $Date: 2002/01/25 23:57:55 $
  + * @version $Revision: 1.20 $ $Date: 2002/01/26 00:02:16 $
*/
   
   public final class StandardServer
  @@ -348,7 +348,6 @@
   public void addService(Service service) {
   
   service.setServer(this);
  -Service oldServices[] = this.services;
   
   synchronized (services) {
   Service results[] = new Service[services.length + 1];
  
  
  
  1.14  +6 -6  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java
  
  Index: ServerLifecycleListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ServerLifecycleListener.java  25 Jan 2002 23:57:55 -  1.13
  +++ ServerLifecycleListener.java  26 Jan 2002 00:02:16 -  1.14
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v
 1.13 2002/01/25 23:57:55 amyroh Exp $
  - * $Revision: 1.13 $
  - * $Date: 2002/01/25 23:57:55 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v
 1.14 2002/01/26 00:02:16 amyroh Exp $
  + * $Revision: 1.14 $
  + * $Date: 2002/01/26 00:02:16 $
*
* 
*
  @@ -104,7 +104,7 @@
*
* @author Craig R. McClanahan
* @author Amy Roh
  - * @version $Revision: 1.13 $ $Date: 2002/01/25 23:57:55 $
  + * @version $Revision: 1.14 $ $Date: 2002/01/26 00:02:16 $
*/
   
   public class ServerLifecycleListener
  @@ -613,14 +613,12 @@
   MBeanUtils.createMBean((Manager) newValue);
   }
   } else if (realm.equals(propertyName)) {
  -// removeService() has non-null oldValue
   if (oldValue != null) {
   if (debug = 5) {
   log(Removing MBean for Realm  + oldValue);
   }
   MBeanUtils.destroyMBean((Realm) oldValue);
   }
  -// addService() has non-null newValue
   if (newValue != null) {
   if (debug = 5) {
   log(Creating MBean for Realm  + newValue);
  @@ -628,12 +626,14 @@
   MBeanUtils.createMBean((Realm) newValue);
   }
   } else if (service.equals(propertyName)) {
  +// removeService() has non-null oldValue
   if (oldValue != null) {
   if (debug = 5) {
   log(Removing MBean for Service  + oldValue);
   }
   MBeanUtils.destroyMBean((Service) oldValue);
   }
  +// addService() has non-null newValue
   if (newValue != null) {
   if (debug = 5) {
   log(Creating MBean for Service  + newValue);
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




DO NOT REPLY [Bug 5881] - DB2 JDBC: no suitable driver!

2002-01-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5881.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5881

DB2 JDBC: no suitable driver!





--- Additional Comments From [EMAIL PROTECTED]  2002-01-26 00:44 ---
Thanks for the explanation.

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans mbeans-descriptors.xml

2002-01-25 Thread craigmcc

craigmcc02/01/25 16:59:43

  Modified:catalina/src/share/org/apache/catalina/mbeans
mbeans-descriptors.xml
  Log:
  Expose the save() operation on the UserDatabase MBean, so that the admin
  app can ask the database to save itself to persistent storage (if needed).
  
  Revision  ChangesPath
  1.23  +7 -1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- mbeans-descriptors.xml24 Jan 2002 20:40:42 -  1.22
  +++ mbeans-descriptors.xml26 Jan 2002 00:59:42 -  1.23
  @@ -6,7 +6,7 @@
   !--
Descriptions of JMX MBeans for Catalina
   
  - $Id: mbeans-descriptors.xml,v 1.22 2002/01/24 20:40:42 craigmcc Exp $
  + $Id: mbeans-descriptors.xml,v 1.23 2002/01/26 00:59:42 craigmcc Exp $
--
   
   mbeans-descriptors
  @@ -750,6 +750,12 @@
 parameter name=username
 description=User name of the user to remove
type=java.lang.String/
  +/operation
  +
  +operation   name=save
  +  description=Save current users and groups to persistent storage
  +   impact=ACTION
  +   returnType=void
   /operation
   
 /mbean
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: mod_jk bug ?

2002-01-25 Thread Remy Maucherat

  Hi,
 
  I encountered the following error when accessing any java
  servlet(e.g.http://localhost/servlet/SnoopServlet) through
  Internet Explorer
  of PocketPC :

 Maybe IE for PocketPc is sending some kind of malformed HTTP Request?

 Or mod_jk native and/or Java part has bug?

 Please post a bug a http://nagoya.apache.org/bugzilla , TIA.

This looks like #5861, which I think should be fixed for 4.0.2 final.
There's a patch included with the bug, so if someone could take a look at it
and commit it if it's correct, that would be great.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5861

Thanks,
Remy


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




[FAQ] jGuru FAQ Update

2002-01-25 Thread Alex Chaffee

jGuru maintains FAQs and Forums on Servlets, JSP, and Tomcat (as well as
many other Java topics).  Here is an automated update on recent postings to
Tomcat-related FAQs.  Please direct flames and feedback to [EMAIL PROTECTED] .

 - Alex


++ JavaServer Pages (JSP) FAQ: http://www.jguru.com/faq/JSP

How can I get the complete URL address
(like www.jguru.com (with or without http://;)) from a HttpServletRequest?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=734942

Is there any justification in creating a cache that maintains values pulled from a 
given property file so that your app does not have to continually getProperty() on the 
same property over and over again?
p
I suppose the key question is: How much of a performance hit is it to access a 
property file as opposed to maintaining a cache (HashMap) of key / value pairs?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=733887

Can someone explain to me what this code does and what situations it needs to used?

lt;headgt;
lt;meta http-equiv=refresh content=0; url=/targetpage.jsp /gt;
lt;/headgt;
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=731186

++ Tomcat FAQ: http://www.jguru.com/faq/Tomcat

Reverse Proxying and Redirection issue.
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=734227


You can shut email notification off at the FAQ home
page(s) or:

  http://www.jguru.com/guru/notifyprefs.jsp



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardWrapper.java

2002-01-25 Thread craigmcc

craigmcc02/01/25 18:01:57

  Modified:catalina/src/share/org/apache/catalina/core
StandardWrapper.java
  Log:
  Remove the undocumented (and needless) restriction that container provided
  servlets must have a fully qualified name starting with org.apache.catalina.
  
  Change the name of isContainerServlet() to isContainerProvidedServlet() to
  better distinguish the fact that we're checking which class loader to use
  (in other words, was this servlet found in server/classes or server/lib) --
  checking for a ContainerServlet can be done later (when necessary) with an
  instanceof check.
  
  Revision  ChangesPath
  1.36  +19 -12
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
  
  Index: StandardWrapper.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- StandardWrapper.java  11 Dec 2001 18:56:03 -  1.35
  +++ StandardWrapper.java  26 Jan 2002 02:01:56 -  1.36
  @@ -1,13 +1,13 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
 1.35 2001/12/11 18:56:03 remm Exp $
  - * $Revision: 1.35 $
  - * $Date: 2001/12/11 18:56:03 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
 1.36 2002/01/26 02:01:56 craigmcc Exp $
  + * $Revision: 1.36 $
  + * $Date: 2002/01/26 02:01:56 $
*
* 
*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -102,7 +102,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.35 $ $Date: 2001/12/11 18:56:03 $
  + * @version $Revision: 1.36 $ $Date: 2002/01/26 02:01:56 $
*/
   
   public final class StandardWrapper
  @@ -852,8 +852,8 @@
   
   ClassLoader classLoader = loader.getClassLoader();
   
  -// Special case class loader for a Catalina internal servlet
  -if (isContainerServlet(actualClass)) {
  +// Special case class loader for a container provided servlet
  +if (isContainerProvidedServlet(actualClass)) {
   classLoader = this.getClass().getClassLoader();
   log(sm.getString
 (standardWrapper.containerServlet, getName()));
  @@ -905,7 +905,7 @@
   
   // Special handling for ContainerServlet instances
   if ((servlet instanceof ContainerServlet) 
  -isContainerServlet(actualClass)) {
  +isContainerProvidedServlet(actualClass)) {
   ((ContainerServlet) servlet).setWrapper(this);
   }
   
  @@ -1203,16 +1203,23 @@
   
   /**
* Return codetrue/code if the specified class name represents a
  - * container class that should be loaded by the system class loader.
  + * container provided servlet class that should be loaded by the
  + * server class loader.
*
* @param name Name of the class to be checked
*/
  -private boolean isContainerServlet(String classname) {
  +private boolean isContainerProvidedServlet(String classname) {
   
  -if (classname.startsWith(org.apache.catalina.))
  +if (classname.startsWith(org.apache.catalina.)) {
   return (true);
  -else
  +}
  +try {
  +Class clazz =
  +this.getClass().getClassLoader().loadClass(classname);
  +return (ContainerServlet.class.isAssignableFrom(clazz));
  +} catch (Throwable t) {
   return (false);
  +}
   
   }
   
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Proposal for a new realm module for tomcat

2002-01-25 Thread Tony Dahbura

John:
Sorry I have been really busy and have not had a chance to followup on my emails.
The original author of the sdk is actually back doing continuing work on it.  Yes
indeed you can replace the ldap provider with the one from iplanet and it gets you
much better session and connection recovery.

I actually spent a bit of time working on a native ldap implementation, not using
jndi, and put in conn pooling and other features.  I think I would like to look at
rolling these into the base line jndi implementation as well and leave folks with
an option to choose either realm implementation they would like to use with tomcat.

How about I pick up the jndi module and work on it a bit to get some of these
features in.  BTW if you want to take a look at the native ldap realm module you
can grab it from my web site.  http://www.dahbura.com/ldap  I thought if folks
liked it and wanted to use it we could include it in the base build for tomcat.

Should I just take the current snapshot in there and work on it or does it need to
be checked out?

Tony


John Holman wrote:

 At 21:41 04/01/02, Tony Dahbura wrote:
 John:
 There are other issues with the JNDI implementation that we have run into
 with some
 commercial high end load balancers.  It has to do with connection
 re-authentication
 and sessions getting dropped on non used connections.
   I did some work on the actual
 API for the Netscape LDAP implementation and we puti n handling of this
 situation
 as well. It really from a programmer perspective looks the same but
 handles a lot
 of low level details with regards to server connections that work better
 in a many
 HA settings.

 Our own requirements are quite modest and this has not been a problem so
 far. However I'm sure others would benefit from a robust and high
 performing implementation.

 I know little about the Netscape Directory SDK, but was under the
 impression that the API it offers to programmers for access to directory
 services is very different to JNDI. However, looking at the Mozilla site
 today I noticed that an LDAP provider for JNDI is included in version 4.1
 of the SDK. Were you perhaps contemplating using JNDI with this Netscape
 LDAP provider rather than the Netscape LDAP API itself? If so, does the
 Netscape LDAP provider for JNDI have advantages over Sun's version (other
 than being open source of course) and are there still active developers?
 (My impression was that there has been little activity over the last year).

 My feeling initially is that if we can work around any disadvantages it
 would be best to stay with the JNDI API to directory services but allow for
 a choice of LDAP providers.

 I would love to work with you on the proposal for this. As I have indicated I
 started a wish list of things to code in this realm module you hit many of the
 points of what I was looking at doing.  I agree for many folks the JNDI
 implementation can suit much of their needs, I have just run across some
 folks that
 wanted better support for more diverse network environments.

 I'd be happy to cooperate on this.

 Let's flesh this out and see what comes from it.
 
 Tony
 
 
 John Holman wrote:
 
   At 04:28 04/01/02, Tony Dahbura wrote:
   I would like to see about proposing the development of an additional realm
   module for tomcat.  I have begun some design on this and think it will
   meet the
   needs of many folks out there utilizing LDAP.  I would like to propose a
   native
   LDAP realm module that allows utlization of ldap features that may or may
   not be
   possible through the JNDI layer.
  
   As far as I can see, writing a native LDAP realm module - if by that you
   mean using the API provided by the Netscape directory SDK rather than Sun's
   JNDI API - would make little difference to the functionality possible.
   There may be performance benefits, though I have read conflicting reports
   on that.
  
   The items I am looking at designing into this module are:
   1-Connection pooling to support high performance access
   2-HA capabilities to support failover if a server goes away
   3-Authentication via the server rather than comparison of the passwords in
   digested forms (this option will also be supported)
   4-support for other realm group models (still checking into this).
   5-User location without DN identification (no need to be able to build the
   DN to
   find the user)
   6-SSL support for communications
  
   Some history ...
  
   The current JNDIRealm implementation in Tomcat 4 is based on code I
   proposed back in April last year. I believe the existing implementation is
   sufficiently flexible to cover most ways of representing group information
   in the directory (item 4), and adding SSL support (item 6) should be
   trivial. However item 3 (authentication by binding to the directory as the
   user rather than by retrieving credentials and comparing them explicitly in
   the realm) and feature 5 (essentially, finding the user's DN by searching
   

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp RequestHandler.java

2002-01-25 Thread seguin

seguin  02/01/25 20:58:29

  Modified:jk/java/org/apache/ajp RequestHandler.java
  Log:
  fix for bug 5861 -- NumberFormatException when non-standard HTTP header
  with length of 8 characters and non-numeric value is part of request.
  
  patch submitted by ruediger.pluem at vodafone-telecommerce.de.
  
  thanks to Nick Wesselman for the test case :)
  
  Revision  ChangesPath
  1.9   +20 -13
jakarta-tomcat-connectors/jk/java/org/apache/ajp/RequestHandler.java
  
  Index: RequestHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/RequestHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- RequestHandler.java   13 Dec 2001 23:32:54 -  1.8
  +++ RequestHandler.java   26 Jan 2002 04:58:29 -  1.9
  @@ -281,28 +281,35 @@
MessageBytes vMB=null;
   isc = 0xFF00;
   if(0xA000 == isc) {
  +//
  +// header name is encoded as an int
  +//
   msg.getInt(); // To advance the read position
   hName = headerTransArray[hId - 1];
vMB= headers.addValue(hName);
  +msg.getMessageBytes(vMB);
  +
  +if (hId == SC_REQ_CONTENT_LENGTH) {
  +// just read content-length header
  +int contentLength = (vMB == null) ? -1 : vMB.getInt();
  +req.setContentLength(contentLength);
  +} else if (hId == SC_REQ_CONTENT_TYPE) {
  +// just read content-type header
  +ByteChunk bchunk = vMB.getByteChunk();
  +req.contentType().setBytes(bchunk.getBytes(),
  +   bchunk.getOffset(),
  +   bchunk.getLength());
  +}
   } else {
  +//
  +// header name is a string
  +//
// XXX Not very elegant
vMB = msg.addHeader(headers);
if (vMB == null) {
   return 500; // wrong packet
   }
  -}
  -
  -msg.getMessageBytes(vMB);
  -
  -// set content length, if this is it...
  -if (hId == SC_REQ_CONTENT_LENGTH) {
  -int contentLength = (vMB == null) ? -1 : vMB.getInt();
  -req.setContentLength(contentLength);
  -} else if (hId == SC_REQ_CONTENT_TYPE) {
  -ByteChunk bchunk = vMB.getByteChunk();
  -req.contentType().setBytes(bchunk.getBytes(),
  -   bchunk.getOffset(),
  -   bchunk.getLength());
  +msg.getMessageBytes(vMB);
   }
   }
   
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




DO NOT REPLY [Bug 5861] - java.lang.NumberFormatException when using non-standard HTTP headers with length of 8 characters and non numeric value

2002-01-25 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5861.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5861

java.lang.NumberFormatException when using non-standard HTTP headers with length of 8 
characters and non numeric value

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-01-26 05:02 ---
i have tested and committed the patch provided in the HEAD of the j-t-c 
repository.

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: mod_jk bug ?

2002-01-25 Thread Kevin Seguin

 
   Hi,
  
   I encountered the following error when accessing any java
   servlet(e.g.http://localhost/servlet/SnoopServlet) through
   Internet Explorer
   of PocketPC :
 
  Maybe IE for PocketPc is sending some kind of malformed 
 HTTP Request?
 
  Or mod_jk native and/or Java part has bug?
 
  Please post a bug a http://nagoya.apache.org/bugzilla , TIA.
 
 This looks like #5861, which I think should be fixed for 4.0.2 final.
 There's a patch included with the bug, so if someone could 
 take a look at it
 and commit it if it's correct, that would be great.
 
 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5861
 

i've tested and committed the patch.  

good catch guys - thanks!

-kevin.

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_channel.h

2002-01-25 Thread costin

costin  02/01/25 22:17:47

  Modified:jk/native2/include jk_channel.h
  Log:
  Added before/after request hooks to channel.
  
  Used to get resources that will be used for request processing ( instead
  of getting them on each message ) - that's the attach to vm in the case
  of the jni channel.
  
  Revision  ChangesPath
  1.5   +34 -2 jakarta-tomcat-connectors/jk/native2/include/jk_channel.h
  
  Index: jk_channel.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_channel.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jk_channel.h  16 Dec 2001 23:17:23 -  1.4
  +++ jk_channel.h  26 Jan 2002 06:17:47 -  1.5
  @@ -63,6 +63,7 @@
   #include jk_logger.h
   #include jk_pool.h
   #include jk_msg.h
  +#include jk_service.h
   
   #ifdef __cplusplus
   extern C {
  @@ -106,6 +107,18 @@
*  and the setting code can better report errors.
*/
   char **supportedProperties;
  +
  +/* JK_TRUE if the channel is 'stream' based, i.e. it works using
  +   send() followed by blocking reads().
  +   XXX make it type and define an enum of supported types ?
  +
  +   The only alternative right now is JNI ( and doors ), where
  +   a single thread is used. After the first packet is sent the
  +   java side takes control and directly dispatch messages using the
  +   jni  ( XXX review - it would be simple with continuations, but
  +   send/receive flow is hard to replicate on jni ) 
  +*/
  +int is_stream;
   
   struct jk_worker *worker; 
   jk_map_t *properties;
  @@ -137,14 +150,33 @@
  */
   int (JK_METHOD *send)(struct jk_env *env, jk_channel_t *_this,
  struct jk_endpoint *endpoint,
  -   char *b, int len );
  +  struct jk_msg *msg );
   
   /** Receive a packet
*/
   int (JK_METHOD *recv)(struct jk_env *env, jk_channel_t *_this,
  struct jk_endpoint *endpoint,
  -   char *b, int len );
  +  struct jk_msg *msg );
  +
  +/** Called before request processing, to initialize resources.
  +All following calls will be in the same thread.
  + */
  +int (JK_METHOD *beforeRequest)(struct jk_env *env, jk_channel_t *_this,
  +   struct jk_worker *worker,
  +   struct jk_endpoint *endpoint,
  +   struct jk_ws_service *r );
  +   
  +/** Called after request processing. Used to be worker.done()
  + */
  +int (JK_METHOD *afterRequest)(struct jk_env *env, jk_channel_t *_this,
  +  struct jk_worker *worker,
  +  struct jk_endpoint *endpoint,
  +  struct jk_ws_service *r );
  +   
  +
  +
   
  +/* XXX remove for now, add later in all objects */
   /** Set a channel property. Properties are used to configure the 
* communication channel ( example: port, host, file, shmem_name, etc).
*/
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_endpoint.h

2002-01-25 Thread costin

costin  02/01/25 22:20:10

  Modified:jk/native2/include jk_endpoint.h
  Log:
  Added few more fields needed to store data associated with the endpoint. We really
  need some 'notes' or generic attributes here.
  
  Removed the old interface methods. Service is now part of worker, where it belongs.
  Having it in endpoint required the worker implementation to also implement an
  endpoint and made things complex.
  
  Aquiring and releasing endpoints ( or even using endpoints at all ) is also
  left to the worker - as it was in the past, except that now it's not required.
  In fact most 'non-protocol' workers do not need that at all. ( see next commits )
  
  Revision  ChangesPath
  1.10  +10 -20jakarta-tomcat-connectors/jk/native2/include/jk_endpoint.h
  
  Index: jk_endpoint.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_endpoint.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- jk_endpoint.h 31 Dec 2001 19:15:12 -  1.9
  +++ jk_endpoint.h 26 Jan 2002 06:20:10 -  1.10
  @@ -61,7 +61,7 @@
* Author:  Gal Shachor [EMAIL PROTECTED]   
* Author:  Dan Milstein [EMAIL PROTECTED]
* Author:  Henri Gomez [EMAIL PROTECTED]   
  - * Version: $Revision: 1.9 $  
  + * Version: $Revision: 1.10 $  
***/
   
   #ifndef JK_ENDPOINT_H
  @@ -128,6 +128,15 @@
*/
   void *channelData;
   
  +/* Ok, this is going to be a Notes - similar with what we have on the
  + * java side. Various channels need to be able to store private data.
  + */
  +void *currentData;
  +int currentOffset;
  +int currentLen;
  +
  +struct jk_ws_service *currentRequest;
  +
   struct jk_worker *worker;
   
   /** 'main' pool for this endpoint. Used to store properties of the
  @@ -172,25 +181,6 @@
   unsigned long negociated;
   
   char *servletContainerName;
  -
  -/*
  - * Forward a request to the servlet engine.  The request is described
  - * by the jk_ws_service_t object.  I'm not sure exactly how
  - * is_recoverable_error is being used.  
  - */
  -int (JK_METHOD *service)(struct jk_env *env, jk_endpoint_t *_this, 
  - struct jk_ws_service *s,
  - int *is_recoverable_error);
  -
  -/*
  - * Called when this particular endpoint has finished processing a
  - * request.  For some protocols (e.g. ajp12), this frees the memory
  - * associated with the endpoint.  For others (e.g. ajp13/ajp14), this can
  -  * return the endpoint to a cache of already opened endpoints.  
  - * XXX This is the 'pair' of worker.getEndpoint - it should be part of
  - * worker.
  - */
  -int (JK_METHOD *done)(struct jk_env *env, jk_endpoint_t *p );
   };
   
   #ifdef __cplusplus
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_msg.h

2002-01-25 Thread costin

costin  02/01/25 22:22:41

  Modified:jk/native2/include jk_msg.h
  Log:
  Removed the sent/receive methods. They were duplicated in channel, and made 
impossible
  or difficult to do some optimizations. Jni channel ( or most message-based - doors,
  fifo, etc ) do not need to read the header in a separate operation. Even for socket,
  it may be better to read as much as available ( buffering ) - that could be
  implemented in the apr channel.
  
  Revision  ChangesPath
  1.4   +11 -13jakarta-tomcat-connectors/jk/native2/include/jk_msg.h
  
  Index: jk_msg.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_msg.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_msg.h  16 Dec 2001 23:17:23 -  1.3
  +++ jk_msg.h  26 Jan 2002 06:22:41 -  1.4
  @@ -106,7 +106,11 @@
   /** Method id - to be sent in the packet
*/
   int id;
  - 
  +
  +/** Header length for this message
  + */
  +int headerLength;
  +
   /*
* Prepare the buffer for a new invocation 
*/
  @@ -117,6 +121,9 @@
*/
   void (*end)(struct jk_env *env, struct jk_msg *_this);
   
  +int (*checkHeader)(struct jk_env *env, struct jk_msg *_this,
  +struct jk_endpoint *e);
  +
   /*
* Dump the buffer header
*   @param err Message text
  @@ -158,18 +165,9 @@
   The buffer is internal to the message, you must save
   or make sure the message lives long enough.
*/ 
  -unsigned char *(*getBytes)(struct jk_env *env, struct jk_msg *_this, int *len);
  -
  -
  -/*
  - * Receive a message from endpoint
  - */
  -int (*receive)(struct jk_env *env, jk_msg_t *_this, struct jk_endpoint *ae );
  -
  -/*
  - * Send a message to endpoint
  - */
  -int (*send)(struct jk_env *env, jk_msg_t *_this, struct jk_endpoint *ae );
  +unsigned char *(*getBytes)(struct jk_env *env,
  +   struct jk_msg *_this,
  +   int *len);
   
   /** 
* Special method. Will read data from the server and add them as
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_service.h

2002-01-25 Thread costin

costin  02/01/25 22:25:56

  Modified:jk/native2/include jk_service.h
  Log:
  Moved that strange is_recoverable_error in request instead of passing it
  as argument to all methods.
  
  The real meaning ( not easy to discover :-) is if the request can be safely
  sent to a fallback worker. It is used by lb, but all workers doing active
  processing must set it ( or leave a default FALSE ).
  
  Init() method will now use the worker, not the endpoint. It is perfectly
  possible to recycle requests or preinit them or anything else - they don't
  depend on a particular connection.
  
  ( I also added flush, probably not needed but I have a feeling it's missing )
  
  Revision  ChangesPath
  1.8   +16 -2 jakarta-tomcat-connectors/jk/native2/include/jk_service.h
  
  Index: jk_service.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_service.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- jk_service.h  16 Dec 2001 23:17:23 -  1.7
  +++ jk_service.h  26 Jan 2002 06:25:56 -  1.8
  @@ -63,7 +63,7 @@
* Author:  Gal Shachor [EMAIL PROTECTED]   *
* Author:  Dan Milstein [EMAIL PROTECTED]*
* Author:  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.7 $   *
  + * Version: $Revision: 1.8 $   *
***/
   
   #ifndef JK_SERVICE_H
  @@ -122,6 +122,15 @@
*/
   struct jk_ws_service {
   struct jk_workerEnv *workerEnv;
  +
  +/* JK_TRUE if a 'recoverable' error happened. That means a
  + * lb worker can retry on a different worker, without
  + * loosing any information. If JK_FALSE, an error will be reported
  + * to the client
  + */
  +int is_recoverable_error;
  +
  +struct jk_worker *realWorker;
   
   /* 
* A 'this' pointer which is used by the subclasses of this class to
  @@ -230,7 +239,7 @@
   /* Initialize the service structure
*/
   int (*init)( struct jk_env *env, jk_ws_service_t *_this,
  - struct jk_endpoint *e, void *serverObj);
  + struct jk_worker *w, void *serverObj);
   
   /* Post request cleanup.
*/
  @@ -257,6 +266,11 @@
*/
   int (JK_METHOD *write)(struct jk_env *env, jk_ws_service_t *s,
  const void *buffer, int len);
  +
  +/*
  + * Flush the output buffers.
  + */
  +int (JK_METHOD *flush)(struct jk_env *env, jk_ws_service_t *s );
   };
   
   #ifdef __cplusplus
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_worker.h

2002-01-25 Thread costin

costin  02/01/25 22:41:51

  Modified:jk/native2/include jk_worker.h
  Log:
  Added a cache for requests. Right now we recycle the pools ( it used to be part
  of the endpoint logic, I just preserved it ). It would make more sense to
  recycle the whole request, like we do in java - or don't bother at all,
  allocation is much cheaper ( and is even cheaper if apr_pools are used -
  the jk_pool does a malloc ). For now I'll leave it how it was.
  
  Get endpoint is gone, it's up to the worker to use an endpoint if it wants
  and how it uses it. Service is in - that's what the worker is supposed to do.
  
  Revision  ChangesPath
  1.10  +19 -24jakarta-tomcat-connectors/jk/native2/include/jk_worker.h
  
  Index: jk_worker.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_worker.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- jk_worker.h   16 Dec 2001 23:17:23 -  1.9
  +++ jk_worker.h   26 Jan 2002 06:41:51 -  1.10
  @@ -58,7 +58,7 @@
   /***
* Description: Workers controller header file *
* Author:  Gal Shachor [EMAIL PROTECTED]   * 
  - * Version: $Revision: 1.9 $   *
  + * Version: $Revision: 1.10 $   *
***/
   
   #ifndef JK_WORKER_H
  @@ -102,10 +102,6 @@
* There is also a load balancing worker (jk_lb_worker.c), which itself
* manages a group of workers.
*
  - * Web servers are configured to forward requests to a given worker.  To
  - * handle those requests, the worker's get_endpoint method is called, and
  - * then the service() method of that endpoint is called.
  - *
* As with all the core jk classes, this is essentially an abstract base
* class which is implemented/extended by classes which are specific to a
* particular protocol (or request-handling system).  By using an abstract
  @@ -124,7 +120,8 @@
* imagine that you are seeing the internal vtables of your favorite OO
* language.  Whatever works for you.
*
  - * See jk_ajp14_worker.c, jk_ajp13_worker.c and jk_ajp12_worker.c for examples.  
  + * See jk_ajp14_worker.c, jk_worker_status for examples.  
  + *
*/
   struct jk_worker {
   
  @@ -159,6 +156,10 @@
   /** Reuse the endpoint and it's connection
*/
   struct jk_objCache *endpointCache;
  +
  +/** Request pool cache. XXX We may use reqCache.
  + */
  +struct jk_objCache *rPoolCache;
   
   /* 
* Open connections cache...
  @@ -214,34 +215,28 @@
   /*
* Do whatever initialization needs to be done to start this worker up.
* Configuration options are passed in via the props parameter.  
  + *
  + * You can skip this by setting it to NULL.
*/
   int (JK_METHOD *init)(struct jk_env *env, jk_worker_t *_this,
 struct jk_map *props,
 struct jk_workerEnv *we );
   
   /*
  - * Obtain an endpoint to service a particular request.  A pointer to
  - * the endpoint is stored in pend. The done() method in the
  - * endpoint will be called when the endpoint is no longer needed.
  + * Shutdown this worker. XXX Some cleanup must be made by default
  + * by workerEnv, so we don't need to duplicate the code.
*/
  -int (JK_METHOD *get_endpoint)(struct jk_env *env, jk_worker_t *_this,
  -  struct jk_endpoint **pend );
  +int (JK_METHOD *destroy)(struct jk_env *env, jk_worker_t *_thisP );
   
   /*
  - * Called when this particular endpoint has finished processing a
  - * request.  For some protocols (e.g. ajp12), this frees the memory
  - * associated with the endpoint.  For others (e.g. ajp13/ajp14), this can
  - * return the endpoint to a cache of already opened endpoints.  
  - */
  -/* int (JK_METHOD *done)(jk_env_t *env, */
  -/*   jk_worker_t *_this, */
  -/*   struct jk_endpoint *p ); */
  -
  + * Forward a request to the servlet engine.  The request is described
  + * by the jk_ws_service_t object.  I'm not sure exactly how
  + * is_recoverable_error is being used.  
  + */
  +int (JK_METHOD *service)(struct jk_env *env,
  + struct jk_worker *_this,
  + struct jk_ws_service *s);
   
  -/*
  - * Shutdown this worker. 
  - */
  -int (JK_METHOD *destroy)(struct jk_env *env, jk_worker_t *_thisP );
   };
   
   #ifdef __cplusplus
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 

cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_workerEnv.h

2002-01-25 Thread costin

costin  02/01/25 22:43:11

  Modified:jk/native2/include jk_workerEnv.h
  Log:
  Added dispatch - process a single incoming message.
  
  ProcessCallbacks is all wrong - it doesn't work with non-stream channels like jni
  and it's to coarse. And it should be moved in channel - since each channel may
  have it's own method of handling requests ( thread-wise especially )
  
  Revision  ChangesPath
  1.9   +13 -1 jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  Index: jk_workerEnv.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- jk_workerEnv.h12 Jan 2002 04:44:32 -  1.8
  +++ jk_workerEnv.h26 Jan 2002 06:43:11 -  1.9
  @@ -58,7 +58,7 @@
   /***
* Description: Workers controller header file *
* Author:  Gal Shachor [EMAIL PROTECTED]   * 
  - * Version: $Revision: 1.8 $   *
  + * Version: $Revision: 1.9 $   *
***/
   
   #ifndef JK_WORKERENV_H
  @@ -229,6 +229,18 @@
 const char *name, 
 struct jk_map *init_data);
   
  +/** Call the handler associated with the message type.
  + */
  +int (*dispatch)(struct jk_env *env, struct jk_workerEnv *_this,
  +struct jk_endpoint *e, struct jk_ws_service *r );
  +
  +/** Utility method for stream-based workers. It'll read
  + *  messages, dispatch, send the response if any until
  + *  done. This assumes one native server thread talking
  + *  with a different client thread ( on the java side ).
  + *  It does not work for jni or doors or other transports
  + *  where a single thread is used for the whole processing.
  + */
   int (*processCallbacks)(struct jk_env *env,
   struct jk_workerEnv *_this,
   struct jk_endpoint *e,
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_worker_jni.c jk_jni_worker.c

2002-01-25 Thread costin

costin  02/01/25 22:48:17

  Added:   jk/native2/common jk_worker_jni.c
  Removed: jk/native2/common jk_jni_worker.c
  Log:
  Removed the old jni worker. It had a number of problems, and was pretty hard to
  improve.
  
  The new worker is a subset - it only deals with starting an embeded VM and running
  a startup/shutdown method when needed.
  
  It relies on all the improvements in the new jk_vm, which deals with all the
  dirty details of creating a vm - and more importantly does a lot of guessing
  ( for a 'mainstream' vm, all you have to set is LD_LIBRARY_PATH and JAVA_HOME
  before starting apache - all else is detected ).
  
  You can of course start different programs ( a single vm will be used tough ).
  
  All the request forwarding is in the jni channel.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/jk/native2/common/jk_worker_jni.c
  
  Index: jk_worker_jni.c
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   *  Copyright (c) 1999-2001 The Apache Software Foundation.  *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *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 acknowlegement: *
   *   *
   *   This product includes  software developed  by the Apache  Software *
   *Foundation http://www.apache.org/.  *
   *   *
   *Alternately, this acknowlegement may appear in the software itself, if *
   *and wherever such third-party acknowlegements normally appear. *
   *   *
   * 4. The names  The  Jakarta  Project,  Jk,  and  Apache  Software *
   *Foundation  must not be used  to endorse or promote  products derived *
   *from this  software without  prior  written  permission.  For  written *
   *permission, please contact [EMAIL PROTECTED].*
   *   *
   * 5. Products derived from this software may not be called Apache nor may *
   *Apache appear in their names without prior written permission of the *
   *Apache Software Foundation.*
   *   *
   * 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 *
   * THE APACHE  SOFTWARE  FOUNDATION 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.   *
   *   *
   * 

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_jni.c

2002-01-25 Thread costin

costin  02/01/25 22:55:17

  Modified:jk/native2/common jk_channel_jni.c
  Log:
  A number of bug fixes - make sure we save the global ref, not the ref.
  We now get an Endpoint from the java side - and cache/reuse it with the
  jni endpoint.
  
  The jni channel is 'interesting' - it's the first non-stream channel. It could
  be treated as a stream, by using 2 threads ( so send/receive model will work ),
  but I wanted to preserve 'single thread, no sync' model from the previous
  jni worker.
  
  It may seem a bit complicated - and it adds some limitations on the model, but
  I think it's worth it.
  
  The idea is that, as before, the first message ( containing the request ) gives
  control to tomcat who may send back messages ( and get back responses to it's
  messages ). The send() method in channel is doing exactly this first step.
  
  Tomcat will use a native method to send messages ( that replaces receive(),
  which is not used ), which are dispatched. The response is actually put in
  the same buffer - a single jarray pin is needed.
  
  We must make sure we don't run into buffer problems - but that can be resolved.
  
  Revision  ChangesPath
  1.2   +359 -52   jakarta-tomcat-connectors/jk/native2/common/jk_channel_jni.c
  
  Index: jk_channel_jni.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_jni.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_channel_jni.c  12 Jan 2002 04:59:19 -  1.1
  +++ jk_channel_jni.c  26 Jan 2002 06:55:17 -  1.2
  @@ -79,7 +79,7 @@
*/
   typedef struct {
   jk_vm_t *vm;
  -
  +
   char *className;
   jclass jniBridge;
   
  @@ -87,8 +87,15 @@
   } jk_channel_jni_private_t;
   
   typedef struct {
  -JNIEnv *env;
  +JNIEnv *jniEnv;
  +
  +int len;
  +jbyteArray jarray;
  +char *carray;
  +int arrayLen;
   
  +jobject epJ;
  +jobject msgJ;
   } jk_ch_jni_ep_private_t;
   
   
  @@ -105,6 +112,12 @@
   {
   int err;
   char *tmp;
  +
  +/* the channel is init-ed during a worker validation. If a jni worker
  +   is not already defined... well, not good. But on open we should
  +   have it.
  +*/
  +
   
   _this-worker=worker;
   _this-properties=props;
  @@ -113,7 +126,7 @@
 channel_jni.init():  %s\n, 
 worker-name );
   
  -return err;
  +return JK_TRUE;
   }
   
   /** Assume the jni-worker or someone else started
  @@ -125,12 +138,18 @@
   {
   jk_workerEnv_t *we=endpoint-worker-workerEnv;
   JNIEnv *jniEnv;
  +jk_ch_jni_ep_private_t *epData;
  +jmethodID jmethod;
  +jobject jobj;
   
   jk_channel_jni_private_t *jniCh=_this-_privatePtr;
  -
  -/** XXX make it customizable */
  -jniCh-className=JAVA_BRIDGE_CLASS_NAME;
   
  +if( endpoint-channelData != NULL ) {
  +env-l-jkLog(env, env-l, JK_LOG_INFO,
  +  channel_jni.open() already open, nothing else to do\n); 
  +return JK_TRUE;
  +}
  +
   jniCh-vm=(jk_vm_t *)we-vm;
   
   jniEnv = (JNIEnv *)jniCh-vm-attach( env, jniCh-vm );
  @@ -139,19 +158,84 @@
 channel_jni.open() can't attach\n ); 
   return JK_FALSE;
   }
  +/* Create the buffers used by the write method. We allocate a
  +   byte[] and jbyte[] - I have no idea what's more expensive,
  +   to copy a buffer or to 'pin' the jbyte[] for copying.
  +
  +   This will be tuned if needed, for now it seems the easiest
  +   solution
  +*/
  +epData=(jk_ch_jni_ep_private_t *)
  +endpoint-pool-calloc( env,endpoint-pool,
  +sizeof( jk_ch_jni_ep_private_t ));
   
  +endpoint-channelData=epData;
  +/** XXX make it customizable */
  +jniCh-className=JAVA_BRIDGE_CLASS_NAME;
  +
   jniCh-jniBridge =
   (*jniEnv)-FindClass(jniEnv, jniCh-className );
   
  +jniCh-jniBridge=(*jniEnv)-NewGlobalRef( jniEnv, jniCh-jniBridge);
  +
   if( jniCh-jniBridge == NULL ) {
   env-l-jkLog(env, env-l, JK_LOG_INFO,
 channel_jni.open() can't find %s\n,jniCh-className ); 
   return JK_FALSE;
   }
  -
  - jniCh-writeMethod =
  +
  +jmethod=(*jniEnv)-GetStaticMethodID(jniEnv, jniCh-jniBridge,
  + createEndpointStatic, (JJ)Lorg/apache/jk/core/Endpoint;);
  +if( jmethod == NULL ) {
  +env-l-jkLog(env, env-l, JK_LOG_INFO,
  +  channel_jni.open() can't find createEndpointStatic\n); 
  +return JK_FALSE;
  +}
  +jobj=(*jniEnv)-CallStaticObjectMethod( jniEnv, jniCh-jniBridge,
  +   jmethod,
  +   (jlong)(long)(void *)env,
  +

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_worker_status.c

2002-01-25 Thread costin

costin  02/01/25 22:58:50

  Modified:jk/native2/common jk_worker_status.c
  Log:
  Removed all the endpoint stuff. This workers will display various info for debugging,
  but it needs the info :-)
  
  Revision  ChangesPath
  1.3   +12 -102   jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c
  
  Index: jk_worker_status.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_worker_status.c12 Jan 2002 05:20:17 -  1.2
  +++ jk_worker_status.c26 Jan 2002 06:58:50 -  1.3
  @@ -213,7 +213,7 @@
   
   }
   
  -static jk_buff_t *jk_worker_status_createBuffer(jk_env_t *env, jk_endpoint_t *e,
  +static jk_buff_t *jk_worker_status_createBuffer(jk_env_t *env, 
   jk_ws_service_t *s)
   {
   jk_buff_t *buff;
  @@ -229,13 +229,13 @@
   return buff;
   }
   
  -static int JK_METHOD service(jk_env_t *env, jk_endpoint_t *e, 
  - jk_ws_service_t *s,
  - int *is_recoverable_error)
  +static int JK_METHOD service(jk_env_t *env,
  + jk_worker_t *w, 
  + jk_ws_service_t *s)
   {
  -jk_buff_t *buff=jk_worker_status_createBuffer(env, e, s );
  +jk_buff_t *buff=jk_worker_status_createBuffer(env, s );
   
  -env-l-jkLog(env, env-l, JK_LOG_INFO, status.service() %p\n, e);
  +env-l-jkLog(env, env-l, JK_LOG_INFO, status.service()\n);
   
   /* Generate the header */
   s-status=200;
  @@ -255,98 +255,6 @@
   s-afterRequest( env, s);
   fprintf(stderr, After req %s \n, buff);
   return JK_TRUE;
  -
  -}
  -
  -static int JK_METHOD done(jk_env_t *env, jk_endpoint_t *e)
  -{
  -return JK_TRUE;
  -}
  -
  -static int JK_METHOD validate(jk_env_t *env, jk_worker_t *_this,
  -  jk_map_t *props, jk_workerEnv_t *we)
  -{
  -return JK_TRUE;
  -}
  -
  -static int JK_METHOD init(jk_env_t *env, jk_worker_t *_this,
  -  jk_map_t *props, jk_workerEnv_t *we)
  -{
  -return JK_TRUE;
  -}
  -
  -static int JK_METHOD get_endpoint(jk_env_t *env, jk_worker_t *_this,
  -  jk_endpoint_t **pend)
  -{
  -jk_endpoint_t *e;
  -jk_pool_t *endpointPool;
  -
  -if (_this-endpointCache != NULL ) {
  -e=_this-endpointCache-get( env, _this-endpointCache );
  -if (e!=NULL) {
  -env-l-jkLog(env, env-l, JK_LOG_INFO,
  - status.getEndpoint(): Reusing endpoint\n);
  -*pend = e;
  -return JK_TRUE;
  -}
  -}
  -
  -endpointPool=_this-pool-create( env, _this-pool, HUGE_POOL_SIZE);
  -
  -e = (jk_endpoint_t *)endpointPool-calloc(env, endpointPool,
  -  sizeof(jk_endpoint_t));
  -if(e==NULL) {
  -env-l-jkLog(env, env-l, JK_LOG_ERROR, 
  -  status_worker.getEndpoint() OutOfMemoryException\n);
  -return JK_FALSE;
  -}
  -
  -e-pool = endpointPool;
  -e-cPool=endpointPool-create( env,endpointPool, HUGE_POOL_SIZE );
  -e-worker = _this;
  -e-service = service;
  -e-done = done;
  -e-channelData = NULL;
  -*pend = e;
  -
  -env-l-jkLog(env, env-l, JK_LOG_INFO, status_worker.getEndpoint() %p\n, e);
  -return JK_TRUE;
  -}
  -
  -
  -static int JK_METHOD destroy(jk_env_t *env, jk_worker_t *w)
  -{
  -int i = 0;
  -
  -if(w==NULL ) {
  -env-l-jkLog(env, env-l, JK_LOG_ERROR,
  -  status_worker.destroy() NullPointerException\n);
  -return JK_FALSE;
  -}
  -
  -if( w-endpointCache != NULL ) {
  -for( i=0; i w-endpointCache-ep_cache_sz; i++ ) {
  -jk_endpoint_t *e;
  -
  -e= w-endpointCache-get( env, w-endpointCache );
  -if( e==NULL ) {
  -// we finished all endpoints in the cache
  -break;
  -}
  -
  -/* Nothing else to clean up ? */
  -e-cPool-close( env, e-cPool );
  -e-pool-close( env, e-pool );
  -}
  -w-endpointCache-destroy( env, w-endpointCache );
  -
  -env-l-jkLog(env, env-l, JK_LOG_DEBUG,
  -  status.destroy() closed %d cached endpoints\n,i);
  -}
  -
  -w-pool-close(env, w-pool);
  -
  -return JK_TRUE;
   }
   
   
  @@ -376,11 +284,13 @@
   _this-lb_workers = NULL;
   _this-num_of_workers = 0;
   _this-worker_private = NULL;
  -_this-validate   = validate;
  -_this-init   = init;
  -_this-get_endpoint   = get_endpoint;
  -_this-destroy= destroy;
   
  +_this-validate   = NULL;
  +

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_worker_run.c

2002-01-25 Thread costin

costin  02/01/25 22:59:45

  Modified:jk/native2/common jk_worker_run.c
  Log:
  This is another experimental worker - will use code similar with jni worker,
  but start java out-of-process ( like jserv did ). Work in progress.
  
  Revision  ChangesPath
  1.2   +6 -84 jakarta-tomcat-connectors/jk/native2/common/jk_worker_run.c
  
  Index: jk_worker_run.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_run.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_worker_run.c   12 Jan 2002 05:01:15 -  1.1
  +++ jk_worker_run.c   26 Jan 2002 06:59:45 -  1.2
  @@ -72,9 +72,8 @@
   #include jk_requtil.h
   #include jk_registry.h
   
  -static int JK_METHOD service(jk_env_t *env, jk_endpoint_t *e, 
  - jk_ws_service_t *s,
  - int *is_recoverable_error)
  +static int JK_METHOD service(jk_env_t *env, jk_worker_t *_this,
  + jk_ws_service_t *s )
   {
   /* I should display a status page for the monitored processes
*/
  @@ -90,65 +89,8 @@
   
   s-afterRequest( env, s);
   return JK_TRUE;
  -
  -}
  -
  -static int JK_METHOD done(jk_env_t *env, jk_endpoint_t *e)
  -{
  -return JK_TRUE;
   }
   
  -static int JK_METHOD validate(jk_env_t *env, jk_worker_t *_this,
  -  jk_map_t *props, jk_workerEnv_t *we)
  -{
  -return JK_TRUE;
  -}
  -
  -static int JK_METHOD init(jk_env_t *env, jk_worker_t *_this,
  -  jk_map_t *props, jk_workerEnv_t *we)
  -{
  -return JK_TRUE;
  -}
  -
  -static int JK_METHOD get_endpoint(jk_env_t *env, jk_worker_t *_this,
  -  jk_endpoint_t **pend)
  -{
  -jk_endpoint_t *e;
  -jk_pool_t *endpointPool;
  -
  -if (_this-endpointCache != NULL ) {
  -e=_this-endpointCache-get( env, _this-endpointCache );
  -if (e!=NULL) {
  -env-l-jkLog(env, env-l, JK_LOG_INFO,
  - run.getEndpoint(): Reusing endpoint\n);
  -*pend = e;
  -return JK_TRUE;
  -}
  -}
  -
  -endpointPool=_this-pool-create( env, _this-pool, HUGE_POOL_SIZE);
  -
  -e = (jk_endpoint_t *)endpointPool-calloc(env, endpointPool,
  -  sizeof(jk_endpoint_t));
  -if(e==NULL) {
  -env-l-jkLog(env, env-l, JK_LOG_ERROR, 
  -  run_worker.getEndpoint() OutOfMemoryException\n);
  -return JK_FALSE;
  -}
  -
  -e-pool = endpointPool;
  -e-cPool=endpointPool-create( env,endpointPool, HUGE_POOL_SIZE );
  -e-worker = _this;
  -e-service = service;
  -e-done = done;
  -e-channelData = NULL;
  -*pend = e;
  -
  -env-l-jkLog(env, env-l, JK_LOG_INFO, run_worker.getEndpoint() %p\n, e);
  -return JK_TRUE;
  -}
  -
  -
   static int JK_METHOD destroy(jk_env_t *env, jk_worker_t *w)
   {
   int i = 0;
  @@ -159,26 +101,6 @@
   return JK_FALSE;
   }
   
  -if( w-endpointCache != NULL ) {
  -for( i=0; i w-endpointCache-ep_cache_sz; i++ ) {
  -jk_endpoint_t *e;
  -
  -e= w-endpointCache-get( env, w-endpointCache );
  -if( e==NULL ) {
  -// we finished all endpoints in the cache
  -break;
  -}
  -
  -/* Nothing else to clean up ? */
  -e-cPool-close( env, e-cPool );
  -e-pool-close( env, e-pool );
  -}
  -w-endpointCache-destroy( env, w-endpointCache );
  -
  -env-l-jkLog(env, env-l, JK_LOG_DEBUG,
  -  run.destroy() closed %d cached endpoints\n,i);
  -}
  -
   w-pool-close(env, w-pool);
   
   return JK_TRUE;
  @@ -211,10 +133,10 @@
   _this-lb_workers = NULL;
   _this-num_of_workers = 0;
   _this-worker_private = NULL;
  -_this-validate   = validate;
  -_this-init   = init;
  -_this-get_endpoint   = get_endpoint;
  -_this-destroy= destroy;
  +_this-validate   = NULL;
  +_this-init   = NULL;
  +_this-destroy= NULL;
  +_this-service = service;
   
   *result=_this;
   
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_ajp14_worker.c

2002-01-25 Thread costin

costin  02/01/25 23:03:42

  Modified:jk/native2/common jk_ajp14_worker.c
  Log:
  That's one of the biggest changes.
  
  First, the endpoint management is now more explicit and direct - since this
  worker is sending the request, it needs endpoint and it recycles it.
  
  Second, we treat jni as a particular case - with a different way to handle it.
  What's nice is that now almost all of the code is shared and common - we do get
  reused endpoints for jni and all the good stuff from ajp ( including efficient
  c2b and less GC ).
  
  Revision  ChangesPath
  1.14  +173 -125  jakarta-tomcat-connectors/jk/native2/common/jk_ajp14_worker.c
  
  Index: jk_ajp14_worker.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_ajp14_worker.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- jk_ajp14_worker.c 12 Jan 2002 05:05:12 -  1.13
  +++ jk_ajp14_worker.c 26 Jan 2002 07:03:42 -  1.14
  @@ -72,35 +72,7 @@
   #include jk_service.h
   #include jk_env.h
   #include jk_objCache.h
  -#include jk_ajp14.h
  -
  -int JK_METHOD jk_worker_ajp14_factory( jk_env_t *env, jk_pool_t *pool, void 
**result,
  -   const char *type, const char *name);
  -
  -static int JK_METHOD
  -jk_worker_ajp14_service(jk_env_t *env, jk_endpoint_t   *e,
  -jk_ws_service_t *s,
  -int *is_recoverable_error);
  -
  -static int JK_METHOD
  -jk_worker_ajp14_validate(jk_env_t *env, jk_worker_t *_this,
  - jk_map_t*props,
  - jk_workerEnv_t *we );
  -
  -static int JK_METHOD
  -jk_worker_ajp14_done(jk_env_t *env, jk_endpoint_t *e);
  -
  -static int JK_METHOD
  -jk_worker_ajp14_getEndpoint(jk_env_t *env, jk_worker_t *_this,
  -jk_endpoint_t **e);
  -
  -static int JK_METHOD
  -jk_worker_ajp14_init(jk_env_t *env, jk_worker_t *_this,
  - jk_map_t*props, 
  - jk_workerEnv_t *we);
  -
  -static int JK_METHOD
  -jk_worker_ajp14_destroy(jk_env_t *env, jk_worker_t *_this);
  +#include jk_registry.h
   
   
   #define AJP_DEF_RETRY_ATTEMPTS(2)
  @@ -114,37 +86,6 @@
   
   /*  Impl  */
   
  -int JK_METHOD jk_worker_ajp14_factory( jk_env_t *env, jk_pool_t *pool,
  -   void **result,
  -   const char *type, const char *name)
  -{
  -jk_worker_t *w=(jk_worker_t *)pool-calloc(env, pool, sizeof(jk_worker_t));
  -
  -if (name == NULL || w == NULL) {
  -env-l-jkLog(env, env-l, JK_LOG_ERROR,
  -  ajp14.factory() NullPointerException\n);
  -return JK_FALSE;
  -}
  -w-pool = pool;
  -w-name = NULL;
  -
  -w-proto= AJP14_PROTO;
  -
  -w-endpointCache= NULL;
  -w-connect_retry_attempts= AJP_DEF_RETRY_ATTEMPTS;
  -
  -w-channel= NULL;
  -w-secret= NULL;
  -   
  -w-validate= jk_worker_ajp14_validate;
  -w-init= jk_worker_ajp14_init;
  -w-get_endpoint= jk_worker_ajp14_getEndpoint;
  -w-destroy=jk_worker_ajp14_destroy;
  -
  -*result = w;
  -
  -return JK_TRUE;
  -}
   
   /*
* Initialize the worker.
  @@ -199,13 +140,11 @@
}
   }
   
  -_this-channel-setProperty( env, _this-channel, defaultPort, 8007 );
  -
   err=_this-channel-init( env, _this-channel, props, p-name, _this);
   
   if( err != JK_TRUE ) {
env-l-jkLog(env, env-l, JK_LOG_ERROR,
  -  ajp14.validate(): resolve failed\n);
  +  ajp14.validate(): channel init failed\n);
return err;
   }
   
  @@ -260,7 +199,7 @@
   
   jk_serialize_ping( env, msg, ae );
   
  -err = msg-send( env, msg, ae );
  +err = ae-worker-channel-send( env, ae-worker-channel, ae, msg );
   
   /* Move to 'slave' mode, listening to messages */
   err=ae-worker-workerEnv-processCallbacks( env, ae-worker-workerEnv,
  @@ -274,56 +213,17 @@
   return err;
   }
   
  -
  -/*
  - * Serve the request, using AJP13/AJP14
  - */
  -static int JK_METHOD
  -jk_worker_ajp14_service(jk_env_t *env, jk_endpoint_t   *e, 
  -jk_ws_service_t *s,
  -int  *is_recoverable_error)
  +/** First message in a stream-based connection. If the first send
  +fails, try to reconnect.
  +*/
  +static int JK_METHOD
  +jk_worker_ajp14_sendAndReconnect(jk_env_t *env, jk_worker_t *worker,
  +  jk_ws_service_t *s,
  +  jk_endpoint_t   *e )
   {
  -int err;
   int attempt;
  -int hasPost=JK_FALSE;
  -
  -if( ( e== NULL ) 
  - || ( s == NULL )
  -|| ! is_recoverable_error ) {
  - env-l-jkLog(env, env-l, JK_LOG_ERROR,
  -  

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_apr_socket.c jk_channel_socket.c

2002-01-25 Thread costin

costin  02/01/25 23:05:19

  Modified:jk/native2/common jk_channel_socket.c
  Added:   jk/native2/common jk_channel_apr_socket.c
  Log:
  Update the channels.
  
  I moved the apr_socket in the same dir - apr is not a special case, it'll be the
  default. If jni is here, apr should be too - I would rather move the 'old'
  socket in a special dir ( or just remove it later ).
  
  Revision  ChangesPath
  1.12  +58 -6 jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
  
  Index: jk_channel_socket.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- jk_channel_socket.c   17 Dec 2001 07:17:08 -  1.11
  +++ jk_channel_socket.c   26 Jan 2002 07:05:19 -  1.12
  @@ -165,7 +165,7 @@
   host = jk_map_getStrProp( env, props,
 worker, worker_name, host, host);
   tmp = jk_map_getStrProp( env, props,
  -  worker, worker_name, port, NULL );
  +  worker, worker_name, port, 8007 );
   if( tmp != NULL )
   port=jk_map_str2int( env, tmp);
   
  @@ -344,14 +344,20 @@
*/
   static int JK_METHOD jk_channel_socket_send(jk_env_t *env, jk_channel_t *_this,
   jk_endpoint_t *endpoint,
  -char *b, int len) 
  +jk_msg_t *msg) 
   {
  +char *b;
  +int len;
   int sd;
   int  sent=0;
  -
   jk_channel_socket_data_t *chD=endpoint-channelData;
  +
   if( chD==NULL ) 
return JK_FALSE;
  +
  +msg-end( env, msg );
  +len=msg-len;
  +b=msg-buf;
   sd=chD-sock;
   
   while(sent  len) {
  @@ -378,9 +384,10 @@
*0: length of the received data.
* Was: tcp_socket_recvfull
*/
  -static int JK_METHOD jk_channel_socket_recv( jk_env_t *env, jk_channel_t *_this,
  - jk_endpoint_t *endpoint,
  - char *b, int len ) 
  +static int JK_METHOD jk_channel_socket_readN( jk_env_t *env,
  +  jk_channel_t *_this,
  +  jk_endpoint_t *endpoint,
  +  char *b, int len )
   {
   jk_channel_socket_data_t *chD=endpoint-channelData;
   int sd;
  @@ -417,6 +424,49 @@
   }
   
   
  +/** receive len bytes.
  + * @param sd  opened socket.
  + * @param b   buffer to store the data.
  + * @param len length to receive.
  + * @return-1: receive failed or connection closed.
  + *0: length of the received data.
  + * Was: tcp_socket_recvfull
  + */
  +static int JK_METHOD jk_channel_socket_recv( jk_env_t *env, jk_channel_t *_this,
  + jk_endpoint_t *endpoint,
  + jk_msg_t *msg )
  +{
  +int hlen=msg-headerLength;
  +int blen;
  +int rc;
  +
  +
  +jk_channel_socket_readN( env, _this, endpoint, msg-buf, hlen );
  +
  +blen=msg-checkHeader( env, msg, endpoint );
  +if( blen  0 ) {
  +env-l-jkLog(env, env-l, JK_LOG_ERROR,
  +  channelSocket.receive(): Bad header\n );
  +return JK_FALSE;
  +}
  +
  +rc= jk_channel_socket_readN( env, _this, endpoint, msg-buf + hlen, blen);
  +
  +if(rc  0) {
  +env-l-jkLog(env, env-l, JK_LOG_ERROR,
  +   channelSocket.receive(): Error receiving message body %d %d\n,
  +  rc, errno);
  +return JK_FALSE;
  +}
  +
  +env-l-jkLog(env, env-l, JK_LOG_INFO,
  +  channelSocket.receive(): Received len=%d type=%d\n,
  +  blen, (int)msg-buf[hlen]);
  +return JK_TRUE;
  +
  +}
  +
  +
   
   int JK_METHOD jk_channel_socket_factory(jk_env_t *env,
   jk_pool_t *pool, 
  @@ -452,6 +502,8 @@
   
   _this-name=file;
   
  +_this-is_stream=JK_TRUE;
  +
   *result= _this;
   
   return JK_TRUE;
  
  
  
  1.1  
jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c
  
  Index: jk_channel_apr_socket.c
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   *  Copyright (c) 1999-2001 The Apache Software Foundation.  *
   *   All rights reserved.

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_msg_ajp.c

2002-01-25 Thread costin

costin  02/01/25 23:07:13

  Modified:jk/native2/common jk_msg_ajp.c
  Log:
  Removed the send/receive ( now in channel ).
  
  A small change - the msg is just a byte chunk for the channel. It has a header,
  and a body. We now store both in the same buffer. That's because it may be
  more efficient to receive both at the same time.
  
  Revision  ChangesPath
  1.5   +32 -73jakarta-tomcat-connectors/jk/native2/common/jk_msg_ajp.c
  
  Index: jk_msg_ajp.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_msg_ajp.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jk_msg_ajp.c  17 Dec 2001 07:17:08 -  1.4
  +++ jk_msg_ajp.c  26 Jan 2002 07:07:13 -  1.5
  @@ -60,7 +60,7 @@
* Author:  Costin Manolache
* Author:  Gal Shachor [EMAIL PROTECTED]   *
* Author:  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.4 $   *
  + * Version: $Revision: 1.5 $   *
***/
   
   #include jk_pool.h
  @@ -235,7 +235,8 @@
   
   if(msg-pos + 3  msg-len) {
   env-l-jkLog( env, env-l, JK_LOG_ERROR,
  -   Error: try to get data past end of the buffer\n);
  +   msg_ajp.getLong(): BufferOverflowException %d %d\n,
  +   msg-pos, msg-len);
   return -1;
   }
   i  = ((msg-buf[(msg-pos++)]  0xFF)24);
  @@ -250,7 +251,8 @@
   int i;
   if(msg-pos + 1  msg-len) {
   env-l-jkLog( env, env-l, JK_LOG_ERROR,
  -   Error: try to get data past end of the buffer\n);
  +   msg_ajp.geInt(): BufferOverflowException %d %d\n,
  +   msg-pos, msg-len);
   return -1;
   }
   i  = ((msg-buf[(msg-pos++)]  0xFF)8);
  @@ -263,7 +265,8 @@
   int i;
   if(msg-pos + 1  msg-len) {
   env-l-jkLog( env, env-l, JK_LOG_ERROR,
  -   Error: try to get data past end of the buffer\n);
  +   msg_ajp.peekInt(): BufferOverflowException %d %d\n,
  +   msg-pos, msg-len);
   return -1;
   }
   i  = ((msg-buf[(msg-pos)]  0xFF)8);
  @@ -276,7 +279,8 @@
   unsigned char rc;
   if(msg-pos  msg-len) {
   env-l-jkLog( env, env-l, JK_LOG_ERROR,
  -   Error: try to get data past end of the buffer\n);
  +   msg_ajp.getByte(): BufferOverflowException %d %d\n,
  +   msg-pos, msg-len);
   return -1;
   }
   rc = msg-buf[msg-pos++];
  @@ -291,7 +295,8 @@
   
   if((size  0 ) || (size + start  msg-maxlen)) { 
   env-l-jkLog( env, env-l, JK_LOG_ERROR,
  -   Error: try to get data past end of the buffer\n);
  +   msg_ajp.getString(): BufferOverflowException %d %d\n,
  +   msg-pos, msg-len);
   return (unsigned char *)ERROR; /* XXX */
   }
   
  @@ -310,7 +315,8 @@
   
   if((size  0 ) || (size + start  msg-maxlen)) { 
   env-l-jkLog( env, env-l, JK_LOG_ERROR,
  -   Error: try to get data past end of the buffer\n);
  +   msg_ajp.getBytes(): BufferOverflowException %d %d\n,
  +   msg-pos, msg-len);
   return (unsigned char *)ERROR; /* XXX */
   }
   
  @@ -330,57 +336,21 @@
   *dst= *src;
   }
   
  -
  -/*
  - * Send a message to endpoint, using corresponding PROTO HEADER
  - */
  -static int jk_msg_ajp_send(jk_env_t *env, jk_msg_t *msg,
  -   jk_endpoint_t *ae )
  -{
  -int err;
  -jk_channel_t *channel=ae-worker-channel;
  -
  -jk_msg_ajp_end(env, msg);
  -
  -/* jk_msg_ajp_dump(l, JK_LOG_DEBUG, sending to ajp13, msg); */
  -env-l-jkLog( env, env-l, JK_LOG_INFO,
  -   msgAjp.send() %d\n, msg-len );
  -
  -err=channel-send( env, channel, ae, 
  -   msg-buf, msg-len );
  -
  -if( err!=JK_TRUE ) {
  -return err;
  -}
  -
  -return JK_TRUE;
  -}
  -
  -
  -/*
  - * Receive a message from endpoint
  - */
  -static int jk_msg_ajp_receive(jk_env_t *env, jk_msg_t *msg,
  -  jk_endpoint_t *ae )
  +/** Process the request header. At least the header must be
  +available - the channel may get more data it it can, to
  +avoid multiple system calls.
  +*/
  +static int jk_msg_ajp_checkHeader(jk_env_t *env, jk_msg_t *msg,
  +  jk_endpoint_t *ae )
   {
  -unsigned char head[4];
  -int   rc;
  -int   msglen;
  -jk_channel_t *channel=ae-worker-channel;
  -

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_registry.h jk_requtil.c

2002-01-25 Thread costin

costin  02/01/25 23:07:41

  Modified:jk/native2/common jk_registry.h jk_requtil.c
  Log:
  Minor fixes.
  
  Revision  ChangesPath
  1.6   +7 -3  jakarta-tomcat-connectors/jk/native2/common/jk_registry.h
  
  Index: jk_registry.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_registry.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jk_registry.h 14 Jan 2002 09:26:52 -  1.5
  +++ jk_registry.h 26 Jan 2002 07:07:41 -  1.6
  @@ -62,7 +62,7 @@
   
   /***
* Description: Worker list*
  - * Version: $Revision: 1.5 $   *
  + * Version: $Revision: 1.6 $   *
***/
   
   /** Static declarations for all 'hardcoded' modules. This is a hack, 
  @@ -121,11 +121,15 @@
   int JK_METHOD jk_channel_apr_socket_factory(jk_env_t *env, jk_pool_t *pool,
   void **result,
const char *type, const char *name);
  -#else
  +#endif
  +
  +int JK_METHOD jk_channel_jni_factory(jk_env_t *env, jk_pool_t *pool,
  +void **result,
  +const char *type, const char *name);
  +
   int JK_METHOD jk_channel_socket_factory(jk_env_t *env, jk_pool_t *pool,
   void **result,
const char *type, const char *name);
  -#endif
   
   int JK_METHOD jk_workerEnv_factory(jk_env_t *env, jk_pool_t *pool,
  void **result,
  
  
  
  1.6   +0 -1  jakarta-tomcat-connectors/jk/native2/common/jk_requtil.c
  
  Index: jk_requtil.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_requtil.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jk_requtil.c  16 Dec 2001 23:29:55 -  1.5
  +++ jk_requtil.c  26 Jan 2002 07:07:41 -  1.6
  @@ -412,7 +412,6 @@
   void jk_requtil_initRequest(jk_env_t *env, jk_ws_service_t *s)
   {
   s-ws_private   = NULL;
  -s-pool = NULL;
   s-method   = NULL;
   s-protocol = NULL;
   s-req_uri  = NULL;
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_serialize_ajp.c

2002-01-25 Thread costin

costin  02/01/25 23:10:06

  Modified:jk/native2/common jk_serialize_ajp.c
  Log:
  Added a small secret. I'll play with it here, but that should go into the
  old connector as well. The change is very simple and will not affect
  any old connector ( 3.2 will still be supported ). However it will allow
  a more secure setup for ajp, if both ends have the password set up.
  
  It'll be the same thing as in ajp12, it's the easist solution using
  ajp13 attribute.
  
  Revision  ChangesPath
  1.5   +12 -2 jakarta-tomcat-connectors/jk/native2/common/jk_serialize_ajp.c
  
  Index: jk_serialize_ajp.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_serialize_ajp.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jk_serialize_ajp.c17 Dec 2001 07:17:08 -  1.4
  +++ jk_serialize_ajp.c26 Jan 2002 07:10:05 -  1.5
  @@ -70,7 +70,6 @@
   #include jk_env.h
   #include jk_requtil.h
   #include jk_msg.h
  -#include jk_ajp14.h
   
   /*
* Forward a request from the web server to the servlet container.
  @@ -133,6 +132,7 @@
   #define SC_A_REQ_ATTRIBUTE  (unsigned char)10
   /* only in if JkOptions +ForwardKeySize */
   #define SC_A_SSL_KEY_SIZE   (unsigned char)11
  +#define SC_A_SECRET (unsigned char)12
   #define SC_A_ARE_DONE   (unsigned char)0xFF
   
   
  @@ -170,7 +170,8 @@
   Was: ajp_marshal_into_msgb
*/
   int jk_serialize_request13(jk_env_t *env, jk_msg_t *msg,
  -   jk_ws_service_t *s )
  +   jk_ws_service_t *s,
  +   jk_endpoint_t *ae)
   {
   unsigned char method;
   int i;
  @@ -299,6 +300,15 @@
   msg-appendInt(env, msg, (unsigned short) s-ssl_key_size)) {
   env-l-jkLog(env, env-l, JK_LOG_ERROR,
 handle.request() Error serializing SSL key size\n);
  +return JK_FALSE;
  +}
  +}
  +
  +if (ae-worker-secret ) {
  +if (msg-appendByte(env, msg, SC_A_SECRET) ||
  +msg-appendString(env, msg, ae-worker-secret )) {
  +env-l-jkLog(env, env-l, JK_LOG_ERROR,
  +  handle.request() Error serializing secret\n);
   return JK_FALSE;
   }
   }
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_vm_default.c

2002-01-25 Thread costin

costin  02/01/25 23:10:30

  Modified:jk/native2/common jk_vm_default.c
  Log:
  Fixes, get it to work right.
  
  Revision  ChangesPath
  1.2   +9 -2  jakarta-tomcat-connectors/jk/native2/common/jk_vm_default.c
  
  Index: jk_vm_default.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_vm_default.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_vm_default.c   12 Jan 2002 04:48:20 -  1.1
  +++ jk_vm_default.c   26 Jan 2002 07:10:30 -  1.2
  @@ -121,8 +121,10 @@
   
   /** Where to try to find jk jars ( if user doesn't specify it explicitely ) */
   static const char *defaultJK_PATH[]={
  -$(tomcat.home)$(fs)modules$(fs)jk$(fs)WEB-INF$(fs)lib$(fs)ajp.jar,
  +$(tomcat.home)$(fs)modules$(fs)jk$(fs)WEB-INF$(fs)lib$(fs)jk2.jar,
  + $(tomcat.home)$(fs)modules$(fs)jk$(fs)WEB-INF$(fs)lib$(fs)tomcat-utils.jar,
   $(tomcat.home)$(fs)webapps(fs)jk$(fs)WEB-INF$(fs)lib$(fs)ajp.jar,
  + $(tomcat.home)$(fs)webapps(fs)jk$(fs)WEB-INF$(fs)lib$(fs)tomcat-utils.jar,
   NULL
   };
   
  @@ -254,7 +256,7 @@
   /* linux_signal_hack(); */
   #endif
   
  -err= (*jvm)-GetEnv( jvm, (void **)rc, 0 );
  +err= (*jvm)-GetEnv( jvm, (void **)rc, JNI_VERSION_1_2 );
   if( err != 0 ) {
   env-l-jkLog(env, env-l, JK_LOG_INFO,
 vm.attach() GetEnv failed %d\n, err);
  @@ -654,6 +656,9 @@
   return NULL;
   }
   
  +env-l-jkLog(env, env-l, JK_LOG_INFO,
  +  jni.guessTomcatHome() %s\n, tomcat_home);
  +
   props-put(env, props, tomcat.home,
  props-pool-pstrdup( env, props-pool, tomcat_home ), NULL);
   
  @@ -666,6 +671,8 @@
   char *jkJar;
   jk_pool_t *p=props-pool;
   const char **current=defaultJK_PATH;
  +
  +guessTomcatHome( env, props );
   
   while( *current != NULL ) {
   jkJar = jk_map_replaceProperties(env, props, p,
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/native2/common/apr jk_channel_apr_socket.c

2002-01-25 Thread costin

costin  02/01/25 23:11:23

  Removed: jk/native2/common jk_ajp14.h
   jk/native2/common/apr jk_channel_apr_socket.c
  Log:
  Removed the old files ( apr socket was moved to the main dir )

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/native2/jni jk_channeljni_native.c jk_jnicb.c

2002-01-25 Thread costin

costin  02/01/25 23:13:02

  Modified:jk/native2/jni jk_jnicb.c
  Added:   jk/native2/jni jk_channeljni_native.c
  Log:
  Added the impl for the native method in ChannelJni.  It'll just forward to
  the code in ../common/jk_channel_jni
  
  Revision  ChangesPath
  1.6   +4 -1  jakarta-tomcat-connectors/jk/native2/jni/jk_jnicb.c
  
  Index: jk_jnicb.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/jni/jk_jnicb.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jk_jnicb.c17 Dec 2001 07:11:41 -  1.5
  +++ jk_jnicb.c26 Jan 2002 07:13:02 -  1.6
  @@ -1,3 +1,6 @@
  +
  +
  +
   /* = *
*   *
* The Apache Software License,  Version 1.1 *
  @@ -58,7 +61,7 @@
   /***
* Description: JNI callbacks implementation for the JNI in process adapter*
* Author:  Gal Shachor [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.5 $   *
  + * Version: $Revision: 1.6 $   *
***/
   
   #include jk_jnicb.h
  
  
  
  1.1  jakarta-tomcat-connectors/jk/native2/jni/jk_channeljni_native.c
  
  Index: jk_channeljni_native.c
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   *  Copyright (c) 1999-2001 The Apache Software Foundation.  *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *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 acknowlegement: *
   *   *
   *   This product includes  software developed  by the Apache  Software *
   *Foundation http://www.apache.org/.  *
   *   *
   *Alternately, this acknowlegement may appear in the software itself, if *
   *and wherever such third-party acknowlegements normally appear. *
   *   *
   * 4. The names  The  Jakarta  Project,  Jk,  and  Apache  Software *
   *Foundation  must not be used  to endorse or promote  products derived *
   *from this  software without  prior  written  permission.  For  written *
   *permission, please contact [EMAIL PROTECTED].*
   *   *
   * 5. Products derived from this software may not be called Apache nor may *
   *Apache appear in their names without prior written permission of the *
   *Apache Software Foundation.*
   *   *
   * 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 *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS 

cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_map_aprtable.c jk_service_apache2.c mod_jk.c

2002-01-25 Thread costin

costin  02/01/25 23:13:47

  Modified:jk/native2/server/apache2 jk_map_aprtable.c
jk_service_apache2.c mod_jk.c
  Log:
  Fixes, updates for the new apis.
  
  Revision  ChangesPath
  1.5   +4 -4  
jakarta-tomcat-connectors/jk/native2/server/apache2/jk_map_aprtable.c
  
  Index: jk_map_aprtable.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_map_aprtable.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jk_map_aprtable.c 6 Jan 2002 09:06:02 -   1.4
  +++ jk_map_aprtable.c 26 Jan 2002 07:13:47 -  1.5
  @@ -56,11 +56,11 @@
* = */
   
   /**
  - * Implementation of map using apr_table. This avoids copying the headers, env, etc
  - * in jk_service - we can just wrap them.
  + * Implementation of map using apr_table. This avoids copying the headers,
  + * env, etc in jk_service - we can just wrap them.
*
  - * Note that this _require_ that apr pools are used ( can't be used with jk_pools ),
  - * i.e. you must use apr for both pools and maps.
  + * Note that this _require_ that apr pools are used ( can't be used
  + * with jk_pools ), i.e. you must use apr for both pools and maps.
*
* @author Costin Manolache
*/
  
  
  
  1.7   +6 -6  
jakarta-tomcat-connectors/jk/native2/server/apache2/jk_service_apache2.c
  
  Index: jk_service_apache2.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_service_apache2.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- jk_service_apache2.c  6 Jan 2002 09:06:02 -   1.6
  +++ jk_service_apache2.c  26 Jan 2002 07:13:47 -  1.7
  @@ -59,7 +59,7 @@
* Description: Apache 2 plugin for Jakarta/Tomcat 
* Author:  Gal Shachor [EMAIL PROTECTED]   
* Henri Gomez [EMAIL PROTECTED]
  - * Version: $Revision: 1.6 $   
  + * Version: $Revision: 1.7 $   
*/
   
   #include apu_compat.h
  @@ -92,7 +92,7 @@
   
   #include jk_apache2.h
   
  -/* #define USE_APRTABLES */
  +#define USE_APRTABLES 
   
   #define NULL_FOR_EMPTY(x)   ((x  !strlen(x)) ? NULL : x) 
   
  @@ -116,7 +116,8 @@
   headers=s-headers_out;
   /* XXX As soon as we switch to jk_map_apache2, this will not be needed ! */
   env-l-jkLog(env, env-l, JK_LOG_INFO, 
  -  service.head() %d %d\n, s-status, headers-size(env, headers 
));
  +  service.head() %d %d\n, s-status,
  +  headers-size(env, headers ));
   
   for(h = 0 ; h  headers-size( env, headers ) ; h++) {
   char *name=headers-nameAt( env, headers, h );
  @@ -295,11 +296,11 @@
   }
   
   static int init_ws_service(jk_env_t *env, jk_ws_service_t *s,
  -   jk_endpoint_t *e, void *serverObj)
  +   jk_worker_t *worker, void *serverObj)
   {
   apr_port_t port;
   char *ssl_temp  = NULL;
  -jk_workerEnv_t *workerEnv=e-worker-workerEnv;
  +jk_workerEnv_t *workerEnv=worker-workerEnv;
   request_rec *r=serverObj;
   int need_content_length_header=JK_FALSE;
   
  @@ -308,7 +309,6 @@
   jk_requtil_initRequest(env, s);
   
   s-ws_private = r;
  -s-pool=e-cPool;
   s-response_started = JK_FALSE;
   s-read_body_started = JK_FALSE;
   s-workerEnv=workerEnv;
  
  
  
  1.18  +40 -11jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- mod_jk.c  15 Jan 2002 13:49:11 -  1.17
  +++ mod_jk.c  26 Jan 2002 07:13:47 -  1.18
  @@ -59,7 +59,7 @@
* Description: Apache 2 plugin for Jakarta/Tomcat *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
* Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.17 $   *
  + * Version: $Revision: 1.18 $   *
***/
   
   /*
  @@ -283,7 +283,7 @@
   jk_map_t *m=workerEnv-init_data;
   
   env=workerEnv-globalEnv;
  -
  +
   value = jk_map_replaceProperties(env, m, m-pool, value);
   
   if(value==NULL)
  @@ -705,37 +705,66 @@
 r-uri, 

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk Ajp13.java Ajp13Packet.java AjpHandler.java NegociationHandler.java RequestHandler.java

2002-01-25 Thread costin

costin  02/01/25 23:15:37

  Removed: jk/java/org/apache/jk Ajp13.java Ajp13Packet.java
AjpHandler.java NegociationHandler.java
RequestHandler.java
  Log:
  Removed the old classes ( they were actually cutpasted in the new code ).

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/util - New directory

2002-01-25 Thread costin

costin  02/01/25 23:15:52

  jakarta-tomcat-connectors/jk/java/org/apache/jk/util - New directory

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/util C2B.java

2002-01-25 Thread costin

costin  02/01/25 23:16:46

  Added:   jk/java/org/apache/jk/util C2B.java
  Removed: jk/java/org/apache/jk/common C2B.java
  Log:
  Moved C2B to an util package.
  
  It should go with the main util in commons, having the same package name as in
  3.3 creates problems.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/jk/java/org/apache/jk/util/C2B.java
  
  Index: C2B.java
  ===
  /*
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  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 acknowlegement:  
   *   This product includes software developed by the 
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Tomcat, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written 
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * 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 THE APACHE SOFTWARE FOUNDATION 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 the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */ 
  package org.apache.jk.util;
  
  import org.apache.tomcat.util.buf.*;
  
  import java.io.*;
  
  // This is extended C2BConvertor. I need to add methods ( to convert strings )
  // and it can't work with 3.3 ( since the old class will be loaded ).
  // We should change the package name or find a different solution.
  
  /** Efficient conversion of character to bytes.
   *  
   *  This uses the standard JDK mechansim - a writer - but provides mechanisms
   *  to recycle all the objects that are used. It is compatible with JDK1.1 and up,
   *  ( nio is better, but it's not available even in 1.2 or 1.3 )
   * 
   */
  public final class C2B {
  private C2BIntermediateOutputStream ios;
  private C2BWriteConvertor conv;
  private ByteChunk bb;
  private String enc;
  
  /** Create a converter, with bytes going to a byte buffer
   */
  public C2B(ByteChunk output, String encoding) throws IOException {
this.bb=output;
ios=new C2BIntermediateOutputStream( output );
conv=new C2BWriteConvertor( ios, encoding );
  this.enc=enc;
  }
  
  /** Create a converter
   */
  public C2B(String encoding) throws IOException {
this( new ByteChunk(1024), encoding );
  }
  
  public ByteChunk getByteChunk() {
return bb;
  }
  
  public String getEncoding() {
  return enc;
  }
  
  public void setByteChunk(ByteChunk bb) {
this.bb=bb;
ios.setByteChunk( bb );
  }
  
  /** Reset the internal state, empty the buffers.
   *  The encoding remain in effect, the internal buffers remain allocated.
   */
  public  final 

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/core JkChannel.java

2002-01-25 Thread costin

costin  02/01/25 23:20:25

  Removed: jk/java/org/apache/jk/common ChannelUnixSocket.java
HandlerEcho.java
   jk/java/org/apache/jk/core JkChannel.java
  Log:
  Removed ChannelUnixSocket ( with JFC's agreement ). It's duplicated in 
ChannelUnSocket.
  
  Removed HandlerEcho, it was empty anyway. The first step is to get the original
  ajp13 working, in a future release we can add other handlers and messages
  ( sorry Henri, most of the new stuff in ajp14 is not yet added, I'll go back to
  it after I finish ajp13 and jni stuff )
  
  JkChannel - I moved back to Channel as abstract class, it easier for now.

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/core Channel.java

2002-01-25 Thread costin

costin  02/01/25 23:21:02

  Modified:jk/java/org/apache/jk/core Channel.java
  Log:
  Abstract class, after merging with JkChannel.
  
  Revision  ChangesPath
  1.3   +33 -16
jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Channel.java
  
  Index: Channel.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Channel.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Channel.java  16 Jan 2002 15:38:29 -  1.2
  +++ Channel.java  26 Jan 2002 07:21:02 -  1.3
  @@ -63,7 +63,7 @@
   import java.io.InputStream;
   import java.io.OutputStream;
   import java.net.Socket;
  -import java.util.Enumeration;
  +import java.util.*;
   import java.security.*;
   
   import org.apache.tomcat.util.http.MimeHeaders;
  @@ -81,23 +81,40 @@
* @author Kevin Seguin
* @author Costin Manolache
*/
  -public interface Channel {
  -
  -public void setWorkerEnv( WorkerEnv we );
  -
  -public void init() throws IOException;
  +public abstract class Channel {
  +protected WorkerEnv we;
  +protected Worker worker;
  +
  +public void setWorkerEnv( WorkerEnv we ) {
  +this.we=we;
  +}
   
  -public void write( Endpoint ep, byte[] b, int offset, int len)
  -throws IOException;
  -
  -public int read( Endpoint ep, byte[] b, int offset, int len)
  -   throws IOException;
  +public void setWorker(Worker worker) {
  +this.worker=worker;
  +}
  +
  +public void init() throws IOException {
  +}
  +
  +/** This method is used to receive messages. It shouldn't
  + *  be exposed, as most processing is driven by sending
  + *   messages and dispatching on incoming messages. The
  + *   only current use is the aberant post packet after
  + *   the first request, which doesn't fit anything.
  + */
  +public abstract int receive( Msg msg, Endpoint ep )
  +throws IOException;
  +
  +/**
  + * Send a packet to the web server.  Works for any type of message.
  + *
  + * @param msg A packet with accumulated data to send to the server --
  + * this method will write out the length in the header.  
  + */
  +public abstract int send( Msg msg, Endpoint ep )
  +throws IOException;
   
  -public void setJkHome(String home);
   
  -public void setWorker(Worker wo);
  -
  -public void setFile(String file);
  +
   
  -public void setPort(int port);
   }
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/core Handler.java Msg.java Webapp.java Worker.java WorkerEnv.java

2002-01-25 Thread costin

costin  02/01/25 23:22:24

  Modified:jk/java/org/apache/jk/core Handler.java Msg.java Webapp.java
Worker.java WorkerEnv.java
  Log:
  Various other changes to get ChannelJni integrated.
  
  Revision  ChangesPath
  1.2   +20 -2 
jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Handler.java
  
  Index: Handler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Handler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Handler.java  31 Dec 2001 19:03:53 -  1.1
  +++ Handler.java  26 Jan 2002 07:22:23 -  1.2
  @@ -62,6 +62,9 @@
   import java.util.*;
   import java.security.*;
   
  +// XXX This should be called MsgListener or MsgDecoder - 'handler' is too
  +// overloaded. 
  +
   /**
*
* @author Costin Manolache
  @@ -70,12 +73,27 @@
   public static final int OK=0;
   public static final int LAST=1;
   public static final int ERROR=2;
  +
  +protected WorkerEnv we;
  +protected Worker worker;
   
  +public void setWorkerEnv( WorkerEnv we ) {
  +this.we=we;
  +}
  +
  +public void setWorker( Worker worker ) {
  +this.worker=worker;
  +}
   
  -public void init( WorkerEnv we ) {
  +/** Should register the request types it can handle,
  + *   same style as apache2.
  + */
  +public void init() {
   }
   
  -public int callback(int type, Channel ch, Endpoint ep, Msg in) throws 
IOException { 
  +public int callback(int type, Channel ch, Endpoint ep, Msg in)
  +throws IOException
  +{
   return OK;
   }
   
  
  
  
  1.3   +5 -8  jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Msg.java
  
  Index: Msg.java
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Msg.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Msg.java  6 Jan 2002 08:47:09 -   1.2
  +++ Msg.java  26 Jan 2002 07:22:23 -  1.3
  @@ -154,16 +154,13 @@
*/
   public abstract int getLongInt();
   
  -/**
  - * Send a packet to the web server.  Works for any type of message.
  - *
  - * @param msg A packet with accumulated data to send to the server --
  - * this method will write out the length in the header.  
  - */
  -public abstract void send(Channel ch, Endpoint ep) throws IOException;
  +public abstract int getHeaderLength();
   
  -public abstract int receive(Channel ch, Endpoint ep) throws IOException;
  +public abstract int processHeader();
   
  +public abstract byte[] getBuffer();
  +
  +public abstract int getLen();
   
   public abstract void dump(String msg);
   
  
  
  
  1.2   +3 -0  jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Webapp.java
  
  Index: Webapp.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Webapp.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Webapp.java   31 Dec 2001 19:03:53 -  1.1
  +++ Webapp.java   26 Jan 2002 07:22:23 -  1.2
  @@ -99,6 +99,9 @@
   
   int logLevel;
   
  +// 
  +String welcomeFiles[];
  +
   /* Server env variables we want to receive
*/
   String envvars[];
  
  
  
  1.3   +1 -14 jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Worker.java
  
  Index: Worker.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Worker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Worker.java   21 Jan 2002 20:11:52 -  1.2
  +++ Worker.java   26 Jan 2002 07:22:23 -  1.3
  @@ -84,25 +84,12 @@
   this.we=we;
   }
   
  -public WorkerEnv getWorkerEnv() {
  -return we;
  -}
  -
   /*  Start/stop  */
   
  -/** Configuration. We'll extract and check the settings.
  - *  XXX We should be able to get info from the same
  - *  properties file as the C side, so port, etc could be
  - *  configured in only one place
  - */
  -public void validate(  Properties p ) 
  -{
  -}
  -
   /** Initialize the worker. After this call the worker will be
*  ready to accept new requests.
*/
  -public void init(WorkerEnv we) throws IOException {
  +public void init() throws IOException {
   // Run a thread that will accept connections.
   
   
  
  
  
  1.3   +21 -13

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelJni.java

2002-01-25 Thread costin

costin  02/01/25 23:24:37

  Modified:jk/java/org/apache/jk/common ChannelJni.java
  Log:
  Yes, it's working ( at least at hello world level ). And I bet it's going to be
  much better now ( I only tested with the dummy container, 3.3/4.0 should be
  easy to add but need some more work )
  
  See the commits on the c side for details.
  
  Revision  ChangesPath
  1.3   +129 -40   
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelJni.java
  
  Index: ChannelJni.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelJni.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ChannelJni.java   16 Jan 2002 15:38:29 -  1.2
  +++ ChannelJni.java   26 Jan 2002 07:24:37 -  1.3
  @@ -77,60 +77,149 @@
*
* @author Costin Manolache
*/
  -public class ChannelJni extends JkChannel implements Channel {
  +public class ChannelJni extends Channel {
   
  +int receivedNote=1;
  +public ChannelJni() {
  +// we use static for now, it's easier on the C side.
  +// Easy to change after we get everything working
  +chJni=this;
  +}
   
  -/*   */
  -
  -static WorkerEnv wenv=null;
  +public void init() throws IOException {
  +// static field init, temp
  +wEnv=we;
  +}
   
  -public static int startup(String cmdLine,
  -  String stdout,
  -  String stderr)
  +public int receive( Msg msg, Endpoint ep )
  +throws IOException
   {
  -System.out.println(In startup);
  -System.err.println(In startup err);
  -if( wenv!=null ) {
  -d(Second call, ignored );
  -return 1;
  -}
  -
  -try {
  -if(null != stdout) {
  -PrintStream out=new PrintStream(new FileOutputStream(stdout));
  -System.setOut(out);
  -if( stderr==null ) 
  -System.setErr(out);
  -}
  -if(null != stderr) {
  -PrintStream err=new PrintStream(new FileOutputStream(stderr));
  -System.setErr(err);
  -if( stdout==null )
  -System.setOut(err);
  -}
  -if( stdout==null  stderr==null ) {
  -// no problem, use stderr - it'll go to error.log of the server.
  -System.setOut( System.err );
  -}
  -} catch(Throwable t) {
  +Msg sentResponse=(Msg)ep.getNote( receivedNote );
  +// same buffer is used, no need to copy
  +if( msg==sentResponse ) {
  +d(Returned previously received message );
  +return 0;
   }
  -System.out.println(New stream);
  -System.err.println(New err stream);
   
  -return 1;
  +d(XXX Copy previously received message );
  +// send will alter the msg and insert the response.
  +// copy...
  +// XXX TODO
  +
  +return 0;
   }
   
  -public static int service(long s, long l)
  +/** Send the packet. XXX This will modify msg !!!
  + *  We could use 2 packets, or sendAndReceive().
  + *
  + */
  +public int send( Msg msg, Endpoint ep )
  +throws IOException
   {
  -System.out.println(In service);
  +byte buf[]=msg.getBuffer();
  +EpData epData=(EpData)ep.getNote( epDataNote );
  +
  +// send and get the response
  +d( Sending packet );
  +msg.end();
  +// msg.dump(Outgoing: );
  +
  +int status=sendPacket( epData.jkEnvP, epData.jkEndpointP,
  +   epData.jkServiceP, buf, msg.getLen() );
  +ep.setNote( receivedNote, msg );
  +
  +d( Sending packet - done );
   return 0;
   }
   
  -public static void shutdown() {
  -System.out.println(In shutdown);
  +/*   */
  +
  +static WorkerEnv wEnv=null;
  +static int epDataNote=-1;
  +static ChannelJni chJni=new ChannelJni();
  +
  +static class EpData {
  +public long jkEnvP;
  +public long jkEndpointP;
  +public long jkServiceP;
  +}
  +
  +public static Endpoint createEndpointStatic(long env, long epP) {
  +Endpoint ep=new Endpoint();
  +if( epDataNote==-1) 
  +epDataNote=wEnv.getNoteId(WorkerEnv.ENDPOINT_NOTE, epData);
  +
  +d(createEndpointStatic()  + env +   + epP);
  +EpData epData=new EpData();
  +epData.jkEnvP=env;
  +epData.jkEndpointP=epP;
  +ep.setNote( epDataNote, epData );
  +return ep;
   }
   
  -private static final int dL=0;

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelSocket.java ChannelUn.java

2002-01-25 Thread costin

costin  02/01/25 23:25:09

  Modified:jk/java/org/apache/jk/common ChannelSocket.java
ChannelUn.java
  Log:
  Updates, fixes.
  
  Revision  ChangesPath
  1.3   +80 -25
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java
  
  Index: ChannelSocket.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ChannelSocket.java16 Jan 2002 15:38:29 -  1.2
  +++ ChannelSocket.java26 Jan 2002 07:25:09 -  1.3
  @@ -94,7 +94,7 @@
*
* @author Costin Manolache
*/
  -public class ChannelSocket extends JkChannel implements Channel {
  +public class ChannelSocket extends Channel {
   
   int port;
   InetAddress inet;
  @@ -103,8 +103,6 @@
   int linger=100;
   int socketTimeout;
   
  -Worker worker;
  -
   ThreadPool tp=new ThreadPool();
   
   /*  Tcp socket options  */
  @@ -117,14 +115,6 @@
   this.port=port;
   }
   
  -public void setWorker( Worker w ) {
  -worker=w;
  -}
  -
  -public Worker getWorker() {
  -return worker;
  -}
  -
   public void setAddress(InetAddress inet) {
   this.inet=inet;
   }
  @@ -214,10 +204,70 @@
   }
   }
   
  -public void write( Endpoint ep, byte[] b, int offset, int len) throws 
IOException {
  +public int send( Msg msg, Endpoint ep)
  +throws IOException
  +{
  +msg.end(); // Write the packet header
  +byte buf[]=msg.getBuffer();
  +int len=msg.getLen();
  +
  +if(dL  5 )
  +d(send()  + len +   + buf[4] );
  +
   OutputStream os=(OutputStream)ep.getNote( osNote );
  +os.write( buf, 0, len );
  +return len;
  +}
  +
  +public int receive( Msg msg, Endpoint ep )
  +throws IOException
  +{
  +if (dL  0) {
  +d(receive());
  +}
  +
  +byte buf[]=msg.getBuffer();
  +int hlen=msg.getHeaderLength();
  +
  + // XXX If the length in the packet header doesn't agree with the
  + // actual number of bytes read, it should probably return an error
  + // value.  Also, callers of this method never use the length
  + // returned -- should probably return true/false instead.
  +
  +int rd = this.read(ep, buf, 0, hlen );
  +
  +if(rd  0) {
  +// Most likely normal apache restart.
  +return rd;
  +}
  +
  +msg.processHeader();
   
  -os.write( b, offset, len );
  +/* After processing the header we know the body
  +   length
  +*/
  +int blen=msg.getLen();
  +
  + // XXX check if enough space - it's assert()-ed !!!
  +
  + int total_read = 0;
  +
  +total_read = this.read(ep, buf, hlen, blen);
  +
  +if (total_read = 0) {
  +d(can't read body, waited # + blen);
  +return  -1;
  +}
  +
  +if (total_read != blen) {
  + d( incomplete read, waited # + blen +
  + got only  + total_read);
  +return -2;
  +}
  +
  +if (dL  0)
  + d(receive:  total read =  + total_read);
  + return total_read;
   }
   
   /**
  @@ -228,24 +278,27 @@
*
* from read() Linux manual
*
  - * On success, the number of bytes read is returned (zero indicates end of 
file),
  - * and the file position is advanced by this number.
  - * It is not an error if this number is smaller than the number of bytes 
requested;
  - * this may happen for example because fewer bytes
  - * are actually available right now (maybe because we were close to end-of-file,
  - * or because we are reading from a pipe, or  from  a
  + * On success, the number of bytes read is returned (zero indicates end
  + * of file),and the file position is advanced by this number.
  + * It is not an error if this number is smaller than the number of bytes
  + * requested; this may happen for example because fewer bytes
  + * are actually available right now (maybe because we were close to
  + * end-of-file, or because we are reading from a pipe, or  from  a
* terminal),  or  because  read()  was interrupted by a signal.
* On error, -1 is returned, and errno is set appropriately. In this
* case it is left unspecified whether the file position (if any) changes.
*
**/
  -public int read( Endpoint ep, byte[] b, int offset, int len) throws IOException 
{
  +public int read( Endpoint ep, byte[] b, int offset, int len)
  +throws 

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common HandlerRequest.java MsgAjp.java WorkerDummy.java

2002-01-25 Thread costin

costin  02/01/25 23:25:53

  Modified:jk/java/org/apache/jk/common HandlerRequest.java MsgAjp.java
WorkerDummy.java
  Log:
  Updates ( similar with what changed on the C side ), fixes.
  
  Revision  ChangesPath
  1.2   +11 -14
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java
  
  Index: HandlerRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HandlerRequest.java   31 Dec 2001 19:02:01 -  1.1
  +++ HandlerRequest.java   26 Jan 2002 07:25:53 -  1.2
  @@ -75,8 +75,10 @@
* Handle messages related with basic request information.
*
* This object can handle the following incoming messages:
  - * - FORWARD_REQUEST input message ( sent when a request is passed from the web 
server )
  - * - RECEIVE_BODY_CHUNK input ( sent by container to pass more body, in response 
to GET_BODY_CHUNK )
  + * - FORWARD_REQUEST input message ( sent when a request is passed from the
  + *   web server )
  + * - RECEIVE_BODY_CHUNK input ( sent by container to pass more body, in
  + *   response to GET_BODY_CHUNK )
*
* It can handle the following outgoing messages:
* - SEND_HEADERS. Pass the status code and headers.
  @@ -198,7 +200,7 @@
   {
   }
   
  -public void init( WorkerEnv we ) {
  +public void init() {
// register incoming message handlers
we.registerMessageType( JK_AJP13_FORWARD_REQUEST,
   JK_AJP13_FORWARD_REQUEST,
  @@ -224,12 +226,6 @@
   int postMsgNote=5;
   int tmpBufNote=6;
   
  -Worker w;
  -
  -public void setWorker( Worker w ) {
  -this.w=w;
  -}
  -
   public int callback(int type, Channel ch, Endpoint ep, Msg msg)
   throws IOException
   {
  @@ -244,7 +240,7 @@
   decodeRequest( msg, req, ch, ep );
   
   /* XXX it should be computed from request, by workerEnv */
  -w.service( req, ch, ep );
  +worker.service( req, ch, ep );
   return OK;
   }
   
  @@ -256,6 +252,7 @@
   // Translate the HTTP method code to a String.
   byte methodCode = msg.getByte();
   String mName=methodTransArray[(int)methodCode - 1];
  +
   req.method().setString(mName);
   
   msg.getBytes(req.protocol()); 
  @@ -290,12 +287,12 @@
   }
   
/* Read present data */
  - int err = postMsg.receive(ch, ep);
  + int err = ch.receive(postMsg, ep);
}
   
   if (dL  5) {
   d(req.toString());
  -}
  + }
   
   return OK;
   }
  @@ -385,7 +382,7 @@
jsseCerts);
   break;

  - case SC_A_SSL_CIPHER   :
  + case SC_A_SSL_CIPHER   :
req.setSecure( true );
   msg.getBytes(tmpMB);
req.setAttribute(javax.servlet.request.cipher_suite,
  @@ -453,7 +450,7 @@
   }
   }
   
  -private static final int dL=10;
  +private static final int dL=0;
   private static void d(String s ) {
   System.err.println( HandlerRequest:  + s );
   }
  
  
  
  1.4   +21 -63
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/MsgAjp.java
  
  Index: MsgAjp.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/MsgAjp.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MsgAjp.java   12 Jan 2002 04:03:42 -  1.3
  +++ MsgAjp.java   26 Jan 2002 07:25:53 -  1.4
  @@ -90,16 +90,16 @@
*/
   public class MsgAjp extends Msg {
   
  -byte buf[]=new byte[8300];
  +private byte buf[]=new byte[8300];
   // The current read or write position in the buffer
  -int pos;
  +private int pos;
   /**
* This actually means different things depending on whether the
* packet is read or write.  For read, it's the length of the
* payload (excluding the header).  For write, it's the length of
* the packet as a whole (counting the header).  Oh, well.
*/
  -int len; 
  +private int len; 
   
   
   
  @@ -128,7 +128,15 @@
   buf[2]=  (byte)((dLen8 )  0xFF );
   buf[3] = (byte)(dLen  0xFF);
   }
  - 
  +
  +public byte[] getBuffer() {
  +return buf;
  +}
  +
  +public int getLen() {
  +return len;
  +}
  +
   //  Data Writing Methods ===
   
   /**
  @@ -200,7 +208,8 @@
*/
   public void appendBytes( byte b[], int off, int numBytes ) {
   if( pos + 

cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util IntrospectionUtils.java

2002-01-25 Thread costin

costin  02/01/25 23:29:04

  Added:   util/java/org/apache/tomcat/util IntrospectionUtils.java
  Log:
  Added the introspection util, needed to set the worker. I hope it doesn't
  affect 4.0.2  release - I can move it to jk.util if needed.
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/IntrospectionUtils.java
  
  Index: IntrospectionUtils.java
  ===
  /*
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  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 acknowlegement:  
   *   This product includes software developed by the 
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Tomcat, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written 
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * 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 THE APACHE SOFTWARE FOUNDATION 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 the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */ 
  
  
  package org.apache.tomcat.util;
  import java.lang.reflect.*;
  import java.net.*;
  import java.io.*;
  import java.util.*;
  
  // Depends: JDK1.1
  
  /**
   *  Utils for introspection and reflection
   */
  public final class IntrospectionUtils {
  
  /** Call execute() - any ant-like task should work
   */
  public static void execute( Object proxy, String method  )
throws Exception
  {
Method executeM=null;
Class c=proxy.getClass();
Class params[]=new Class[0];
//  params[0]=args.getClass();
executeM=findMethod( c, method, params );
if( executeM == null ) {
throw new RuntimeException(No execute in  + proxy.getClass() );
}
executeM.invoke(proxy, null );//new Object[] { args });
  }
  
  /** 
   *  Call void setAttribute( String ,Object )
   */
  public static void setAttribute( Object proxy, String n, Object v)
throws Exception
  {
if( proxy instanceof AttributeHolder ) {
((AttributeHolder)proxy).setAttribute( n, v );
return;
}

Method executeM=null;
Class c=proxy.getClass();
Class params[]=new Class[2];
params[0]= String.class;
params[1]= Object.class;
executeM=findMethod( c, setAttribute, params );
if( executeM == null ) {
System.out.println(No setAttribute in  + proxy.getClass() );
return;
}
if( false )
System.out.println(Setting  + n + = + v +   in  + proxy);
executeM.invoke(proxy, new Object[] { n, v });
return; 
  }