cvs commit: jakarta-tomcat-jasper/jasper34/liaison/org/apache/jasper34/liaison - New directory
costin 01/06/06 23:45:51 jakarta-tomcat-jasper/jasper34/liaison/org/apache/jasper34/liaison - New directory
cvs commit: jakarta-tomcat-jasper/jasper34/runtime/org/apache/jasper34/runtime HttpJspBase.java
costin 01/06/06 23:52:17 Modified:jasper34/runtime/org/apache/jasper34/runtime HttpJspBase.java Log: Few fixes I missed last time. We need to get out at the begining, since the page could call pushBody and we'll get a different out. Another small fix - out could be BodyContentImpl ( and I have no idea how to flush or if it should be flushed - or what happens if some pushBody() is called without pop ). ( one watchdog test does that ). Keeping the old behavior ( i.e. do nothing ) is probably the best idea. Revision ChangesPath 1.3 +8 -3 jakarta-tomcat-jasper/jasper34/runtime/org/apache/jasper34/runtime/HttpJspBase.java Index: HttpJspBase.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper34/runtime/org/apache/jasper34/runtime/HttpJspBase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- HttpJspBase.java 2001/06/06 06:45:33 1.2 +++ HttpJspBase.java 2001/06/07 06:52:16 1.3 @@ -121,10 +121,12 @@ { PageContext pageContext=null; + JspWriter out=null; try { try { _jspx_init(); // need to be in init ! pageContext = _getPageContext( request, response ); + out=pageContext.getOut(); _jspService(pageContext, request, response ); } catch (Exception ex) { if (pageContext != null) @@ -138,9 +140,12 @@ IOException err=null; if( pageContext!=null ) { try { - JspWriterImpl out=(JspWriterImpl)pageContext.getOut(); - if( out != null ) - out.flushBuffer(); + // it can also be BodyContent ! + // XXX how do we flush body content ? + // We only flush the top level out, what if we have + // a stack ? + if( out instanceof JspWriterImpl ) + ((JspWriterImpl)out).flushBuffer(); } catch( IOException ex ) { err=ex; // handlePageException( ex );
cvs commit: jakarta-tomcat-jasper/jasper34/liaison/org/apache/jasper34/tomcat33 JasperEngineContext.java
costin 01/06/06 23:56:16 Modified:jasper34/liaison/org/apache/jasper34/cli CommandLineContext.java jasper34/liaison/org/apache/jasper34/servlet JspEngineContext.java jasper34/liaison/org/apache/jasper34/tomcat33 JasperEngineContext.java Added: jasper34/liaison/org/apache/jasper34/liaison TagLibReader.java package.html Log: Moved the web.xml and tld reading out of generator and into liaison. The container could pass the information from it's reading of web.xml and may have better/faster ways of reading the xml. We provide a default ( the old DOM based code ), treat it as a black box ( and start a new impl. if you want new features ). Some other changes - the API allows now to do the reading only once ( but the container liaison will have to keep the TagLibraries instance around - right now we create/garbage collect a lot ) Revision ChangesPath 1.3 +21 -0 jakarta-tomcat-jasper/jasper34/liaison/org/apache/jasper34/cli/CommandLineContext.java Index: CommandLineContext.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper34/liaison/org/apache/jasper34/cli/CommandLineContext.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CommandLineContext.java 2001/06/06 06:40:40 1.2 +++ CommandLineContext.java 2001/06/07 06:56:12 1.3 @@ -63,6 +63,8 @@ import org.apache.jasper34.core.Compiler; import org.apache.jasper34.core.*; import org.apache.jasper34.runtime.*; +import org.apache.jasper34.jsptree.*; +import org.apache.jasper34.liaison.*; import org.apache.jasper34.parser.*; //import org.apache.jasper.runtime.JspLoader; @@ -371,6 +373,25 @@ } File f = new File(uriRoot, path.replace('/', File.separatorChar)); return f.getAbsolutePath(); +} + + +public void readWebXml( TagLibraries tli ) + throws IOException, JasperException +{ + TagLibReader reader=new TagLibReader( this, tli ); + reader.readWebXml( tli ); +} + +/** Read a tag lib descriptor ( tld ). You can use the default + implementation ( TagLibReader ). +*/ +public void readTLD( TagLibraries libs, + TagLibraryInfoImpl tl, String prefix, String uri ) + throws IOException, JasperException +{ + TagLibReader reader=new TagLibReader( this, libs ); + reader.readTagLib( tl, prefix, uri ); } } 1.1 jakarta-tomcat-jasper/jasper34/liaison/org/apache/jasper34/liaison/TagLibReader.java Index: TagLibReader.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
mod_jk for AIX 4.3.3
hello, I seem to be unable to compile the mod_jk.so module myself ... the apxs command gives (executed under src/native/apache1.3) apxs -o mod_jk.so -DAIX -I../jk -I/usr/dev_java2/include -c *.c ../jk/*.c which returns : xlC_r -DAIX=42 -U__STR__ -DAIX_BIND_PROCESSOR -DUSE_HSREGEX -DUSE_EXPAT -I../lib /expat-lite -O2 -qcpluscmt -DAFPA -DNO_DL_NEEDED -DSHARED_MODULE -I/usr/HTTPServ er/include -I../jk -I/usr/dev_java2/include -DAIX -c mod_jk.c apxs:Break: Command failed with rc=16711680 could anyone explain this error to me, or tell me what to do or even send me the binary file for AIX thx Stijn Ver Eecke [EMAIL PROTECTED] This mail has been scanned for virusses at the sender's gateway. This mail should not contain any virusses known by the latest pattern-files of any antivirus software. If it does, please notify the system administrator via email to [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/jsptree JspPageInfo.java TagLibraries.java TagLibraryInfoImpl.java package.html TreeUtil.java
costin 01/06/06 23:59:08 Modified:jasper34/generator/org/apache/jasper34/core Compiler.java ContainerLiaison.java JspCompilationContext.java jasper34/generator/org/apache/jasper34/generator JspParseEventListener.java JspUtil.java ServletWriter.java jasper34/generator/org/apache/jasper34/jsptree JspPageInfo.java TagLibraries.java TagLibraryInfoImpl.java package.html Removed: jasper34/generator/org/apache/jasper34/jsptree TreeUtil.java Log: Few changes in TagLibrary reading. Removed all the code that reads the web.xml/tld, moved to liaison ( you can plug any piece that does the same thing without touching the generator ). This simplifies a lot the code in jsptree. Next step will be to refactor JspCompilationContext - part will be a singleton ( per webapp ), the ContainerLiaison, and part will go into JspPageInfo ( the servlet name, jsp page, etc ) Revision ChangesPath 1.2 +3 -1 jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/core/Compiler.java Index: Compiler.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/core/Compiler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Compiler.java 2001/06/06 06:25:11 1.1 +++ Compiler.java 2001/06/07 06:58:55 1.2 @@ -94,9 +94,11 @@ protected JavaCompiler javac; protected Mangler mangler; protected JspCompilationContext ctxt; +protected ContainerLiaison liaison; -public Compiler(JspCompilationContext ctxt) { +public Compiler(ContainerLiaison liaison, JspCompilationContext ctxt) { this.ctxt = ctxt; + this.liaison=liaison; } /** 1.2 +43 -0 jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/core/ContainerLiaison.java Index: ContainerLiaison.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/core/ContainerLiaison.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ContainerLiaison.java 2001/06/06 06:27:02 1.1 +++ ContainerLiaison.java 2001/06/07 06:58:55 1.2 @@ -107,6 +107,49 @@ */ public abstract String getRealPath(String path); +// WEB-INF access + +/** Read web.xml and add all the taglib locations to the + TagLibraries ( if it wasn't done already ). + It'll call back addTaglibLocation. + You can use the default implementation ( TagLibReader ) + or container specific code. +*/ +public void readWebXml( TagLibraries tli ) + throws IOException, JasperException; + +/** Read a tag lib descriptor ( tld ). You can use the default + implementation ( TagLibReader ). +*/ +public void readTLD( TagLibraries libs, TagLibraryInfoImpl tl, + String prefix, String uri ) + throws IOException, JasperException; + + +// Classpath and class loader + +/** + * The classpath that is passed off to the Java compiler. + */ +public String getClassPath(); + +/** + * What class loader to use for loading classes while compiling + * this JSP? I don't think this is used right now -- akv. + */ +public ClassLoader getClassLoader(); + +// Locations + +/** + * What is the scratch directory we are generating code into? + * FIXME: In some places this is called scratchDir and in some + * other places it is called outputDir. + */ +public String getOutputDir(); + + + // messages /** * Get hold of a message or any string from our resources 1.3 +46 -26 jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/core/JspCompilationContext.java Index: JspCompilationContext.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/core/JspCompilationContext.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JspCompilationContext.java2001/06/06 06:27:38 1.2 +++ JspCompilationContext.java2001/06/07 06:58:56 1.3 @@ -63,6 +63,7 @@ import org.apache.jasper34.generator.*; import org.apache.jasper34.parser.*; +import org.apache.jasper34.jsptree.*; import java.io.IOException; import org.apache.jasper34.runtime.JasperException;
cvs commit: jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/core Compiler.java ContainerLiaison.java
costin 01/06/07 00:02:27 Modified:jasper34 build.xml jasper34/generator/org/apache/jasper34/core Compiler.java ContainerLiaison.java Log: Fix some mistakes in previous commit. Revision ChangesPath 1.5 +1 -0 jakarta-tomcat-jasper/jasper34/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper34/build.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- build.xml 2001/06/06 06:48:17 1.4 +++ build.xml 2001/06/07 07:02:22 1.5 @@ -139,6 +139,7 @@ jar jarfile=${build.dir}/jasper34_liaison.jar basedir=${build.dir}/classes include name=org/apache/jasper34/servlet/**/ + include name=org/apache/jasper34/liaison/**/ include name=org/apache/jasper34/tomcat33/**/ /jar 1.3 +5 -1 jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/core/Compiler.java Index: Compiler.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/core/Compiler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Compiler.java 2001/06/07 06:58:55 1.2 +++ Compiler.java 2001/06/07 07:02:25 1.3 @@ -100,12 +100,16 @@ this.ctxt = ctxt; this.liaison=liaison; } +public Compiler(JspCompilationContext ctxt) { +this.ctxt = ctxt; + this.liaison=null; +} /** * Compile the jsp file from the current engine context * * @return true if the class file was outdated the jsp file - * was recompiled. + * was recomp iled. */ public boolean compile() throws FileNotFoundException, JasperException, Exception 1.3 +8 -5 jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/core/ContainerLiaison.java Index: ContainerLiaison.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/core/ContainerLiaison.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ContainerLiaison.java 2001/06/07 06:58:55 1.2 +++ ContainerLiaison.java 2001/06/07 07:02:25 1.3 @@ -63,6 +63,9 @@ import org.apache.tomcat.util.log.Log; import org.apache.tomcat.util.res.StringManager; +import org.apache.jasper34.jsptree.*; +import java.io.IOException; +import org.apache.jasper34.runtime.JasperException; // XXX Not used yet - will replace part of Constants and JspCompilationCtx @@ -115,13 +118,13 @@ You can use the default implementation ( TagLibReader ) or container specific code. */ -public void readWebXml( TagLibraries tli ) +public abstract void readWebXml( TagLibraries tli ) throws IOException, JasperException; /** Read a tag lib descriptor ( tld ). You can use the default implementation ( TagLibReader ). */ -public void readTLD( TagLibraries libs, TagLibraryInfoImpl tl, +public abstract void readTLD( TagLibraries libs, TagLibraryInfoImpl tl, String prefix, String uri ) throws IOException, JasperException; @@ -131,13 +134,13 @@ /** * The classpath that is passed off to the Java compiler. */ -public String getClassPath(); +public abstract String getClassPath(); /** * What class loader to use for loading classes while compiling * this JSP? I don't think this is used right now -- akv. */ -public ClassLoader getClassLoader(); +public abstract ClassLoader getClassLoader(); // Locations @@ -146,7 +149,7 @@ * FIXME: In some places this is called scratchDir and in some * other places it is called outputDir. */ -public String getOutputDir(); +public abstract String getOutputDir();
RE: per-context realms
For 3.2.2 ? FYI: perContext interceptors/valves are a standard feature in 3.3 and 4.0... Saludos , Ignacio J. Ortega -Mensaje original- De: Michael Jennings [mailto:[EMAIL PROTECTED]] Enviado el: miércoles 6 de junio de 2001 17:56 Para: [EMAIL PROTECTED] Asunto: per-context realms Hi everyone, Does anyone have an idea of how I could go about implementing realms/authentication on a per-context basis? Ideally, what I would like to do is have each context control their users and roles. Where should I look to get a clue? -Mike __ Mike Jennings Southgate Software Ltd. 250-382-6851 (ph) 250-382-6800 (fax) [EMAIL PROTECTED]
mod_jk for HP-UX 11.0
Hi, Does anyone know where can I get a compiled version of mod_jk for HP-UX 11.0?? It seem that we have a problem with the compilation... Thanks in advance
Re: mod_jk for HP-UX 11.0
Alberto Silva wrote: Hi, Does anyone know where can I get a compiled version of mod_jk for HP-UX 11.0?? It seem that we have a problem with the compilation... Thanks in advance Have you tried with the mod_jk that is on jakarta-tomcat-connectors? Running there (in jk/src/native) buildconf.sh and configure. Should create an apache-1.3/Makefile.apxs that contains the right flags to compile on your plateform. Cheers Jean-frederic
RE: mod_jk for HP-UX 11.0
Hi, Hi, Does anyone know where can I get a compiled version of mod_jk for HP-UX 11.0?? It seem that we have a problem with the compilation... I've compiled and run successfully mod_jk from the tomcat 3.3 milestone 2. Thanks in advance Guillaume
Re: cvs commit: jakarta-tomcat-4.0/connectors/scandoc scandoc.pl template.pl
GOMEZ Henri at [EMAIL PROTECTED] wrote: Thanks Pier :=) I have a couple of major updates, but right now I'm fighting with a major problem with the [EMAIL PROTECTED] mailing list :( :(... As soon as I'm done and I can check them, I'll be doing some updates... Pier
cvs commit: jakarta-tomcat-connectors/jk/src/doc AJPv14.txt
hgomez 01/06/07 06:39:01 Modified:jk/src/doc AJPv14.txt Log: Updated documentation : SecretKey is now set in worker.properties Revision ChangesPath 1.4 +9 -5 jakarta-tomcat-connectors/jk/src/doc/AJPv14.txt Index: AJPv14.txt === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/doc/AJPv14.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- AJPv14.txt2001/05/21 15:26:09 1.3 +++ AJPv14.txt2001/06/07 13:38:56 1.4 @@ -1,14 +1,14 @@ /*** * Description: Proposal for Apache JServ 1.4 * * Author: Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.3 $ * + * Version: $Revision: 1.4 $ * ***/ This document is a proposal of evolution of the current Apache JServ Protocol version 1.3, also known as ajp13. I'll not cover here the full protocol but only the add-on from ajp13. -This third pass include comments from the tomcat-dev list and +This x' pass include comments from the tomcat-dev list and misses discovered during developpment. Missing features in AJP13 @@ -136,10 +136,14 @@ | LOGNOK CMD (1 byte) | FAILURE CODE (32bits) | +-+---+ -The secret key will be set by a new JkSecretKey +The secret key will be set by a new propertie in +workers.properties : secretkey -ie: JkSecretKey myworker1 myverysecurekey - +worker.ajp14.port=8009 +worker.ajp14.host=localhost +worker.ajp14.type=ajp14 +worker.ajp14.secretkey=myverysecretkey + Shutdown feature
cvs commit: jakarta-tomcat-connectors/jk/src/java/org/apache/ajp Ajp13Packet.java
hgomez 01/06/07 06:42:42 Modified:jk/src/java/org/apache/ajp Ajp13Packet.java Log: Protocol headers ('AB' and 0x1234) no more hidden in code :) Revision ChangesPath 1.5 +5 -3 jakarta-tomcat-connectors/jk/src/java/org/apache/ajp/Ajp13Packet.java Index: Ajp13Packet.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/java/org/apache/ajp/Ajp13Packet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Ajp13Packet.java 2001/05/29 23:02:59 1.4 +++ Ajp13Packet.java 2001/06/07 13:42:36 1.5 @@ -73,6 +73,8 @@ public class Ajp13Packet { public static final String DEFAULT_CHAR_ENCODING = 8859_1; +public static final intAJP13_WS_HEADER = 0x1234; +public static final intAJP13_SW_HEADER = 0x4142; // 'AB' /** * encoding to use when converting byte[] - string @@ -179,7 +181,7 @@ int mark = getInt(); len = getInt(); -if( mark != 0x1234 ) { +if( mark != AJP13_WS_HEADER ) { // XXX Logging System.out.println(BAD packet + mark); dump( In: ); @@ -196,8 +198,8 @@ public void reset() { len = 4; pos = 4; -buff[0] = (byte)'A'; -buff[1] = (byte)'B'; +buff[0] = (byte)(AJP13_WS_HEADER 8); +buff[1] = (byte)(AJP13_WS_HEADER 0xFF); } /**
AJP14 - mod_jk - adventure continue
The ajp14 continue : There will be a huge commit today since I've started the ajp14 stuff (worker). Notes : I've updated Domino, Netscape, IIS, Apache 1.3/2.0 since I add the uw_map to wc_open call. AJP14 and it's autoconf feature will try to load the URI 2 worker maps... On the Java Side I've started a quick patch on TC 3.3 Ajp13.java Ajp13Interceptor. I'll wait for TC 3.3 java code import to commit the java code for Ajp14 :) But here they are attached : No login handling or Context Info forwarding yet, only protocol modification :=) - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 Ajp14.java Ajp14Interceptor.java
cvs commit: jakarta-tomcat-connectors/jk/src/native README
hgomez 01/06/07 06:46:48 Modified:jk/src/native README Log: Update on build instruction Very easy now with JF Clere autoconf :) Revision ChangesPath 1.2 +2 -62 jakarta-tomcat-connectors/jk/src/native/README Index: README === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/README,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- README2001/05/14 09:09:42 1.1 +++ README2001/06/07 13:46:43 1.2 @@ -1,6 +1,6 @@ README for jakarta-tomcat-connector -$Id: README,v 1.1 2001/05/14 09:09:42 hgomez Exp $ +$Id: README,v 1.2 2001/06/07 13:46:43 hgomez Exp $ Please see doc/mod_jk-howto.html for more verbose instructions @@ -27,64 +27,4 @@ * Direct access to Tomcat 3.2/3.3 servlet engine via ajp12/ajp13 protocol. -* OK, then how do I build web-connector ? - -For Unix: - -Change to the apache1.3 or apache2.0 directory, -depending on which version of Apache you are running. - -Execute ./build-unix.sh This script sets some environment variables -and then calls Apache's apxs script to do the actual compile. - -If this doesn't work, please check the source for build-unix.sh. You -may have to edit some variables. - -Alternately, you may have more luck with the makefiles. Execute them -with e.g. make -f Makefile.linux mod_jtc.so - -For Windows: - -[need more info feel free to contact me] - -* How do I install mod_jtc.so? - -Copy mod_jtc.so into your APACHE_HOME/libexec - -Add the following line to APACHE_HOME/conf/httpd.conf. Replace -TOMCAT_HOME with the actual directory name. - - Include TOMCAT_HOME/conf/mod_jtc.conf-auto - -That's it! - -When Tomcat starts, it automatically writes out mod_jtc.conf-auto based -on your server.xml settings. If this is inadequate for your needs, -you can copy mod_jtc.conf-auto to a new file called mod_jtc.conf and -then change httpd.conf to read - - Include TOMCAT_HOME/conf/mod_jtc.conf - -Note that Tomcat must be started *before* Apache for mod_jtc to -initialize correctly. Since tomcat.sh start launches Tomcat in the -background, you may have to do something like the following in your -startup script: - - cd $TOMCAT_HOME/bin - ./tomcat.sh start - sleep 4 - $APACHE_HOME/bin/apachectl start - -[Note: apachectl should be run as root, but Tomcat should be run as a -local user; this means that the above script would lead to a security -problem. Any suggestions to fix?] - -* Where do I report bugs/errors? - -See http://jakarta.apache.org/getinvolved/mail.html and -http://jakarta.apache.org/bugs/index.html for information. - -Credits: -mod_jk written by Gal Shachor and many others -README and .sh scripts written by Alex Chaffee +* OK, then how do I build web-connector ? Just take a look at README.configure
cvs commit: jakarta-tomcat-connectors/jk/src/native/apache-1.3 Makefile.freebsd Makefile.in Makefile.linux Makefile.nw list.mk mod_jk.dsp
hgomez 01/06/07 06:48:59 Modified:jk/src/native/apache-1.3 Makefile.freebsd Makefile.in Makefile.linux Makefile.nw list.mk mod_jk.dsp Log: Updated build files (jk_ajp_common added) Revision ChangesPath 1.5 +1 -1 jakarta-tomcat-connectors/jk/src/native/apache-1.3/Makefile.freebsd Index: Makefile.freebsd === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/apache-1.3/Makefile.freebsd,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Makefile.freebsd 2001/06/01 09:54:00 1.4 +++ Makefile.freebsd 2001/06/07 13:48:37 1.5 @@ -18,7 +18,7 @@ SRCS=jk_ajp12_worker.c jk_connect.c jk_msg_buff.c jk_util.c jk_ajp13.c \ jk_jni_worker.c jk_pool.c jk_worker.c jk_ajp13_worker.c jk_lb_worker.c \ jk_sockbuf.c jk_map.c jk_uri_worker_map.c jk_ajp14.c jk_ajp14_worker.c \ - jk_md5.c jk_context.c + jk_md5.c jk_context.c jk_ajp_common.c OBJS=${patsubst %.c,%.o,${SRCS}} 1.5 +1 -1 jakarta-tomcat-connectors/jk/src/native/apache-1.3/Makefile.in Index: Makefile.in === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/apache-1.3/Makefile.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Makefile.in 2001/06/01 09:54:00 1.4 +++ Makefile.in 2001/06/07 13:48:39 1.5 @@ -12,7 +12,7 @@ SRCS=${JK}/jk_ajp12_worker.c ${JK}/jk_connect.c ${JK}/jk_msg_buff.c ${JK}/jk_util.c ${JK}/jk_ajp13.c \ ${JK}/jk_jni_worker.c ${JK}/jk_pool.c ${JK}/jk_worker.c ${JK}/jk_ajp13_worker.c ${JK}/jk_lb_worker.c \ ${JK}/jk_sockbuf.c ${JK}/jk_map.c ${JK}/jk_uri_worker_map.c ${JK}/jk_ajp14.c ${JK}/jk_ajp14_worker.c \ - ${JK}/jk_md5.c ${JK}/jk_context.c + ${JK}/jk_md5.c ${JK}/jk_context.c ${JK}/jk_ajp_common.c all: mod_jk.so 1.5 +2 -2 jakarta-tomcat-connectors/jk/src/native/apache-1.3/Makefile.linux Index: Makefile.linux === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/apache-1.3/Makefile.linux,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Makefile.linux2001/06/01 09:54:00 1.4 +++ Makefile.linux2001/06/07 13:48:41 1.5 @@ -15,7 +15,7 @@ SRCS=${JK}/jk_ajp12_worker.c ${JK}/jk_connect.c ${JK}/jk_msg_buff.c ${JK}/jk_util.c ${JK}/jk_ajp13.c \ ${JK}/jk_jni_worker.c ${JK}/jk_pool.c ${JK}/jk_worker.c ${JK}/jk_ajp13_worker.c ${JK}/jk_lb_worker.c \ ${JK}/jk_sockbuf.c ${JK}/jk_map.c ${JK}/jk_uri_worker_map.c ${JK}/jk_ajp14.c ${JK}/jk_ajp14_worker.c \ - ${JK}/jk_md5.c ${JK}/jk_context.c + ${JK}/jk_md5.c ${JK}/jk_context.c ${JK}/jk_ajp_common.c all: mod_jk.so @@ -23,4 +23,4 @@ $(APXS) ${JK_INCL} ${JAVA_INCL} -c -o $@ mod_jk.c $(SRCS) clean: - rm *.o *.so + rm -f *.o *.so 1.6 +2 -1 jakarta-tomcat-connectors/jk/src/native/apache-1.3/Makefile.nw Index: Makefile.nw === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/apache-1.3/Makefile.nw,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Makefile.nw 2001/06/01 09:54:01 1.5 +++ Makefile.nw 2001/06/07 13:48:42 1.6 @@ -53,7 +53,8 @@ jk_ajp14.obj \ jk_ajp14_worker.obj \ jk_md5.obj \ - jk_context.obj + jk_context.obj \ + jk_ajp_common.obj all: $(NLM_NAME).nlm 1.2 +2 -1 jakarta-tomcat-connectors/jk/src/native/apache-1.3/list.mk Index: list.mk === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/apache-1.3/list.mk,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- list.mk 2001/06/05 10:27:52 1.1 +++ list.mk 2001/06/07 13:48:44 1.2 @@ -6,4 +6,5 @@ ${JK}/jk_lb_worker${OEXT} ${JK}/jk_sockbuf${OEXT} \ ${JK}/jk_map${OEXT} ${JK}/jk_uri_worker_map${OEXT} \ ${JK}/jk_ajp14${OEXT} ${JK}/jk_ajp14_worker${OEXT} \ -${JK}/jk_md5${OEXT} ${JK}/jk_jni_worker${OEXT} +${JK}/jk_md5${OEXT} ${JK}/jk_jni_worker${OEXT} \ +${JK}/jk_ajp_common${OEXT} 1.4 +8 -0 jakarta-tomcat-connectors/jk/src/native/apache-1.3/mod_jk.dsp Index: mod_jk.dsp === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/apache-1.3/mod_jk.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- mod_jk.dsp
cvs commit: jakarta-tomcat-connectors/jk/src/native/apache-1.3 mod_jk.c
hgomez 01/06/07 06:49:50 Modified:jk/src/native/apache-1.3 mod_jk.c Log: Removed SecretKey from mod_jk.conf and add uw_map to wc_open (ajp14 autoconf) Revision ChangesPath 1.6 +4 -75 jakarta-tomcat-connectors/jk/src/native/apache-1.3/mod_jk.c Index: mod_jk.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/apache-1.3/mod_jk.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- mod_jk.c 2001/06/04 13:42:47 1.5 +++ mod_jk.c 2001/06/07 13:49:46 1.6 @@ -126,7 +126,6 @@ char * secret_key; jk_map_t *automount; -jk_map_t *secretkeys; jk_uri_worker_map_t *uw_map; @@ -603,24 +602,6 @@ } /* - * JkSecretKey directive handling - * - * JkSecretKey defaultsecretkey - */ - -static const char *jk_secret_key(cmd_parms *cmd, - void *dummy, -char *secret_key) -{ -server_rec *s = cmd-server; -jk_server_conf_t *conf = -(jk_server_conf_t *)ap_get_module_config(s-module_config, jk_module); - -conf-secret_key = secret_key; -return NULL; -} - -/* * JkAutoMount directive handling * * JkAutoMount worker [virtualhost] @@ -642,34 +623,8 @@ map_put(conf-automount, worker, virtualhost, (void **)old); return NULL; } - /* - * JkWorkerSecretKey directive handling - * - * JkWorkerSecretKey worker secretkey - */ - -static const char *jk_worker_secret_key(cmd_parms *cmd, - void *dummy, - char *worker, - char *secretkey) -{ -server_rec *s = cmd-server; -jk_server_conf_t *conf = -(jk_server_conf_t *)ap_get_module_config(s-module_config, jk_module); - -/* - * Add the new automount to the auto map. - */ -char * old; -map_put(conf-secretkeys, worker, secretkey, (void **)old); -return NULL; -} - - - -/* * JkWorkersFile Directive Handling * * JkWorkersFile file @@ -895,13 +850,6 @@ the name of a worker file for the Jakarta servlet containers}, /* - * JkSecretKey specifies the default (common) secret key to works with - * workers in AJP14 protocol - */ - {JkSecretKey, jk_secret_key, NULL, RSRC_CONF, TAKE1, - the default secret key to works with workers}, - - /* * JkAutoMount specifies that the list of handled URLs must be * asked to the servlet engine (autoconf feature) */ @@ -909,13 +857,6 @@ automatic mount points to a servlet-engine worker}, /* - * JkWorkerSecretKey specifies that the secret key associated to a - * worker - */ -{JkWorkerSecretKey, jk_worker_secret_key, NULL, RSRC_CONF, TAKE2, - Secret key for a worker}, - -/* * JkMount mounts a url prefix to a worker (the worker need to be * defined in the worker properties file. */ @@ -951,6 +892,7 @@ * CERTS - Base64-Der-encoded client certificates. * CIPHER - A string specifing the ciphers suite in use. * SESSION - A string specifing the current SSL session. + * KEYSIZE - Size of Key used in dialogue (#bits are secure) */ {JkHTTPSIndicator, jk_set_https_indicator, NULL, RSRC_CONF, TAKE1, Name of the Apache environment that contains SSL indication}, @@ -1079,6 +1021,7 @@ * c-cipher_indicator = HTTPS_CIPHER; c-session_indicator = NULL; + c-key_size_indicator = NULL; */ /* @@ -1095,9 +1038,6 @@ if(!map_alloc((c-automount))) { jk_error_exit(APLOG_MARK, APLOG_EMERG, s, p, Memory error); } - if(!map_alloc((c-secretkeys))) { - jk_error_exit(APLOG_MARK, APLOG_EMERG, s, p, Memory error); - } c-uw_map = NULL; c-secret_key = NULL; @@ -1143,7 +1083,6 @@ if(overrides-mountcopy) { copy_jk_map(p, overrides-s, base-uri_to_context, overrides-uri_to_context); copy_jk_map(p, overrides-s, base-automount, overrides-automount); - copy_jk_map(p, overrides-s, base-secretkeys, overrides-secretkeys); } if(base-envvars_in_use) { @@ -1192,17 +1131,6 @@ } */ -/* -{ int i; -jk_log(conf-log, JK_LOG_DEBUG, secret = %s\n, conf-secret_key); -for (i = 0; i map_size(conf-secretkeys); i++) -{ -char *name = map_name_at(conf-secretkeys, i); -jk_log(conf-log, JK_LOG_DEBUG, worker = %s and secretkey = %s\n, name, map_get_string(conf-secretkeys, name, NULL)); -} -} -*/ - /* Create
cvs commit: jakarta-tomcat-connectors/jk/src/native/apache-2.0 Makefile.in Makefile.linux mod_jk.dsp
hgomez 01/06/07 06:54:19 Modified:jk/src/native/apache-2.0 Makefile.in Makefile.linux mod_jk.dsp Log: Updated build files (jk_ajp_common added) Revision ChangesPath 1.5 +2 -2 jakarta-tomcat-connectors/jk/src/native/apache-2.0/Makefile.in Index: Makefile.in === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/apache-2.0/Makefile.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Makefile.in 2001/06/01 09:55:47 1.4 +++ Makefile.in 2001/06/07 13:54:09 1.5 @@ -12,12 +12,12 @@ SRCS=${JK}/jk_ajp12_worker.c ${JK}/jk_connect.c ${JK}/jk_msg_buff.c ${JK}/jk_util.c ${JK}/jk_ajp13.c \ ${JK}/jk_jni_worker.c ${JK}/jk_pool.c ${JK}/jk_worker.c ${JK}/jk_ajp13_worker.c ${JK}/jk_lb_worker.c \ ${JK}/jk_sockbuf.c ${JK}/jk_map.c ${JK}/jk_uri_worker_map.c ${JK}/jk_ajp14.c ${JK}/jk_ajp14_worker.c \ - ${JK}/jk_md5.c ${JK}/jk_context.c + ${JK}/jk_md5.c ${JK}/jk_context.c ${JK}/jk_ajp_common.c LSRCS=jk_ajp12_worker.c jk_connect.c jk_msg_buff.c jk_util.c jk_ajp13.c \ jk_jni_worker.c jk_pool.c jk_worker.c jk_ajp13_worker.c jk_lb_worker.c \ jk_sockbuf.c jk_map.c jk_uri_worker_map.c jk_ajp14.c jk_ajp14_worker.c \ - jk_md5.c jk_context.c + jk_md5.c jk_context.c jk_ajp_common.c all: mod_jk.so 1.5 +2 -2 jakarta-tomcat-connectors/jk/src/native/apache-2.0/Makefile.linux Index: Makefile.linux === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/apache-2.0/Makefile.linux,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Makefile.linux2001/06/01 09:55:48 1.4 +++ Makefile.linux2001/06/07 13:54:11 1.5 @@ -21,12 +21,12 @@ SRCS=${JK}/jk_ajp12_worker.c ${JK}/jk_connect.c ${JK}/jk_msg_buff.c ${JK}/jk_util.c ${JK}/jk_ajp13.c \ ${JK}/jk_jni_worker.c ${JK}/jk_pool.c ${JK}/jk_worker.c ${JK}/jk_ajp13_worker.c ${JK}/jk_lb_worker.c \ ${JK}/jk_sockbuf.c ${JK}/jk_map.c ${JK}/jk_uri_worker_map.c ${JK}/jk_ajp14.c ${JK}/jk_ajp14_worker.c \ - ${JK}/jk_md5.c ${JK}/jk_context.c + ${JK}/jk_md5.c ${JK}/jk_context.c ${JK}/jk_ajp_common.c LSRCS=jk_ajp12_worker.c jk_connect.c jk_msg_buff.c jk_util.c jk_ajp13.c \ jk_jni_worker.c jk_pool.c jk_worker.c jk_ajp13_worker.c jk_lb_worker.c \ jk_sockbuf.c jk_map.c jk_uri_worker_map.c jk_ajp14.c jk_ajp14_worker.c \ - jk_md5.c jk_context.c + jk_md5.c jk_context.c jk_ajp_common.c all: mod_jk.so 1.4 +8 -0 jakarta-tomcat-connectors/jk/src/native/apache-2.0/mod_jk.dsp Index: mod_jk.dsp === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/apache-2.0/mod_jk.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- mod_jk.dsp2001/06/01 09:55:48 1.3 +++ mod_jk.dsp2001/06/07 13:54:12 1.4 @@ -165,6 +165,10 @@ # End Source File # End Group +SOURCE=..\common\jk_ajp_common.c +# End Source File +# End Group + # Begin Group Header Files # PROP Default_Filter h;hpp;hxx;hm;inl @@ -255,6 +259,10 @@ # End Group SOURCE=..\common\jk_context.h +# End Source File +# End Group + +SOURCE=..\common\jk_ajp_common.h # End Source File # End Group
cvs commit: jakarta-tomcat-connectors/jk/src/native/apache-2.0 mod_jk.c
hgomez 01/06/07 06:56:35 Modified:jk/src/native/apache-2.0 mod_jk.c Log: Updated mod_jk for Apache 2.0. More directives and update for wc_open (uw_map added) Revision ChangesPath 1.5 +59 -4 jakarta-tomcat-connectors/jk/src/native/apache-2.0/mod_jk.c Index: mod_jk.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/apache-2.0/mod_jk.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- mod_jk.c 2001/06/01 09:49:56 1.4 +++ mod_jk.c 2001/06/07 13:56:31 1.5 @@ -118,7 +118,8 @@ char *https_indicator; char *certs_indicator; char *cipher_indicator; -char *session_indicator; +char *session_indicator; /* Servlet API 2.3 requirement */ + char *key_size_indicator; /* Servlet API 2.3 requirement */ /* * Environment variables support @@ -437,8 +438,9 @@ s-is_ssl = JK_FALSE; s-ssl_cert = NULL; s-ssl_cert_len = 0; -s-ssl_cipher = NULL; +s-ssl_cipher = NULL; /* required by Servlet 2.3 Api, allready in original ajp13 */ s-ssl_session = NULL; + s-ssl_key_size = -1; /* required by Servlet 2.3 Api, added in jtc */ if(conf-ssl_enable || conf-envvars_in_use) { ap_add_common_vars(r); @@ -451,8 +453,15 @@ if(s-ssl_cert) { s-ssl_cert_len = strlen(s-ssl_cert); } + /* Servlet 2.3 API */ s-ssl_cipher = (char *)apr_table_get(r-subprocess_env, conf-cipher_indicator); s-ssl_session = (char *)apr_table_get(r-subprocess_env, conf-session_indicator); + +/* Servlet 2.3 API */ +ssl_temp = (char *)apr_table_get(r-subprocess_env, conf-key_size_indicator); +if (ssl_temp) +s-ssl_key_size = atoi(ssl_temp); + } } @@ -665,6 +674,12 @@ return NULL; } +/* + * JkHTTPSIndicator Directive Handling + * + * JkHTTPSIndicator HTTPS + */ + static const char *jk_set_https_indicator(cmd_parms *cmd, void *dummy, char *indicator) @@ -678,6 +693,12 @@ return NULL; } +/* + * JkCERTSIndicator Directive Handling + * + * JkCERTSIndicator SSL_CLIENT_CERT + */ + static const char *jk_set_certs_indicator(cmd_parms *cmd, void *dummy, char *indicator) @@ -691,6 +712,12 @@ return NULL; } +/* + * JkCIPHERIndicator Directive Handling + * + * JkCIPHERIndicator SSL_CIPHER + */ + static const char *jk_set_cipher_indicator(cmd_parms *cmd, void *dummy, char *indicator) @@ -704,6 +731,12 @@ return NULL; } +/* + * JkSESSIONIndicator Directive Handling + * + * JkSESSIONIndicator SSL_SESSION_ID + */ + static const char *jk_set_session_indicator(cmd_parms *cmd, void *dummy, char *indicator) @@ -717,6 +750,25 @@ return NULL; } +/* + * JkKEYSIZEIndicator Directive Handling + * + * JkKEYSIZEIndicator SSL_CIPHER_USEKEYSIZE + */ + +static const char *jk_set_key_size_indicator(cmd_parms *cmd, + void *dummy, + char *indicator) +{ +server_rec *s = cmd-server; +jk_server_conf_t *conf = +(jk_server_conf_t *)ap_get_module_config(s-module_config, jk_module); + +conf-key_size_indicator = indicator; + +return NULL; +} + static const char *jk_add_env_var(cmd_parms *cmd, void *dummy, char *env_name, @@ -794,6 +846,7 @@ * HTTPS - indication for SSL * CERTS - Base64-Der-encoded client certificates. * CIPHER - A string specifing the ciphers suite in use. + * KEYSIZE - Size of Key used in dialogue (#bits are secure) * SESSION - A string specifing the current SSL session. */ {JkHTTPSIndicator, jk_set_https_indicator, NULL, RSRC_CONF, TAKE1, @@ -804,6 +857,8 @@ Name of the Apache environment that contains SSL client cipher}, {JkSESSIONIndicator, jk_set_session_indicator, NULL, RSRC_CONF, TAKE1, Name of the Apache environment that contains SSL session}, +{JkKEYSIZEIndicator, jk_set_key_size_indicator, NULL, RSRC_CONF, TAKE1, + Name of the Apache environment that contains SSL key size in use}, {JkExtractSSL,
cvs commit: jakarta-tomcat-connectors/jk/src/native/domino dsapi.dsp jk_dsapi_plugin.c
hgomez 01/06/07 07:03:53 Modified:jk/src/native/domino dsapi.dsp jk_dsapi_plugin.c Log: Updated build file (added jk_ajp14, jk_ajp14_worker, jk_md5, jkajp_common) updated wc_open call Revision ChangesPath 1.3 +37 -0 jakarta-tomcat-connectors/jk/src/native/domino/dsapi.dsp Index: dsapi.dsp === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/domino/dsapi.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- dsapi.dsp 2001/06/04 13:16:08 1.2 +++ dsapi.dsp 2001/06/07 14:03:46 1.3 @@ -161,6 +161,25 @@ SOURCE=..\jk\jk_worker.c # End Source File # End Group + +SOURCE=..\jk\jk_worker_ajp14.c +# End Source File +# End Group + +SOURCE=..\jk\jk_ajp14.c +# End Source File +# End Group + +SOURCE=..\jk\jk_ajp_common.c +# End Source File +# End Group + +SOURCE=..\jk\jk_md5.c +# End Source File +# End Group + +# End Source File +# End Group # Begin Group Header Files # PROP Default_Filter h;hpp;hxx;hm;inl @@ -249,6 +268,24 @@ SOURCE=..\jk\jk_worker_list.h # End Source File # End Group + +SOURCE=..\jk\jk_worker_ajp14.h +# End Source File +# End Group + +SOURCE=..\jk\jk_ajp14.h +# End Source File +# End Group + +SOURCE=..\jk\jk_ajp_common.h +# End Source File +# End Group + +SOURCE=..\jk\jk_md5.h +# End Source File +# End Group + + # Begin Group Resource Files # PROP Default_Filter ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 1.3 +2 -2 jakarta-tomcat-connectors/jk/src/native/domino/jk_dsapi_plugin.c Index: jk_dsapi_plugin.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/domino/jk_dsapi_plugin.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- jk_dsapi_plugin.c 2001/06/04 13:16:08 1.2 +++ jk_dsapi_plugin.c 2001/06/07 14:03:48 1.3 @@ -56,7 +56,7 @@ /*** * Description: DSAPI plugin for Lotus Domino * * Author: Andy Armstrong [EMAIL PROTECTED] * - * Version: $Revision: 1.2 $ * + * Version: $Revision: 1.3 $ * ***/ /* Based on the IIS redirector by Gal Shachor [EMAIL PROTECTED] */ @@ -494,7 +494,7 @@ if (map_alloc(map)) { if (map_read_properties(map, workerFile)) - if (wc_open(map, logger)) + if (wc_open(map, uw_map, logger)) rc = JK_TRUE; map_free(map);
Re: cvs commit: jakarta-tomcat-4.0/connectors/scandoc scandoc.pl template.pl
GOMEZ Henri wrote: Could we change the naming of webapp to make it matching jk... ie : webapp/src/native/apache-1.3 webapp/src/doc webapp/src/native/include webapp/src/java webapp/src/native/lib webapp/src/native/scandoc webapp/src/native/webapplib May be JF or Kevin :) If we share some macro files (m4 files) for configure, life will be more easy if the relative pathes are the same. But the src does not help in jk: all is under src! It brings nothing to have src/native src/doc src/java... And what is src/doc? +++ $ cd /home/jakarta/jakarta-tomcat-connectors/jk $ ls -lt total 12 drwxr-xr-x 2 jakarta betex 1024 Jun 7 09:49 CVS drwxr-xr-x 6 jakarta betex 96 Jun 7 09:46 src -rw-r--r-- 1 jakarta betex821 Jun 6 16:54 README.txt -rw-r--r-- 1 jakarta betex 2901 May 30 17:26 build.xml -rw-r--r-- 1 jakarta betex437 May 30 01:05 build.properties.sample +++ I would propose to remove the src level in jk... An other thing I am thinking about: the java sources of webapp are in a flat structure (all in the java directory). In jk they are in ...org/apache/ajp. Does this make sense? - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 -Original Message- From: Pier P. Fumagalli [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 2:23 PM To: [EMAIL PROTECTED] Subject: Re: cvs commit: jakarta-tomcat-4.0/connectors/scandoc scandoc.pl template.pl GOMEZ Henri at [EMAIL PROTECTED] wrote: Thanks Pier :=) I have a couple of major updates, but right now I'm fighting with a major problem with the [EMAIL PROTECTED] mailing list :( :(... As soon as I'm done and I can check them, I'll be doing some updates... Pier
cvs commit: jakarta-tomcat-connectors/jk/src/native/netscape Makefile.nw Makefile.solaris jk_nsapi_plugin.c nsapi.dsp
hgomez 01/06/07 07:09:14 Modified:jk/src/native/netscape Makefile.nw Makefile.solaris jk_nsapi_plugin.c nsapi.dsp Log: updated build files to use : jk_ajp14, jk_ajp14_worker, jk_md5, jk_ajp_common Revision ChangesPath 1.4 +4 -0 jakarta-tomcat-connectors/jk/src/native/netscape/Makefile.nw Index: Makefile.nw === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/netscape/Makefile.nw,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Makefile.nw 2001/05/18 20:53:23 1.3 +++ Makefile.nw 2001/06/07 14:08:58 1.4 @@ -33,7 +33,11 @@ JK_OBJS=\ jk_ajp12_worker.obj \ jk_ajp13_worker.obj \ + jk_ajp14_worker.obj \ jk_ajp13.obj \ + jk_ajp14.obj \ + jk_ajp_common.obj \ + jk_md5.obj \ jk_connect.obj \ jk_jni_worker.obj \ jk_lb_worker.obj \ 1.3 +1 -1 jakarta-tomcat-connectors/jk/src/native/netscape/Makefile.solaris Index: Makefile.solaris === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/netscape/Makefile.solaris,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile.solaris 2001/05/18 14:55:08 1.2 +++ Makefile.solaris 2001/06/07 14:09:00 1.3 @@ -12,7 +12,7 @@ JK_OBJS = jk_ajp12_worker.o jk_lb_worker.o jk_sockbuf.o jk_connect.o jk_map.o \ jk_uri_worker_map.o jk_nsapi_plugin.o jk_util.o jk_jni_worker.o \ -jk_pool.o jk_worker.o jk_ajp14.o jk_ajp14_worker.o jk_md5.o +jk_pool.o jk_worker.o jk_ajp14.o jk_ajp14_worker.o jk_md5.o jk_ajp_common.o INCLUDE_FLAGS=-I$(INCLUDEDIR) -I$(INCLUDEDIR)/base -I$(INCLUDEDIR)/frame -I$(JAVA_INCLUDE) -I$(JAVA_INCLUDE)/$(OS_TYPE) COMMON_DEFS=-DMCC_HTTPD -DXP_UNIX -DSPAPI20 -DSOLARIS -Wall 1.2 +4 -2 jakarta-tomcat-connectors/jk/src/native/netscape/jk_nsapi_plugin.c Index: jk_nsapi_plugin.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/netscape/jk_nsapi_plugin.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_nsapi_plugin.c 2001/05/14 09:52:08 1.1 +++ jk_nsapi_plugin.c 2001/06/07 14:09:02 1.2 @@ -56,7 +56,7 @@ /*** * Description: NSAPI plugin for Netscape servers * * Author: Gal Shachor [EMAIL PROTECTED] * - * Version: $Revision: 1.1 $ * + * Version: $Revision: 1.2 $ * ***/ @@ -123,7 +123,9 @@ static void init_workers_on_other_threads(void *init_d) { jk_map_t *init_map = (jk_map_t *)init_d; -if(wc_open(init_map, logger)) { +/* we add the URI-WORKER MAP since workers using AJP14 will feed it */ + /* but where are they here in Netscape ? */ +if(wc_open(init_map, NULL, logger)) { init_on_other_thread_is_ok = JK_TRUE; } else { jk_log(logger, JK_LOG_EMERG, In init_workers_on_other_threads, failed\n); 1.2 +34 -0 jakarta-tomcat-connectors/jk/src/native/netscape/nsapi.dsp Index: nsapi.dsp === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/netscape/nsapi.dsp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- nsapi.dsp 2001/05/14 09:52:35 1.1 +++ nsapi.dsp 2001/06/07 14:09:04 1.2 @@ -147,6 +147,23 @@ SOURCE=..\common\jk_worker.c # End Source File # End Group + +SOURCE=..\common\jk_ajp14.c +# End Source File +# End Group + +SOURCE=..\common\jk_ajp14_worker.c +# End Source File +# End Group + +SOURCE=..\common\jk_md5.c +# End Source File +# End Group + +SOURCE=..\common\jk_ajp_common.c +# End Source File +# End Group + # Begin Group Header Files # PROP Default_Filter h;hpp;hxx;hm;inl @@ -223,6 +240,23 @@ SOURCE=..\common\jk_worker_list.h # End Source File # End Group + +SOURCE=..\common\jk_ajp14.h +# End Source File +# End Group + +SOURCE=..\common\jk_worker_ajp14.h +# End Source File +# End Group + +SOURCE=..\common\jk_md5.h +# End Source File +# End Group + +SOURCE=..\common\jk_ajp_common.h +# End Source File +# End Group + # Begin Group Resource Files # PROP Default_Filter ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe
cvs commit: jakarta-tomcat-connectors/jk/src/native/iis isapi.dsp jk_isapi_plugin.c
hgomez 01/06/07 07:13:19 Modified:jk/src/native/iis isapi.dsp jk_isapi_plugin.c Log: Updated build file (jk_ajp_common) Updated use of wc_open Revision ChangesPath 1.3 +19 -7 jakarta-tomcat-connectors/jk/src/native/iis/isapi.dsp Index: isapi.dsp === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/iis/isapi.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- isapi.dsp 2001/05/18 14:52:17 1.2 +++ isapi.dsp 2001/06/07 14:13:09 1.3 @@ -164,6 +164,14 @@ # End Source File # End Group +SOURCE=..\common\jk_context.c +# End Source File +# End Group + +SOURCE=..\common\jk_ajp_common.c +# End Source File +# End Group + # Begin Group Header Files # PROP Default_Filter h;hpp;hxx;hm;inl @@ -173,15 +181,11 @@ # End Source File # Begin Source File -SOURCE=..\common\jk_ajp13.h -# End Source File -# Begin Source File - SOURCE=..\common\jk_ajp13_worker.h # End Source File # Begin Source File -SOURCE=..\common\jk_ajp23_worker.h +SOURCE=..\common\jk_ajp14_worker.h # End Source File # Begin Source File @@ -245,15 +249,23 @@ # End Source File # End Group -SOURCE=..\common\jk_ajp14.h +SOURCE=..\common\jk_ajp13.h # End Source File # End Group -SOURCE=..\common\jk_ajp14_worker.h +SOURCE=..\common\jk_ajp14.h # End Source File # End Group SOURCE=..\common\jk_md5.h +# End Source File +# End Group + +SOURCE=..\common\jk_context.h +# End Source File +# End Group + +SOURCE=..\common\jk_ajp_common.h # End Source File # End Group 1.2 +4 -3 jakarta-tomcat-connectors/jk/src/native/iis/jk_isapi_plugin.c Index: jk_isapi_plugin.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/iis/jk_isapi_plugin.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_isapi_plugin.c 2001/05/14 09:47:56 1.1 +++ jk_isapi_plugin.c 2001/06/07 14:13:11 1.2 @@ -56,7 +56,7 @@ /*** * Description: ISAPI plugin for IIS/PWS * * Author: Gal Shachor [EMAIL PROTECTED] * - * Version: $Revision: 1.1 $ * + * Version: $Revision: 1.2 $ * ***/ #include httpext.h @@ -639,7 +639,8 @@ rc = JK_FALSE; if(map_alloc(map)) { if(map_read_properties(map, worker_file)) { -if(wc_open(map, logger)) { + /* we add the URI-WORKER MAP since workers using AJP14 will feed it */ +if(wc_open(map, uw_map, logger)) { rc = JK_TRUE; } } @@ -960,4 +961,4 @@ } return JK_TRUE; -} \ No newline at end of file +}
cvs commit: jakarta-tomcat-connectors/jk/src/native/domino Makefile dsapi.dsp
hgomez 01/06/07 07:16:24 Modified:jk/src/native/domino Makefile dsapi.dsp Log: Updated Makefile (missed previous time) and added jk_context to .dsp Revision ChangesPath 1.2 +2 -1 jakarta-tomcat-connectors/jk/src/native/domino/Makefile Index: Makefile === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/domino/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile 2001/06/04 13:16:08 1.1 +++ Makefile 2001/06/07 14:16:18 1.2 @@ -50,7 +50,8 @@ JKOBJ = ../jk/jk_ajp12_worker.o ../jk/jk_ajp13.o ../jk/jk_ajp13_worker.o ../jk/jk_connect.o \ ../jk/jk_jni_worker.o ../jk/jk_lb_worker.o ../jk/jk_map.o ../jk/jk_msg_buff.o \ ../jk/jk_nwmain.o ../jk/jk_pool.o ../jk/jk_sockbuf.o ../jk/jk_uri_worker_map.o \ - ../jk/jk_util.o ../jk/jk_worker.o + ../jk/jk_util.o ../jk/jk_worker.o ../jk/jk_ajp14.o ../jk/jk_ajp14_worker.o \ + ../jk/jk_context.o ../jk/jk_md5.o ../jk/jk_ajp_common.o LOBJ = jk_dsapi_plugin.o inifile.o OBJ = $(JKOBJ) $(LOBJ) 1.4 +8 -0 jakarta-tomcat-connectors/jk/src/native/domino/dsapi.dsp Index: dsapi.dsp === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/domino/dsapi.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- dsapi.dsp 2001/06/07 14:03:46 1.3 +++ dsapi.dsp 2001/06/07 14:16:19 1.4 @@ -170,6 +170,10 @@ # End Source File # End Group +SOURCE=..\jk\jk_context.c +# End Source File +# End Group + SOURCE=..\jk\jk_ajp_common.c # End Source File # End Group @@ -274,6 +278,10 @@ # End Group SOURCE=..\jk\jk_ajp14.h +# End Source File +# End Group + +SOURCE=..\jk\jk_context.h # End Source File # End Group
cvs commit: jakarta-tomcat-connectors/jk/src/native/netscape Makefile.nw Makefile.solaris nsapi.dsp
hgomez 01/06/07 07:19:48 Modified:jk/src/native/netscape Makefile.nw Makefile.solaris nsapi.dsp Log: Updated build files (oups I forget jk_context) Revision ChangesPath 1.5 +1 -0 jakarta-tomcat-connectors/jk/src/native/netscape/Makefile.nw Index: Makefile.nw === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/netscape/Makefile.nw,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Makefile.nw 2001/06/07 14:08:58 1.4 +++ Makefile.nw 2001/06/07 14:19:34 1.5 @@ -38,6 +38,7 @@ jk_ajp14.obj \ jk_ajp_common.obj \ jk_md5.obj \ + jk_context.obj \ jk_connect.obj \ jk_jni_worker.obj \ jk_lb_worker.obj \ 1.4 +1 -1 jakarta-tomcat-connectors/jk/src/native/netscape/Makefile.solaris Index: Makefile.solaris === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/netscape/Makefile.solaris,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Makefile.solaris 2001/06/07 14:09:00 1.3 +++ Makefile.solaris 2001/06/07 14:19:35 1.4 @@ -12,7 +12,7 @@ JK_OBJS = jk_ajp12_worker.o jk_lb_worker.o jk_sockbuf.o jk_connect.o jk_map.o \ jk_uri_worker_map.o jk_nsapi_plugin.o jk_util.o jk_jni_worker.o \ -jk_pool.o jk_worker.o jk_ajp14.o jk_ajp14_worker.o jk_md5.o jk_ajp_common.o +jk_pool.o jk_worker.o jk_ajp14.o jk_ajp14_worker.o jk_md5.o jk_ajp_common.o jk_context.o INCLUDE_FLAGS=-I$(INCLUDEDIR) -I$(INCLUDEDIR)/base -I$(INCLUDEDIR)/frame -I$(JAVA_INCLUDE) -I$(JAVA_INCLUDE)/$(OS_TYPE) COMMON_DEFS=-DMCC_HTTPD -DXP_UNIX -DSPAPI20 -DSOLARIS -Wall 1.3 +8 -0 jakarta-tomcat-connectors/jk/src/native/netscape/nsapi.dsp Index: nsapi.dsp === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/netscape/nsapi.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- nsapi.dsp 2001/06/07 14:09:04 1.2 +++ nsapi.dsp 2001/06/07 14:19:37 1.3 @@ -160,6 +160,10 @@ # End Source File # End Group +SOURCE=..\common\jk_context.c +# End Source File +# End Group + SOURCE=..\common\jk_ajp_common.c # End Source File # End Group @@ -250,6 +254,10 @@ # End Group SOURCE=..\common\jk_md5.h +# End Source File +# End Group + +SOURCE=..\common\jk_context.h # End Source File # End Group
cvs commit: jakarta-tomcat-connectors/jk/src/native/nt_service nt_service.dsp
hgomez 01/06/07 07:21:51 Modified:jk/src/native/nt_service nt_service.dsp Log: Updated build file (added jk_context and jk_ajp_common) Revision ChangesPath 1.3 +16 -0 jakarta-tomcat-connectors/jk/src/native/nt_service/nt_service.dsp Index: nt_service.dsp === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/nt_service/nt_service.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- nt_service.dsp2001/05/18 14:58:38 1.2 +++ nt_service.dsp2001/06/07 14:21:46 1.3 @@ -127,6 +127,14 @@ # End Source File # End Group +SOURCE=..\common\jk_context.c +# End Source File +# End Group + +SOURCE=..\common\jk_ajp_common.c +# End Source File +# End Group + # Begin Group Header Files # PROP Default_Filter h;hpp;hxx;hm;inl @@ -173,6 +181,14 @@ # End Group SOURCE=..\common\jk_md5.h +# End Source File +# End Group + +SOURCE=..\common\jk_context.h +# End Source File +# End Group + +SOURCE=..\common\jk_ajp_common.h # End Source File # End Group
Re: AJP14 - mod_jk - adventure continue
On the Java Side I've started a quick patch on TC 3.3 Ajp13.java Ajp13Interceptor. I'll wait for TC 3.3 java code import to commit the java code for Ajp14 :) Henri, I'll try to do the commit over the weekend, after Java one. I would like to start building the connector and buffers directly from jtc - to avoid code duplication, etc. Since the changes are mostly additions in ajp14 we can use the new connector, but keep the default to ajp12/13. But it needs some build.xml changes and testing ( and again we'll need to checkout 2 repositories ) Costin
cvs commit: jakarta-tomcat-connectors/jk/src/native/common jk_ajp13.c jk_ajp13.h
hgomez 01/06/07 07:31:24 Modified:jk/src/native/common jk_ajp13.c jk_ajp13.h Log: 'Diet' ajp13 source code. All of it's code is now in ajp_common and shared with ajp14 Revision ChangesPath 1.3 +2 -518jakarta-tomcat-connectors/jk/src/native/common/jk_ajp13.c Index: jk_ajp13.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/common/jk_ajp13.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- jk_ajp13.c2001/06/01 10:00:17 1.2 +++ jk_ajp13.c2001/06/07 14:31:16 1.3 @@ -56,530 +56,14 @@ /*** * Description: Experimental bi-directionl protocol handler. * * Author: Gal Shachor [EMAIL PROTECTED] * - * Version: $Revision: 1.2 $ * + * Version: $Revision: 1.3 $ * ***/ #include jk_global.h #include jk_util.h +#include jk_ajp_common.h #include jk_ajp13.h - -/* - * Conditional request attributes - * - */ -#define SC_A_CONTEXT(unsigned char)1 -#define SC_A_SERVLET_PATH (unsigned char)2 -#define SC_A_REMOTE_USER(unsigned char)3 -#define SC_A_AUTH_TYPE (unsigned char)4 -#define SC_A_QUERY_STRING (unsigned char)5 -#define SC_A_JVM_ROUTE (unsigned char)6 -#define SC_A_SSL_CERT (unsigned char)7 -#define SC_A_SSL_CIPHER (unsigned char)8 -#define SC_A_SSL_SESSION(unsigned char)9 -#define SC_A_REQ_ATTRIBUTE (unsigned char)10 -#define SC_A_ARE_DONE (unsigned char)0xFF - -/* - * Request methods, coded as numbers instead of strings. - * The list of methods was taken from Section 5.1.1 of RFC 2616, - * RFC 2518, and the ACL IETF draft. - * Method= OPTIONS - *| GET - *| HEAD - *| POST - *| PUT - *| DELETE - *| TRACE - *| PROPFIND - *| PROPPATCH - *| MKCOL - *| COPY - *| MOVE - *| LOCK - *| UNLOCK - *| ACL - * - */ -#define SC_M_OPTIONS(unsigned char)1 -#define SC_M_GET(unsigned char)2 -#define SC_M_HEAD (unsigned char)3 -#define SC_M_POST (unsigned char)4 -#define SC_M_PUT(unsigned char)5 -#define SC_M_DELETE (unsigned char)6 -#define SC_M_TRACE (unsigned char)7 -#define SC_M_PROPFIND (unsigned char)8 -#define SC_M_PROPPATCH (unsigned char)9 -#define SC_M_MKCOL (unsigned char)10 -#define SC_M_COPY (unsigned char)11 -#define SC_M_MOVE (unsigned char)12 -#define SC_M_LOCK (unsigned char)13 -#define SC_M_UNLOCK (unsigned char)14 -#define SC_M_ACL (unsigned char)15 - - -/* - * Frequent request headers, these headers are coded as numbers - * instead of strings. - * - * Accept - * Accept-Charset - * Accept-Encoding - * Accept-Language - * Authorization - * Connection - * Content-Type - * Content-Length - * Cookie - * Cookie2 - * Host - * Pragma - * Referer - * User-Agent - * - */ - -#define SC_ACCEPT (unsigned short)0xA001 -#define SC_ACCEPT_CHARSET (unsigned short)0xA002 -#define SC_ACCEPT_ENCODING (unsigned short)0xA003 -#define SC_ACCEPT_LANGUAGE (unsigned short)0xA004 -#define SC_AUTHORIZATION(unsigned short)0xA005 -#define SC_CONNECTION (unsigned short)0xA006 -#define SC_CONTENT_TYPE (unsigned short)0xA007 -#define SC_CONTENT_LENGTH (unsigned short)0xA008 -#define SC_COOKIE (unsigned short)0xA009 -#define SC_COOKIE2 (unsigned short)0xA00A -#define SC_HOST (unsigned short)0xA00B -#define SC_PRAGMA (unsigned short)0xA00C -#define SC_REFERER (unsigned short)0xA00D -#define SC_USER_AGENT (unsigned short)0xA00E - -/* - * Frequent response headers, these headers are coded as numbers - * instead of strings. - * - * Content-Type - * Content-Language - * Content-Length - * Date - * Last-Modified - * Location - * Set-Cookie - * Servlet-Engine - * Status - * WWW-Authenticate - * - */ - -#define SC_RESP_CONTENT_TYPE(unsigned
cvs commit: jakarta-tomcat-connectors/jk/src/native/common jk_ajp13_worker.c jk_ajp13_worker.h
hgomez 01/06/07 07:33:07 Modified:jk/src/native/common jk_ajp13_worker.c jk_ajp13_worker.h Log: ajp13_worker also on the Diet. code is shared with ajp14 and live in ajp_common :=) Revision ChangesPath 1.4 +25 -683 jakarta-tomcat-connectors/jk/src/native/common/jk_ajp13_worker.c Index: jk_ajp13_worker.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/common/jk_ajp13_worker.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- jk_ajp13_worker.c 2001/06/01 09:59:47 1.3 +++ jk_ajp13_worker.c 2001/06/07 14:33:02 1.4 @@ -58,288 +58,18 @@ * Author: Henri Gomez [EMAIL PROTECTED] * * Author: Costin [EMAIL PROTECTED] * * Author: Gal Shachor [EMAIL PROTECTED] * - * Version: $Revision: 1.3 $ * + * Version: $Revision: 1.4 $ * ***/ #include jk_ajp13_worker.h -static void reset_endpoint(ajp13_endpoint_t *ep) -{ -ep-reuse = JK_FALSE; -jk_reset_pool((ep-pool)); -} - -static void close_endpoint(ajp13_endpoint_t *ep) -{ -reset_endpoint(ep); - jk_close_pool((ep-pool)); - -if(ep-sd 0) { -jk_close_socket(ep-sd); -} -free(ep); -} - - -static void reuse_connection(ajp13_endpoint_t *ep, - jk_logger_t *l) -{ -ajp13_worker_t *w = ep-worker; - -if(w-ep_cache_sz) { -int rc; -JK_ENTER_CS(w-cs, rc); -if(rc) { -unsigned i; - -for(i = 0 ; i w-ep_cache_sz ; i++) { -if(w-ep_cache[i]) { -ep-sd = w-ep_cache[i]-sd; -w-ep_cache[i]-sd = -1; -close_endpoint(w-ep_cache[i]); -w-ep_cache[i] = NULL; -break; - } -} -JK_LEAVE_CS(w-cs, rc); -} -} -} - -static void connect_to_tomcat(ajp13_endpoint_t *ep, - jk_logger_t *l) -{ -unsigned attempt; - -for(attempt = 0 ; attempt ep-worker-connect_retry_attempts ; attempt++) { -ep-sd = jk_open_socket(ep-worker-worker_inet_addr, JK_TRUE, l); -if(ep-sd = 0) { -jk_log(l, JK_LOG_DEBUG, In jk_endpoint_t::connect_to_tomcat, connected sd = %d\n, ep-sd); -return; -} -} - -jk_log(l, JK_LOG_ERROR, In jk_endpoint_t::connect_to_tomcat, failed errno = %d\n, errno); -} - -static int connection_tcp_send_message(ajp13_endpoint_t *ep, - jk_msg_buf_t *msg, - jk_logger_t *l ) -{ -jk_b_end(msg); - -jk_dump_buff(l, JK_LOG_DEBUG, sending to ajp13, msg); - -if(0 jk_tcp_socket_sendfull(ep-sd, jk_b_get_buff(msg), jk_b_get_len(msg))) { -return JK_FALSE; -} - -return JK_TRUE; -} - -static int connection_tcp_get_message(ajp13_endpoint_t *ep, - jk_msg_buf_t *msg, - jk_logger_t *l) -{ -unsigned char head[AJP13_HEADER_LEN]; -int rc; -int msglen; - -rc = jk_tcp_socket_recvfull(ep-sd, head, AJP13_HEADER_LEN); - -if(rc 0) { -jk_log(l, JK_LOG_ERROR, connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed\n); -return JK_FALSE; -} - -if((head[0] != 'A') || (head[1] != 'B' )) { -jk_log(l, JK_LOG_ERROR, connection_tcp_get_message: Error - Wrong message format\n); - return JK_FALSE; -} - -msglen = ((head[2]0xff)8); -msglen += (head[3] 0xFF); - -if(msglen jk_b_get_size(msg)) { -jk_log(l, JK_LOG_ERROR, connection_tcp_get_message: Error - Wrong message size\n); - return JK_FALSE; -} - -jk_b_set_len(msg, msglen); -jk_b_set_pos(msg, 0); - -rc = jk_tcp_socket_recvfull(ep-sd, jk_b_get_buff(msg), msglen); -if(rc 0) { -jk_log(l, JK_LOG_ERROR, connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed\n); -return JK_FALSE; -} - -jk_dump_buff(l, JK_LOG_DEBUG, received from ajp13, msg); -return JK_TRUE; -} - -static int read_fully_from_server(jk_ws_service_t *s, - unsigned char *buf, - unsigned len) -{ -unsigned rdlen = 0; - -while(rdlen len) { -unsigned this_time = 0; -if(!s-read(s, buf + rdlen,
cvs commit: jakarta-tomcat-connectors/jk/src/native/common jk_ajp14.c jk_ajp14.h
hgomez 01/06/07 07:35:50 Modified:jk/src/native/common jk_ajp14.c jk_ajp14.h Log: ajp14 handle now all marshall/unmarshalling. Also use the 'AC' and 0x1235 protocol headers to avoid conflict with ajp13. Just to avoid having ajp13 packets on an ajp14 connection... Revision ChangesPath 1.4 +3 -2 jakarta-tomcat-connectors/jk/src/native/common/jk_ajp14.c Index: jk_ajp14.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/common/jk_ajp14.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- jk_ajp14.c2001/06/01 10:02:02 1.3 +++ jk_ajp14.c2001/06/07 14:35:44 1.4 @@ -56,14 +56,14 @@ /*** * Description: Next generation bi-directional protocol handler. * * Author: Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.3 $ * + * Version: $Revision: 1.4 $ * ***/ #include jk_global.h #include jk_util.h #include jk_map.h -#include jk_context.h +#include jk_ajp_common.h #include jk_ajp14.h /* @@ -581,3 +581,4 @@ { return (ajp14_unmarshal_context_state_reply(msg, context, l)); } + 1.3 +61 -16jakarta-tomcat-connectors/jk/src/native/common/jk_ajp14.h Index: jk_ajp14.h === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/common/jk_ajp14.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- jk_ajp14.h2001/06/01 10:02:03 1.2 +++ jk_ajp14.h2001/06/07 14:35:46 1.3 @@ -56,21 +56,25 @@ /*** * Description: Next generation bi-directional protocol handler. * * Author: Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.2 $ * + * Version: $Revision: 1.3 $ * ***/ #ifndef JK_AJP14_H #define JK_AJP14_H +#include jk_ajp_common.h +#include jk_context.h -#include jk_service.h -#include jk_msg_buff.h - #ifdef __cplusplus extern C { #endif /* __cplusplus */ +#define AJP14_PROTO 14 + +#define AJP14_WS_HEADER 0x1235 +#define AJP14_SW_HEADER 0x4143 /* 'AC' */ + #define AJP14_DEF_HOST (localhost) -#define AJP14_DEF_PORT (8010) +#define AJP14_DEF_PORT (8011) #define AJP14_READ_BUF_SIZE (8*1024) #define AJP14_DEF_RETRY_ATTEMPTS(1) #define AJP14_DEF_CACHE_SZ (1) @@ -286,18 +290,59 @@ * functions defined here */ -int ajp14_marshal_login_init_into_msgb(jk_msg_buf_t *msg, - jk_login_service_t *s, - jk_logger_t*l); - -int ajp14_marshal_login_comp_into_msgb(jk_msg_buf_t *msg, - jk_login_service_t *s, - jk_logger_t*l); - -int ajp14_marshal_unknown_packet_into_msgb(jk_msg_buf_t *msg, - jk_msg_buf_t *unk, - jk_logger_t *l); +void ajp14_compute_md5(jk_login_service_t *s, + jk_logger_t *l); +int ajp14_marshal_login_init_into_msgb(jk_msg_buf_t *msg, + jk_login_service_t *s, + jk_logger_t *l); + +int ajp14_unmarshal_login_seed(jk_msg_buf_t *msg, +jk_login_service_t *s, +jk_pool_t *p, +jk_logger_t *l); + +int ajp14_marshal_login_comp_into_msgb(jk_msg_buf_t *msg, + jk_login_service_t *s, + jk_logger_t *l); + +int ajp14_unmarshal_log_ok(jk_msg_buf_t *msg, +jk_login_service_t *s, +
cvs commit: jakarta-tomcat-connectors/jk/src/native/common jk_ajp14_worker.c jk_ajp14_worker.h
hgomez 01/06/07 07:36:51 Modified:jk/src/native/common jk_ajp14_worker.c jk_ajp14_worker.h Log: Initial AJP14 worker. Later will be implemented login and context infos. Revision ChangesPath 1.2 +101 -10 jakarta-tomcat-connectors/jk/src/native/common/jk_ajp14_worker.c Index: jk_ajp14_worker.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/common/jk_ajp14_worker.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_ajp14_worker.c 2001/05/18 16:47:31 1.1 +++ jk_ajp14_worker.c 2001/06/07 14:36:46 1.2 @@ -56,29 +56,120 @@ /*** * Description: AJP14 next generation Bi-directional protocol. * * Author: Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.1 $ * + * Version: $Revision: 1.2 $ * ***/ +#include jk_context.h #include jk_ajp14_worker.h -int JK_METHOD ajp14_worker_factory(jk_worker_t **w, - const char *name, - jk_logger_t *l) +/* Method */ +static int JK_METHOD validate(jk_worker_t *pThis, + jk_map_t*props, + jk_logger_t *l) +{ + ajp_worker_t *aw; + char * secret_key; + +if (ajp_validate(pThis, props, l, AJP14_PROTO) == JK_FALSE) + return JK_FALSE; + + aw = pThis-worker_private; + + secret_key = jk_get_worker_secret_key(props, aw-name); + + if ((!secret_key) || (!strlen(secret_key))) { + jk_log(l, JK_LOG_ERROR, validate error, empty or missing secretkey\n); + return JK_FALSE; + } + + return JK_TRUE; +} + +static int JK_METHOD init(jk_worker_t *pThis, + jk_map_t*props, + jk_logger_t *l) { -ajp14_worker_t *private_data = -(ajp14_worker_t *)malloc(sizeof(ajp14_worker_t)); + ajp_worker_t *aw; + char *secret_key; + + if (ajp_init(pThis, props, l, AJP14_PROTO) == JK_FALSE) + return JK_FALSE; + + aw = pThis-worker_private; + + aw-login-secret_key = jk_get_worker_secret_key(props, aw-name); + return JK_TRUE; +} + +static int JK_METHOD destroy(jk_worker_t **pThis, + jk_logger_t *l) +{ + ajp_worker_t *aw = (*pThis)-worker_private; + + if (aw-login) + free(aw-login); + +return (ajp_destroy(pThis, l, AJP14_PROTO)); +} + +static int JK_METHOD get_endpoint(jk_worker_t*pThis, + jk_endpoint_t **pend, + jk_logger_t*l) +{ +return (ajp_get_endpoint(pThis, pend, l, AJP14_PROTO)); +} + +int JK_METHOD ajp14_worker_factory(jk_worker_t **w, + const char *name, + jk_logger_t *l) +{ +ajp_worker_t *aw = (ajp_worker_t *)malloc(sizeof(ajp_worker_t)); + jk_log(l, JK_LOG_DEBUG, Into ajp14_worker_factory\n); if (name == NULL || w == NULL) { jk_log(l, JK_LOG_ERROR, In ajp14_worker_factory, NULL parameters\n); - return JK_FALSE; +return JK_FALSE; } - -if(!private_data) { -jk_log(l, JK_LOG_ERROR, In ajp14_worker_factory, can't allocate private_data\n); - return JK_FALSE; + +if (! aw) { +jk_log(l, JK_LOG_ERROR, In ajp14_worker_factory, malloc of private data failed\n); +return JK_FALSE; } +aw-name = strdup(name); + +if (! aw-name) { +free(aw); +jk_log(l, JK_LOG_ERROR, In ajp14_worker_factory, malloc failed for name\n); +return JK_FALSE; +} + +aw-proto = AJP14_PROTO; + +aw-login = (jk_login_service_t *)malloc(sizeof(jk_login_service_t)); + + if (aw-login == NULL) { + jk_log(l, JK_LOG_ERROR, In ajp14_worker_factory, malloc failed for login area\n); + return JK_FALSE; + } + + memset(aw-login, 0, sizeof(jk_login_service_t)); + + aw-login-negociation = (AJP14_CONTEXT_INFO_NEG | AJP14_PROTO_SUPPORT_AJP14_NEG); + aw-login-web_server_name = MyApache; + +aw-ep_cache_sz= 0; +aw-ep_cache = NULL; +aw-connect_retry_attempts = AJP_DEF_RETRY_ATTEMPTS; +aw-worker.worker_private = aw; + +aw-worker.validate=
cvs commit: jakarta-tomcat-connectors/jk/src/native/common jk_context.c
hgomez 01/06/07 07:37:54 Modified:jk/src/native/common jk_context.c Log: Updated stuff on context Revision ChangesPath 1.3 +2 -2 jakarta-tomcat-connectors/jk/src/native/common/jk_context.c Index: jk_context.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/common/jk_context.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- jk_context.c 2001/06/01 21:47:40 1.2 +++ jk_context.c 2001/06/07 14:37:51 1.3 @@ -56,12 +56,12 @@ /*** * Description: Context handling (Autoconf)* * Author: Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.2 $ * + * Version: $Revision: 1.3 $ * ***/ #include jk_global.h -#include jk_ajp14.h #include jk_context.h +#include jk_ajp_common.h /* * Init the context info struct
cvs commit: jakarta-tomcat-connectors/jk/src/native/common jk_util.c jk_util.h
hgomez 01/06/07 07:40:53 Modified:jk/src/native/common jk_util.c jk_util.h Log: Added secretkey support from worker.properties Revision ChangesPath 1.3 +15 -5 jakarta-tomcat-connectors/jk/src/native/common/jk_util.c Index: jk_util.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/common/jk_util.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- jk_util.c 2001/05/15 10:23:03 1.2 +++ jk_util.c 2001/06/07 14:40:50 1.3 @@ -57,7 +57,7 @@ * Description: Utility functions (mainly configuration) * * Author: Henri Gomez [EMAIL PROTECTED] * * Author: Gal Shachor [EMAIL PROTECTED] * - * Version: $Revision: 1.2 $ * + * Version: $Revision: 1.3 $ * ***/ @@ -83,6 +83,7 @@ #define BALANCED_WORKERS(balanced_workers) #define WORKER_AJP12(ajp12) #define DEFAULT_WORKER_TYPE JK_AJP12_WORKER_NAME +#define SECRET_KEY_OF_WORKER(secretkey) #define DEFAULT_WORKER JK_AJP12_WORKER_NAME #define WORKER_LIST_PROPERTY_NAME (worker.list) @@ -366,6 +367,18 @@ return map_get_int(m, buf, def); } +char * jk_get_worker_secret_key(jk_map_t *m, +const char *wname) +{ +char buf[1024]; + +if(!m || !wname) { +return NULL; +} + +sprintf(buf, %s.%s.%s, PREFIX_OF_WORKER, wname, SECRET_KEY_OF_WORKER); + return map_get_string(m, buf, NULL); +} int jk_get_worker_list(jk_map_t *m, char ***list, @@ -417,10 +430,7 @@ char **ar = NULL; sprintf(buf, %s.%s.%s, PREFIX_OF_WORKER, lb_wname, BALANCED_WORKERS); -ar = map_get_string_list(m, - buf, - num_of_wokers, - NULL); +ar = map_get_string_list(m, buf, num_of_wokers, NULL); if(ar) { *list = ar; return JK_TRUE; 1.2 +4 -1 jakarta-tomcat-connectors/jk/src/native/common/jk_util.h Index: jk_util.h === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/common/jk_util.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_util.h 2001/05/14 09:42:23 1.1 +++ jk_util.h 2001/06/07 14:40:51 1.2 @@ -56,7 +56,7 @@ /*** * Description: Various utility functions * * Author: Gal Shachor [EMAIL PROTECTED] * - * Version: $Revision: 1.1 $ * + * Version: $Revision: 1.2 $ * ***/ #ifndef _JK_UTIL_H #define _JK_UTIL_H @@ -106,6 +106,9 @@ int jk_get_worker_cache_size(jk_map_t *m, const char *wname, int def); + +char * jk_get_worker_secret_key(jk_map_t *m, +const char *wname); void jk_set_log_format(char *logformat);
RE: cvs commit: jakarta-tomcat-4.0/connectors/scandoc scandoc.pl template.pl
ie : webapp/src/native/apache-1.3 webapp/src/doc webapp/src/native/include webapp/src/java webapp/src/native/lib webapp/src/native/scandoc webapp/src/native/webapplib May be JF or Kevin :) If we share some macro files (m4 files) for configure, life will be more easy if the relative pathes are the same. But the src does not help in jk: all is under src! It brings nothing to have src/native src/doc src/java... And what is src/doc? I would propose to remove the src level in jk... No problem for me :) An other thing I am thinking about: the java sources of webapp are in a flat structure (all in the java directory). In jk they are in ...org/apache/ajp. Does this make sense? I'll follow Kevin there since he used the organization found in tomcat. For webapp why not use org/apache/warp
Re: cvs commit: jakarta-tomcat-4.0/connectors/scandoc scandoc.pl template.pl
jean-frederic clere wrote: GOMEZ Henri wrote: Could we change the naming of webapp to make it matching jk... ie : webapp/src/native/apache-1.3 webapp/src/doc webapp/src/native/include webapp/src/java webapp/src/native/lib webapp/src/native/scandoc webapp/src/native/webapplib May be JF or Kevin :) If we share some macro files (m4 files) for configure, life will be more easy if the relative pathes are the same. But the src does not help in jk: all is under src! It brings nothing to have src/native src/doc src/java... And what is src/doc? +++ $ cd /home/jakarta/jakarta-tomcat-connectors/jk $ ls -lt total 12 drwxr-xr-x 2 jakarta betex 1024 Jun 7 09:49 CVS drwxr-xr-x 6 jakarta betex 96 Jun 7 09:46 src -rw-r--r-- 1 jakarta betex821 Jun 6 16:54 README.txt -rw-r--r-- 1 jakarta betex 2901 May 30 17:26 build.xml -rw-r--r-- 1 jakarta betex437 May 30 01:05 build.properties.sample +++ I would propose to remove the src level in jk... i'd be ok with removing the src level in jk (and also in util). i'm not all that picky about directory structure. consistency is good, though :) An other thing I am thinking about: the java sources of webapp are in a flat structure (all in the java directory). In jk they are in ...org/apache/ajp. Does this make sense? i'm kind of partial to .java files living in directory structures that match their containing packages.
Re: [T4] Three things
Quoting Jon Stevens [EMAIL PROTECTED]: #1. I have been able to compile Tomcat 4 for the FIRST time in about 6 months without a lot of painful work. Woo hoo! Champagne ! The new build.properties based build is much easier :) #2. The latest cvs version fixes about 99% of the speed issues that once existed. Things are MUCH MUCH MUCH faster than before. I say 99% because there still seems to be a small slowness during startup...it looks something like this (from the turbine.log file)... [Wed Jun 06 18:36:26 PDT 2001] -- INFO -- Finish Initializing service (late): UploadService [Wed Jun 06 18:36:32 PDT 2001] -- INFO -- Start Initializing service (late): MapBrokerService Before the fix, there would be several of these largish delays and they would take between 9-10 seconds each, now I'm only seeing this one largish delay... I don't really know what you're doing there (but I think I'll look at the source code ;)) If you're loading tons of classes or something like that, static resource access (at least the initial access) can be a bit slow right now. If you look at the implementation, it's because of a largely innefficient reuse of the attributes base classes from the JNDI base package. That can be fixed easily, and would get the performance back to about the same as the direct FS access. #3. I still haven't gotten a chance to test all the classloader stuff. I will report back when I have tested it. Ok. Remy (still @J1)
AJP14 - autoconf
Hi JF, Just test the latest configure stuff and autoconf failed with : autoconf: Undefined macros: configure.in:23:AC_PROG_LD I've got autoconf 2.13, libtool 1.3.4, automake 1.4 :) The configure.in from yesterday (without AC_PROG_LD) worked fine... - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6
Re: per-context realms
Thanks! That is EXACTLY what I was looking for! -Mike - Original Message - From: Antony Bowesman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 06, 2001 10:39 PM Subject: Re: per-context realms Michael Jennings wrote: Hi everyone, Does anyone have an idea of how I could go about implementing realms/authentication on a per-context basis? Ideally, what I would like to do is have each context control their users and roles. Where should I look to get a clue? Make a simple realm implementation that simply gets the real realm config information from the context passed with the request, e.g. authenticate(Req) { Context ctx = req.getContext(); // Now you have all the context config available .. } I have a JAAS realm which has context specific realm config using the context-param param-nameName/param-name param-valueValue/param-value /context-param attributes in web.xml to provide context specific control. In the realm, just so String ctxNameValue = ctx.getInitParameter(Name); or similar. With JAAS this is easy, because JAAS allows for different JAAS configurations to be used, you just specify a different config name to the JAAS context. Antony
Re: per-context realms
Thanks for the info! I didn't know perContext interceptors were a standard feature in 3.3 I tried building and using tomcat 3.3, but I had problems with apache-tomcat communications. I think I'll use 3.2.2 for now (since I got it to work) until I know enough to start contributing to 3.3. -Mike - Original Message - From: Ignacio J. Ortega [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 07, 2001 12:47 AM Subject: RE: per-context realms For 3.2.2 ? FYI: perContext interceptors/valves are a standard feature in 3.3 and 4.0... Saludos , Ignacio J. Ortega -Mensaje original- De: Michael Jennings [mailto:[EMAIL PROTECTED]] Enviado el: miércoles 6 de junio de 2001 17:56 Para: [EMAIL PROTECTED] Asunto: per-context realms Hi everyone, Does anyone have an idea of how I could go about implementing realms/authentication on a per-context basis? Ideally, what I would like to do is have each context control their users and roles. Where should I look to get a clue? -Mike __ Mike Jennings Southgate Software Ltd. 250-382-6851 (ph) 250-382-6800 (fax) [EMAIL PROTECTED]
Re: AJP14 - autoconf
GOMEZ Henri wrote: Hi JF, Just test the latest configure stuff and autoconf failed with : autoconf: Undefined macros: configure.in:23:AC_PROG_LD I've got autoconf 2.13, libtool 1.3.4, automake 1.4 :) The configure.in from yesterday (without AC_PROG_LD) worked fine... I use libtool 1.3.5... AC_PROG_LD is in libtool.m4 (/usr/local/share/aclocal) I have... Could you check your? - If not try to update libtool (I have not yet tested with libtool 1.4) - - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6
Re: AJP14 - autoconf
GOMEZ Henri wrote: autoconf: Undefined macros: configure.in:23:AC_PROG_LD I've got autoconf 2.13, libtool 1.3.4, automake 1.4 :) The configure.in from yesterday (without AC_PROG_LD) worked fine... I use libtool 1.3.5... AC_PROG_LD is in libtool.m4 (/usr/local/share/aclocal) I have... Could you check your? - If not try to update libtool (I have not yet tested with libtool 1.4) - Strange I've got AC_PROG_LD in /usr/share/aclocal/libtool.m4 ? I think I know what is wrong: The aclocal.m4 (jakarta-tomcat-connectors/jk/src/native). It does not contain AC_PROG_LD because aclocal has failed? you have to run buildconf before configure +++ echo libtoolize --force --automake libtoolize --force --automake echo automake -a --foreign -i automake -a --foreign -i echo aclocal #aclocal --acdir=`aclocal --print-ac-dir` #aclocal --acdir=/usr/local/share/aclocal aclocal echo autoconf autoconf +++ And I have to update README.configure! It's attached Name: libtool.m4 libtool.m4Type: unspecified type (application/octet-stream) Encoding: quoted-printable
Many problems whith Post method
I have many problems with method Post when I use Tomcat 3.2.1 + Nt 4.0 + IIS + IE 5.x. When I use Netscape Communicator that's OK. For example: Page HTML: form name=frm action=proc_inicio.jsp method=post PLogin: input type=text name=login size=15 maxlength=10 value= PPassword: input type=password name=password1 size=15 maxlength=10 value= Pinput type=submit value=GO /form Page Jsp: % String login = request.getParameter(login); % LOGIN = %=login% Result: 1) Method Post: LOGIN = nullBad 2) Method Get: LOGIN = myloginOK What's happens? Many thanks, José Luis
Re: [T4] Three things
on 6/7/01 8:35 AM, Remy Maucherat [EMAIL PROTECTED] wrote: Champagne ! The new build.properties based build is much easier :) Yes. Much much much easier. However, it still has dependencies on a bazillion things which is a pain to setup, but I can manage that. :-) I don't really know what you're doing there (but I think I'll look at the source code ;)) What is happening in that log message is that a Service (which is a class that is loaded through Class.forName() and then held onto and made into a singleton) is instantiated and its init() methods are called. The log message that I showed is one Service reporting that it is finished, a delay of about 6 seconds and then another Service starting up. Services that report (late) startup are Services which are only instantiated when they are requested from the ServiceBroker instead of being instantiated right away (ie: different forms of init()). Now, the nearly impossible thing to debug (without stepping through a LOT of code) is what is happening between the time that the one (late) Service reports as being finished and the next one starts. It could be code in Scarab or Turbine or Tomcat that is being executed and could be causing the problem. However, before the speed fix, there was about 3-4 places where there were ~10 second delays and this was repeatable. Now, after the speed fix, there is only one ~6 second delay. It is pretty clear to me that the original delays were somewhere in Tomcat and not in Turbine or Scarab. Figuring out where this one last delay is is going to be a real pain in the ass. My guess is that because the other delays were in Tomcat, this last one is still in Tomcat somewhere and hence my bringing it up. If you're loading tons of classes or something like that, static resource access (at least the initial access) can be a bit slow right now. If you look at the implementation, it's because of a largely innefficient reuse of the attributes base classes from the JNDI base package. That can be fixed easily, and would get the performance back to about the same as the direct FS access. The faster the better. I don't think we are loading a ton of classes though. Not more than about a hundred at startup... -jon
Suggested change to JNDIRealm
I've written a modification of org.apache.catalina.realm.JNDIRealm.getRoles to allow for the following : If the realm descriptor's roleBase (in server.xml) is null or blank, JNDIRealm will retrieve the assigned roles list from the attribute owned by the user's DN which is specified in roleName. That's hard to read. Here is an example. Given an authenticated user with DN uid=FreakyWill,ou=mycompany Given that the node uid=FreakyWill,ou=mycompany contains the following attributes memberof=beerusers memberof=freakyusers Given the following Realm descriptor entries : roleBase= roleName=memberof JNDIRealm.getRoles will return the roles beerusers and freakyusers by simply retrieving the userDN's memberof attribute. If roleBase is populated (not null + length0), JNDI will maintain its prior functionality to retrieve roles. Any comments? My LDAP implementation requires this functionality. Should I submit this code to the tomcat project somehow? Thanks... ...Casey == Casey Bragg - Software Engineer Allegiance Telecom, Inc. Dallas, TX 469-259-2702 - [EMAIL PROTECTED] ==
Some Tomcat JSP Performance Numbers
I thought it might be interesting to contribute some quickly taken JSP performance figures for tomcat. The numbers were not taken especially for the list, so the setting might look a little strange. All Measurements were short-time, typically running app. 2 minutes. I used a very simple JSP, with a page directive setting session to false, then a configurable sleep and then just writing out a stupid HTML-Page of varying length. I varied the number of simulated client threads (concurrent requests), size of JSP output, number of server CPUs an finally I put apache and tomcat on seperate servers. Configuration Apache 1.3.14, Tomcat 3.2.2-beta2, AJP13, Solaris 2.6, JDK 1.2.1_03 HTTP-client simulation on another system, simulating 100 clients (differing numbers are mentioned), 100Mbit switched Ethernet between the systems, Plattform webserver and client simulator seperate Sun E420R 4CPU/4GB, 400MHz Apache andTomcat running on the same system, last two szenarios I put them on different servers, Tuning Apache uses max 256 Processes, AJP13-Pool max 256 Threads TCP/IP close_wait_interval 30 Sec Tests variable Output Size, no Sleep Size Used BandwidthPerformance 25Bytes - 430 JSP/sec 1KB -400 JSP/sec 4KB 2MBit/16MBit 415 JSP/sec 16KB 2MBit/44MBit 310 JSP/sec variable Sleeps, 1KB Size of Output Sleep Performance 0ms 400 JSP/sec 100ms360 JSP/sec 400ms185 JSP/sec 1600ms 60 JSP/sec variable Number of Client-Threads, no Sleep, 25 Bytes Size of Output Clients Performance 200 330 JSP/sec 175 360 JSP/sec 150 380 JSP/sec 125 405 JSP/sec 100 415 JSP/sec 75 435 JSP/sec 50 380 JSP/sec 25 225 JSP/sec variable Number of CPUs, no Sleep, 25 Bytes Size of Output CPUs Performance 4 430 JSP/sec 3 395 JSP/sec 2 320 JSP/sec 1 195 JSP/sec And now two measurements with apache, tomcat and the client simulation running on three different systems of the above type: no Sleep, 25 Bytes Size of Output Clients Performance 100 530 JSP/sec 200 370 JSP/sec Again seperated, but variable Number of CPUs, no Sleep, 25 Bytes Size of Output CPUs Performance 4 500 JSP/sec 2 510 JSP/sec 1 415 JSP/sec Rainer Jung kippdata informationstechnologie GmbH Bornheimer Straße 33a D-53111 Bonn Germany Tel.: +49/0228/98549-0 Fax: +49/0228/98549-50 email: [EMAIL PROTECTED]
Re: SSL - NES / DOMINO
Andy Armstrong wrote: [snip] There's a bug in the current release of the Domino connector that means that it doesn't properly recognise SSL requests, which means it doesn't is_ssl in the jk_ws_service structure. I've fixed this now, but I don't seem to be able to recover values for ssl_cert, ssl_cipher or ssl_session from Domino. I also find that if I these fields are set as follows s-is_ssl = 1;/* i.e. it is an SSL request... */ s-ssl_cert_len = 128; s-ssl_cert = NULL; /* ...but we don't have these values */ s-ssl_cipher = NULL; s-ssl_session = NULL; I'm getting a null pointer exception in Ajp13ConnectorRequest.java at this code: case SC_A_SSL_CERT : isSSL = true; --- attributes.put(javax.servlet.request.X509Certificate, msg.getString()); break; It seems that msg.getString() is probably returning a null. This may be because I'm working with Tomcat 3.2.1 tonight, so I'm just grabbing a copy of 3.3 to see if that problem has been fixed. I've now had a look at the 3.3 source for ajp13 and I think I understand the problem. Look at this: if(s-ssl_cert_len) { if(0 != jk_b_append_byte(msg, SC_A_SSL_CERT) || 0 != jk_b_append_string(msg, s-ssl_cert)) { jk_log(l, JK_LOG_ERROR, Error ajp13_marshal_into_msgb - Error appending the SSL certificates\n); return JK_FALSE; } } I've been assuming that ssl_cert_len and ssl_cert are independent variables, and specifically that it's possible, and desirable, to know the length of the cert without actually having the cert. However, the ajp13 code assumes that if you know the length of the cert you also have the cert. If ssl_cert_len != 0 then it assumes that ssl_cert != NULL and attempts to send it. Is this correct? Is it never useful to know the cert's length without having the cert itself? -- Andy Armstrong, Tagish
Re: SSL - NES / DOMINO
Hi Henri, GOMEZ Henri wrote: Hi, I take a look at NES and the SSL vars are not handled by this connector. Idem for DOMINO where some vars are grabbed but not used. Who know how to get the SSL vars (the following come from apache+mod_ssl) : SSL_CLIENT_CERT = The client certificat (if user auth used) SSL_CIPHER = cipher used (ie RC4-MD5) SSL_SESSION_ID = SSL session ID, a big number unique big SSL SESSION SSL_CIPHER_USEKEYSIZE = #bits used in clt-srv exchange ie: 128 There's a bug in the current release of the Domino connector that means that it doesn't properly recognise SSL requests, which means it doesn't is_ssl in the jk_ws_service structure. I've fixed this now, but I don't seem to be able to recover values for ssl_cert, ssl_cipher or ssl_session from Domino. I also find that if I these fields are set as follows s-is_ssl = 1;/* i.e. it is an SSL request... */ s-ssl_cert_len = 128; s-ssl_cert = NULL; /* ...but we don't have these values */ s-ssl_cipher = NULL; s-ssl_session = NULL; I'm getting a null pointer exception in Ajp13ConnectorRequest.java at this code: case SC_A_SSL_CERT : isSSL = true; --- attributes.put(javax.servlet.request.X509Certificate, msg.getString()); break; It seems that msg.getString() is probably returning a null. This may be because I'm working with Tomcat 3.2.1 tonight, so I'm just grabbing a copy of 3.3 to see if that problem has been fixed. Once I've solved this little problem I'll make a new release which understands SSL. Here is was I got in TC 3.3-M3 (using initial AJP14), with attached snoop.jsp against Apache 1.3.20/mod_ssl 2.8.4 Request Information JSP Request Method: GET Request URI: /examples/jsp/snp/snoop.jsp Request Protocol: HTTP/1.0 Servlet path: /jsp/snp/snoop.jsp Path info: null Path translated: null Query string: null Content length: -1 Content type: null Server name: localhost Server port: 443 Remote user: null Remote address: 127.0.0.1 Remote host: localhost Authorization scheme: null SSL Client Certificate: null SSL Cypher Suite: RC4-MD5 SSL Session Id: 9A9F153F57A505AA3FAB648223929413BC035ACE89FF2735138456F7B38B2CAB SSL Key Size: 128 The browser you are using is Mozilla/4.77 [en] (X11; U; Linux 2.4.2-2 i686) - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 Name: snoop.jsp snoop.jspType: unspecified type (application/octet-stream) Encoding: quoted-printable -- Andy Armstrong, Tagish
SSL - NES / DOMINO
Hi, I take a look at NES and the SSL vars are not handled by this connector. Idem for DOMINO where some vars are grabbed but not used. Who know how to get the SSL vars (the following come from apache+mod_ssl) : SSL_CLIENT_CERT = The client certificat (if user auth used) SSL_CIPHER = cipher used (ie RC4-MD5) SSL_SESSION_ID = SSL session ID, a big number unique big SSL SESSION SSL_CIPHER_USEKEYSIZE = #bits used in clt-srv exchange ie: 128 Here is was I got in TC 3.3-M3 (using initial AJP14), with attached snoop.jsp against Apache 1.3.20/mod_ssl 2.8.4 Request Information JSP Request Method: GET Request URI: /examples/jsp/snp/snoop.jsp Request Protocol: HTTP/1.0 Servlet path: /jsp/snp/snoop.jsp Path info: null Path translated: null Query string: null Content length: -1 Content type: null Server name: localhost Server port: 443 Remote user: null Remote address: 127.0.0.1 Remote host: localhost Authorization scheme: null SSL Client Certificate: null SSL Cypher Suite: RC4-MD5 SSL Session Id: 9A9F153F57A505AA3FAB648223929413BC035ACE89FF2735138456F7B38B2CAB SSL Key Size: 128 The browser you are using is Mozilla/4.77 [en] (X11; U; Linux 2.4.2-2 i686) - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 snoop.jsp
Re: [T4] Three things
#1. I have been able to compile Tomcat 4 for the FIRST time in about 6 months without a lot of painful work. Woo hoo! Agree. I have the same experience before. But a few days ago I tried again, I did it. How amazing. Thanks a lot, guys. Now my only complain for building TC4 from cvs is that I cannot find out how to make build/ and dist/ directories to some places other than under jakarta-tomcat-4.0. Could any body help me out? Regards, Punky
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/depend DependManager.java Dependency.java
costin 01/06/07 20:12:49 Modified:src/share/org/apache/tomcat/util/depend DependManager.java Dependency.java Log: Added a toString method to Dependency ( for easy debug/messages ). Added few convenience methods to DependManager. Revision ChangesPath 1.6 +23 -1 jakarta-tomcat/src/share/org/apache/tomcat/util/depend/DependManager.java Index: DependManager.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/depend/DependManager.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- DependManager.java2001/03/07 23:39:20 1.5 +++ DependManager.java2001/06/08 03:12:45 1.6 @@ -76,7 +76,7 @@ */ public class DependManager { int delay=4000; -Dependency deps[]=new Dependency[32]; +Dependency deps[]; int depsCount=0; long lastCheck=0; boolean checking=false; @@ -84,8 +84,15 @@ int checkCount=0; private boolean expired=false; + +static final int INITIAL_DEP_SIZE=32; public DependManager() { + this( INITIAL_DEP_SIZE ); +} + +public DependManager(int initial_size) { + deps=new Dependency[initial_size]; } /** Reset the depend manager - all dependencies are reset too. @@ -177,6 +184,21 @@ } } +/** Update all times, so next shouldReload will happen if + * any time changes ( after the specified time ) + */ +public void setLastModified( long time ) { + for( int i=0; idepsCount; i++ ) { + deps[i].setLastModified( time ); + } +} + +public void setExpired( boolean e ) { + for( int i=0; idepsCount; i++ ) { + deps[i].setExpired( e ); + } +} + public synchronized void addDependency( Dependency dep ) { if( depsCount = deps.length ) { Dependency deps1[]=new Dependency[ deps.length *2 ]; 1.4 +6 -1 jakarta-tomcat/src/share/org/apache/tomcat/util/depend/Dependency.java Index: Dependency.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/depend/Dependency.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Dependency.java 2001/03/07 23:39:20 1.3 +++ Dependency.java 2001/06/08 03:12:46 1.4 @@ -150,7 +150,12 @@ return target; } - +public String toString() { + return Dep(O= + origin + LM= + lastModified + + OLM= + ((origin!=null) ? origin.lastModified() :0) + + E= + expired + ) ; +} + // methods /** Check if the origin changed since target's was lastModified.
cvs commit: jakarta-tomcat/src/facade22/org/apache/tomcat/facade ServletInfo.java
costin 01/06/07 19:58:58 Modified:src/facade22/org/apache/tomcat/facade ServletInfo.java Log: Fix error in ServletInfo: a servlet can have more than a dependency ( we do that for jsps in principal, could be used for reloading indvidual servlets ) Revision ChangesPath 1.6 +17 -1 jakarta-tomcat/src/facade22/org/apache/tomcat/facade/ServletInfo.java Index: ServletInfo.java === RCS file: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/ServletInfo.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ServletInfo.java 2000/12/27 17:15:04 1.5 +++ ServletInfo.java 2001/06/08 02:58:56 1.6 @@ -260,12 +260,28 @@ // the path will serve as servlet name if not set } +DependManager dependM; + +public DependManager getDependManager() { + return dependM; +} + +public void setDependManager(DependManager dep ) { + dependM=dep; +} + Dependency dependency; - + +/** @deprecated this supports only one depend per + jsp/servlet. Wrong. +*/ public Dependency getDependency() { return dependency; } +/** @deprecated this supports only one depend per + jsp/servlet. Wrong. +*/ public void setDependency(Dependency dep ) { dependency=dep; }
Re: cvs commit: jakarta-tomcat-4.0/connectors/scandoc scandoc.pl template.pl
jean-frederic clere at [EMAIL PROTECTED] wrote: I would propose to remove the src level in jk... I like this better :) Pier
Re: cvs commit: jakarta-tomcat-4.0/connectors/scandoc scandoc.pl template.pl
GOMEZ Henri at [EMAIL PROTECTED] wrote: I'll follow Kevin there since he used the organization found in tomcat. For webapp why not use org/apache/warp No, the WARP code in WebApp is specific to Catalina, so, org.apache.catalina.connectors.warp Pier
Failed experiment
Just to let you know - and keep a record of the attempt. I did a small experiment, making all objects in tomcat Serializable ( a bit of perl ) and saving the state just before engineStart() ( when all the state is stable ). Then at startup, detect if tomcat.ser is available and load it. I counted the startup time in both cases - and the diference is not very big ( 10..20% ). The main reason is probably the fact that we save much more than we need to. That could be fixed with transient declaration or custom savers, but it's more work than it's worth it. The experiment had 2 goals - improving the startup time, and providing a way to suspend and resume tomcat in a stable state. I think there are better/cleaner ways to do the second ( with a module that will save all the state and maybe an additional hook ). For the first I'll reuse some of jasper and generate a EmbededTomcat-like file from server.xml, etc. Most of the startup time is spent in introspection, and this will also reduce the requirements on the JVM ( some embedded devices are not very good at serialization or introspection ). Costin
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/buf UDecoder.java
costin 01/06/07 20:10:28 Modified:src/share/org/apache/tomcat/util/buf UDecoder.java Log: Remove debug statement. Revision ChangesPath 1.2 +1 -1 jakarta-tomcat/src/share/org/apache/tomcat/util/buf/UDecoder.java Index: UDecoder.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/buf/UDecoder.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- UDecoder.java 2001/05/26 17:07:31 1.1 +++ UDecoder.java 2001/06/08 03:10:24 1.2 @@ -129,7 +129,7 @@ public void convert( CharChunk mb ) throws IOException { - log( Converting a char chunk ); + // log( Converting a char chunk ); int start=mb.getOffset(); char buff[]=mb.getBuffer(); int cend=mb.getEnd();
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/loggers AccessLogInterceptor.java
costin 01/06/07 20:04:35 Modified:src/share/org/apache/tomcat/modules/loggers AccessLogInterceptor.java Log: Fixed package for AccessLogInterceptor. Revision ChangesPath 1.2 +1 -1 jakarta-tomcat/src/share/org/apache/tomcat/modules/loggers/AccessLogInterceptor.java Index: AccessLogInterceptor.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/loggers/AccessLogInterceptor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AccessLogInterceptor.java 2001/04/28 21:31:15 1.1 +++ AccessLogInterceptor.java 2001/06/08 03:04:33 1.2 @@ -1,5 +1,5 @@ -package org.apache.tomcat.modules.logging; +package org.apache.tomcat.modules.loggers; import java.io.*;
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/core ServerSession.java
costin 01/06/07 20:02:58 Modified:src/share/org/apache/tomcat/core ServerSession.java Log: Removed Serializable from ServerSession, it is not needed ( we serialize each individual object if it is serializable - so we have more control ), and it also creates problem on special environments. ( embeded ) Revision ChangesPath 1.9 +1 -2 jakarta-tomcat/src/share/org/apache/tomcat/core/ServerSession.java Index: ServerSession.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServerSession.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ServerSession.java2001/03/21 06:46:42 1.8 +++ ServerSession.java2001/06/08 03:02:56 1.9 @@ -61,7 +61,6 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import java.io.Serializable; import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; @@ -85,7 +84,7 @@ * @author a href=mailto:[EMAIL PROTECTED];Jon S. Stevens/a * @author Costin Manolache */ -public class ServerSession implements Serializable { +public class ServerSession { public static final int STATE_NEW=0;
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers SimpleMapper1.java
costin 01/06/07 20:08:26 Modified:src/share/org/apache/tomcat/modules/mappers SimpleMapper1.java Log: Added PrefixMapper as an internal class, it is very specific to SimpleMapper ( and not used in other modules ). It is also ugly and quite slow, so we'll need a new mapper ( now that many things are tuned we can see smaller spots ). In any case PrefixMapper doesn't deserve to be in tomcat_util.jar. Revision ChangesPath 1.4 +180 -1 jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/SimpleMapper1.java Index: SimpleMapper1.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/SimpleMapper1.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SimpleMapper1.java2001/05/26 17:54:50 1.3 +++ SimpleMapper1.java2001/06/08 03:08:23 1.4 @@ -62,7 +62,7 @@ import org.apache.tomcat.core.*; import org.apache.tomcat.util.buf.MessageBytes; import org.apache.tomcat.util.io.FileUtil; -import org.apache.tomcat.util.PrefixMapper; +//import org.apache.tomcat.util.PrefixMapper; import org.apache.tomcat.util.collections.*; import java.util.*; @@ -425,3 +425,182 @@ } + +/** Prefix and exact mapping alghoritm. + *XXX finish factoring out the creation of the map ( right now direct field access is + * used, since the code was just cut out from SimpleMapper). + * XXX make sure the code is useable as a general path mapper - or at least a bridge + * can be created between SimpleMapper and a patern matcher like the one in XPath + * + * @author [EMAIL PROTECTED] + */ +class PrefixMapper { +// host - PrefixMapper for virtual hosts +// hosts are stored in lower case ( the common case ) +SimpleHashtable vhostMaps=new SimpleHashtable(); + + +SimpleHashtable prefixMappedServlets; +SimpleHashtable exactMappedServlets; + +// Cache the most recent mappings +// Disabled by default ( since we haven't implemented +// capacity and remove ). +SimpleHashtable mapCache; +// By using TreeMap instead of SimpleMap you go from 143 to 161 RPS +// ( at least on my machine ) +// Interesting - even if SimpleHashtable is faster than Hashtable +// most of the time, the average is very close for both - it seems +// that while the synchronization in Hashtable is locking, GC have +// a chance to work, while in SimpleHashtable case GC creates big +// peeks. That will go away with more reuse, so we should use SH. + +// An alternative to explore after everything works is to use specialized +// mappers ( extending this one for example ) using 1.2 collections +// TreeMap mapCache; +boolean mapCacheEnabled=false; + + +public PrefixMapper() { + prefixMappedServlets=new SimpleHashtable(); + exactMappedServlets=new SimpleHashtable(); + mapCache=new SimpleHashtable(); +} + +public void setMapCache( boolean v ) { + mapCacheEnabled=v; +} + +/** Remove all mappings matching path + */ +public void removeAllMappings( String host, String path ) { + PrefixMapper vmap=this; + if( host!=null ) { + host=host.toLowerCase(); + vmap=(PrefixMapper)vhostMaps.get(host); + } + + // remove all paths starting with path + Enumeration en=vmap.prefixMappedServlets.keys(); + while( en.hasMoreElements() ) { + String s=(String)en.nextElement(); + if( s.startsWith( path )) + vmap.prefixMappedServlets.remove( s ); + } + + en=vmap.exactMappedServlets.keys(); + while( en.hasMoreElements() ) { + String s=(String)en.nextElement(); + if( s.startsWith( path )) + vmap.exactMappedServlets.remove( s ); + } + // reset the cache + mapCache=new SimpleHashtable(); + +} + +/** + */ +void addMapping( String path, Object target ) { + prefixMappedServlets.put( path, target); +} + +/** + */ +void addExactMapping( String path, Object target ) { + exactMappedServlets.put( path, target); +} + +/** + */ +public void addMapping( String host, String path, Object target ) { + if( host == null ) + prefixMappedServlets.put( path, target); + else { + host=host.toLowerCase(); + PrefixMapper vmap=(PrefixMapper)vhostMaps.get( host ); + if( vmap == null ) { + vmap=new PrefixMapper(); + vhostMaps.put( host, vmap ); + vmap.setMapCache( mapCacheEnabled ); + } + vmap.addMapping( path, target ); + } +} + +/** + */
cvs commit: jakarta-tomcat/src/build/manifests manifest.embedded manifest.jspc
costin 01/06/07 19:52:45 Added: src/build/manifests manifest.embedded manifest.jspc Log: Added 2 manifest files - one for running jspc, one for EmbededTomcat ( no server.xml is used ) Revision ChangesPath 1.1 jakarta-tomcat/src/build/manifests/manifest.embedded Index: manifest.embedded === Manifest-Version: 1.0 Main-Class: org.apache.tomcat.startup.EmbededTomcat Class-Path: container/tomcat_util.jar common/tomcat_core.jar container/tomcat_modules.jar common/servlet.jar container/facade22.jar common/jasper-runtime.jar container/jaxp.jar container/parser.jar 1.1 jakarta-tomcat/src/build/manifests/manifest.jspc Index: manifest.jspc === Manifest-Version: 1.0 Main-Class: org.apache.jasper.JspC Class-Path: ../container/tomcat_util.jar ../common/tomcat_core.jar ../container/tomcat_modules.jar ../common/servlet.jar ../container/facade22.jar ../container/jaxp.jar ../container/parser.jar ../container/xerces.jar ../container/crimson.jar ../container/jasper.jar
Re: cvs commit: jakarta-tomcat-4.0/connectors/scandoc scandoc.pl template.pl
GOMEZ Henri at [EMAIL PROTECTED] wrote: Could we change the naming of webapp to make it matching jk... ie : webapp/src/native/apache-1.3 webapp/src/doc webapp/src/native/include webapp/src/java webapp/src/native/lib webapp/src/native/scandoc webapp/src/native/webapplib May be JF or Kevin :) I don't like it... Pier
cvs commit: jakarta-tomcat build.xml
costin 01/06/07 19:55:45 Modified:.build.xml Log: Stop copying ant, or jaxp from ant. Ant is still included in the /admin app, where it is used for tests and will be used for various automations. Revision ChangesPath 1.131 +19 -20jakarta-tomcat/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat/build.xml,v retrieving revision 1.130 retrieving revision 1.131 diff -u -r1.130 -r1.131 --- build.xml 2001/05/21 06:24:23 1.130 +++ build.xml 2001/06/08 02:55:39 1.131 @@ -109,17 +109,11 @@ copy tofile=${tomcat.build}/LICENSE file=LICENSE/ !-- include ant, it is used for testing and will be used for -configuration and few other tasks -- +configuration and few other tasks copy todir=${tomcat.build}/bin fileset dir=${ant.bin}/ -/copy - -!-- -copy tofile=${tomcat.build}/lib/container/jaxp.jar - file=${ant.lib}/jaxp.jar/ -copy tofile=${tomcat.build}/lib/container/parser.jar - file=${ant.lib}/parser.jar/ - -- +/copy +-- copy tofile=${tomcat.build}/lib/container/jaxp.jar file=${jaxp.home}/jaxp.jar/ @@ -144,8 +138,6 @@ fixcrlf srcdir=${tomcat.build}/bin includes=**/*.sh cr=remove/ fixcrlf srcdir=${tomcat.build}/bin includes=**/*.bat cr=add/ -chmod perm=+x file=${tomcat.build}/bin/ant/ -chmod perm=+x file=${tomcat.build}/bin/antRun/ chmod perm=+x file=${tomcat.build}/bin/tomcat.sh/ chmod perm=+x file=${tomcat.build}/bin/jspc.sh/ chmod perm=+x file=${tomcat.build}/bin/startup.sh/ @@ -247,7 +239,7 @@ deprecation=off srcdir=src/share classpath - pathelement location=${tomcat.build}/lib/tomcat_util.jar/ + pathelement location=${tomcat.build}/lib/container/tomcat_util.jar/ /classpath include name=org/apache/tomcat/core/**/ /javac @@ -273,8 +265,8 @@ deprecation=off srcdir=src/share classpath - pathelement location=${tomcat.build}/lib/tomcat_util.jar/ - pathelement location=${tomcat.build}/lib/tomcat_core.jar/ + pathelement location=${tomcat.build}/lib/container/tomcat_util.jar/ + pathelement location=${tomcat.build}/lib/common/tomcat_core.jar/ /classpath include name=org/apache/tomcat/startup/**/ exclude name=**/EmbededTomcat.java unless=jdk12.present/ @@ -284,6 +276,12 @@ manifest=src/build/manifests/manifest.startup include name=org/apache/tomcat/startup/**/ /jar + +jar jarfile=${tomcat.build}/lib/etomcat.jar + basedir=${tomcat.build}/classes + manifest=src/build/manifests/manifest.embedded + include name=org/apache/tomcat/startup/**/ +/jar /target !-- Servlet 22 (default) implementation == -- @@ -296,8 +294,8 @@ srcdir=src/facade22 classpath pathelement location=${servlet22.jar}/ - pathelement location=${tomcat.build}/lib/tomcat_util.jar/ - pathelement location=${tomcat.build}/lib/tomcat_core.jar/ + pathelement location=${tomcat.build}/lib/container/tomcat_util.jar/ + pathelement location=${tomcat.build}/lib/common/tomcat_core.jar/ /classpath include name=org/apache/tomcat/facade/**/ /javac @@ -316,8 +314,8 @@ optimize=${optimize} deprecation=off classpath - pathelement location=${tomcat.build}/lib/tomcat_util.jar/ - pathelement location=${tomcat.build}/lib/tomcat_core.jar/ + pathelement location=${tomcat.build}/lib/container/tomcat_util.jar/ + pathelement location=${tomcat.build}/lib/common/tomcat_core.jar/ /classpath include name=org/apache/tomcat/modules/**/ !-- exclude @@ -370,7 +368,8 @@ /jar jar jarfile=${tomcat.build}/lib/container/jasper.jar - basedir=${tomcat.build}/classes + basedir=${tomcat.build}/classes + manifest=src/build/manifests/manifest.jspc include name=org/apache/jasper/**/ !-- exclude name=org/apache/jasper/Constants.class/ @@ -442,7 +441,7 @@ basedir=${tomcat.build}/webapps/admin/WEB-INF/classes include name=org/apache/tomcat/util/test/**/ /jar -delete dir=${tomcat.build}/webapps/admin/WEB-INF/classes/org / +!-- delete dir=${tomcat.build}/webapps/admin/WEB-INF/classes/org / -- /target
Re: AJP14 - autoconf
jean-frederic clere at [EMAIL PROTECTED] wrote: GOMEZ Henri wrote: Hi JF, Just test the latest configure stuff and autoconf failed with : autoconf: Undefined macros: configure.in:23:AC_PROG_LD I've got autoconf 2.13, libtool 1.3.4, automake 1.4 :) The configure.in from yesterday (without AC_PROG_LD) worked fine... I use libtool 1.3.5... AC_PROG_LD is in libtool.m4 (/usr/local/share/aclocal) I have... Could you check your? - If not try to update libtool (I have not yet tested with libtool 1.4) - Oh, BTW, I don't want to see libtool used anywhere... The would would be a better place without that evil thing... (Doesn't run on OS/X) Pier
Re: SSL - NES / DOMINO
Andy Armstrong wrote: [snip] I've now had a look at the 3.3 source for ajp13 and I think I understand the problem. Look at this: if(s-ssl_cert_len) { if(0 != jk_b_append_byte(msg, SC_A_SSL_CERT) || 0 != jk_b_append_string(msg, s-ssl_cert)) { jk_log(l, JK_LOG_ERROR, Error ajp13_marshal_into_msgb - Error appending the SSL certificates\n); return JK_FALSE; } } I've been assuming that ssl_cert_len and ssl_cert are independent variables, and specifically that it's possible, and desirable, to know the length of the cert without actually having the cert. However, the ajp13 code assumes that if you know the length of the cert you also have the cert. If ssl_cert_len != 0 then it assumes that ssl_cert != NULL and attempts to send it. Is this correct? Is it never useful to know the cert's length without having the cert itself? I've now found where Domino stashes the cert/cert length and am now passing them through to Tomcat. I'll make a new release tomorrow when I've had a chance to test against an NT Domino server. Incidentally, is it the case that the SSL Cert contains, in effect, arbitrary binary data? If so the code I quoted above from ajp13 seems to be flawed in that it uses jk_b_append_string() (which expects a null terminated string) to append the cert to the message. If there happens to be a zero byte in the cert it will be truncated at that point. -- Andy Armstrong, Tagish
RE: Tomcat 3.2.2 doesn't builds with jdk 1.1.8
Tomcat 3.2.2 will run on JDK1.1 VMs, but right now it only builds on JDK1.2. These securitiy manager classes will never be used if Tomcat is running on a 1.1 VM. Hopefully we can update the build.xml for the next release to exclude these classes for 1.1 builds. -Original Message- From: Alexander Zagrebin [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 02, 2001 7:04 AM To: [EMAIL PROTECTED] Subject: Tomcat 3.2.2 doesn't builds with jdk 1.1.8 Hi Tomcat 3.2.2 doesn't builds with jdk 1.1.8: = ... tomcat: [javac] Compiling 215 source files to D:\work\build\tomcat\classes [javac] D:\work\jakarta-tomcat-3.2.2-src\src\share\org\apache\tomcat\util\ compat\Jdk 12Support.java:116: Interface org.apache.tomcat.util.compat.PrivilegedExceptionAction of nested class org.apache.tomcat.util.compat.Jdk12Support. PrivilegedProxy not found. [javac] static class PrivilegedProxy implements PrivilegedExceptionAction [javac] ^ [javac] D:\work\jakarta-tomcat-3.2.2-src\src\share\org\apache\tomcat\facad e\RequestD ispatcherImpl.java:146: Undefined variable, class, or package name: java [javac] java.security.AccessController.doPrivileged( [javac] ^ [javac] D:\work\jakarta-tomcat-3.2.2-src\src\share\org\apache\tomcat\facad e\RequestD ispatcherImpl.java:155: Class org.apache.tomcat.facade.PrivilegedActionException not found in type declaration. [javac] } catch( PrivilegedActionException pe) { [javac]^ [javac] D:\work\jakarta-tomcat-3.2.2-src\src\share\org\apache\tomcat\facad e\RequestD ispatcherImpl.java:254: Undefined variable, class, or package name: java [javac] java.security.AccessController.doPrivileged( [javac] ^ [javac] D:\work\jakarta-tomcat-3.2.2-src\src\share\org\apache\tomcat\facad e\RequestD ispatcherImpl.java:263: Class org.apache.tomcat.facade.PrivilegedActionException not found in type declaration. [javac] } catch( PrivilegedActionException pe) { [javac] ^ [javac] D:\work\jakarta-tomcat-3.2.2-src\src\share\org\apache\tomcat\util\ compat\Jdk 12Support.java:77: Undefined variable or class name: URLClassLoader [javac] return URLClassLoader.newInstance( urls, parent ); [javac] ^ [javac] D:\work\jakarta-tomcat-3.2.2-src\src\share\org\apache\tomcat\util\ compat\Jdk 12Support.java:89: Undefined variable or class name: AccessController [javac] return AccessController. [javac] ^ [javac] D:\work\jakarta-tomcat-3.2.2-src\src\share\org\apache\tomcat\util\ compat\Jdk 12Support.java:91: Class org.apache.tomcat.util.compat.PrivilegedActionException not found in type declaration. [javac] } catch( PrivilegedActionException pe ) { [javac]^ [javac] D:\work\jakarta-tomcat-3.2.2-src\src\share\org\apache\tomcat\util\ compat\Jdk 12Support.java:100: Method setContextClassLoader(java.lang.ClassLoader) not found in class java.lang.Thread. [javac] Thread.currentThread().setContextClassLoader(cl); [javac] ^ [javac] D:\work\jakarta-tomcat-3.2.2-src\src\share\org\apache\tomcat\util\ compat\Jdk 12Support.java:104: Method getContextClassLoader() not found in class java.lang.Thread. [javac] return Thread.currentThread().getContextClassLoader(); [javac] ^ [javac] D:\work\jakarta-tomcat-3.2.2-src\src\share\org\apache\tomcat\util\ compat\Jdk 12Support.java:108: Class org.apache.tomcat.util.compat.URLClassLoader not found in type declaration. [javac] return ((URLClassLoader)cl).getURLs(); [javac] ^ [javac] D:\work\jakarta-tomcat-3.2.2-src\src\share\org\apache\tomcat\util\ compat\Jdk 12Support.java:111: Class org.apache.tomcat.util.compat.URLClassLoader not found in type declaration. [javac] URLClassLoader scl=(URLClassLoader)cl; [javac] ^ [javac] D:\work\jakarta-tomcat-3.2.2-src\src\share\org\apache\tomcat\util\ compat\Jdk 12Support.java:111: Class org.apache.tomcat.util.compat.URLClassLoader not found in type declaration. [javac] URLClassLoader scl=(URLClassLoader)cl; [javac] ^ [javac] D:\work\jakarta-tomcat-3.2.2-src\src\share\org\apache\tomcat\util\ compat\Jdk 12Support.java:112: Class org.apache.tomcat.util.compat.URLClassLoader not found in type declaration. [javac] return ((URLClassLoader)cl.getParent()).getURLs(); [javac] ^ [javac] D:\work\jakarta-tomcat-3.2.2-src\src\share\org\apache\tomcat\util\ compat\Jdk 12Support.java:112: Method getParent() not found in class java.lang.ClassLoader. [javac]
RE: Session ID in load balancer in 3.2.2
How about a diff -u or at least may be a file name? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mathias Herberts Sent: Monday, June 04, 2001 6:53 AM To: [EMAIL PROTECTED] Subject: Session ID in load balancer in 3.2.2 According to the RELEASE-NOTES, the load balancer was fixed to correctly extract the session ID from the Cookie. It seems the extraction from the URI has not been corrected, line 136 should read *id_end = '\0'; instead of id_end = NULL; Has this been corrected in the current CVS source tree? Mathias.
cvs commit: jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/parser JspReader.java
costin 01/06/07 21:57:02 Modified:jasper34/generator/org/apache/jasper34/generator GeneratorBase.java JspParseEventListener.java ServletWriter.java jasper34/generator/org/apache/jasper34/parser JspReader.java Added: jasper34/generator/org/apache/jasper34/generator DependGenerator.java Log: Added 2 more hooks in the generator. The first one allows generators to declare dependencies. The liaison could use those to implement reloading ( including the famous include bug ). The second one allows static content generators to pre-declare the chunks. It is not used right now, but will work in association with the RuntimeLiaison to optimize the whole output system ( pre-conversion to byte[], caching of static content on the server side, etc ). Revision ChangesPath 1.3 +23 -2 jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/generator/GeneratorBase.java Index: GeneratorBase.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/generator/GeneratorBase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- GeneratorBase.java2001/06/06 06:16:03 1.2 +++ GeneratorBase.java2001/06/08 04:56:58 1.3 @@ -100,6 +100,8 @@ public static final int INIT_METHOD_HOOK = 3; public static final int SERVICE_METHOD_HOOK = 4; public static final int STATIC_INITIALIZER_HOOK = 5; +public static final int CHUNKS = 5; +public static final int DEPENDS = 5; public static String hookNames[] = { generateClassDeclaration, @@ -107,10 +109,12 @@ generateFileDeclaration, generateInitMethod, generateServiceMethod, - generateStaticInitializer + generateStaticInitializer, + generateChunks, + generateDepends }; -static final int HOOK_COUNT=6; +static final int HOOK_COUNT=8; public boolean hasHook( int hookId ) { if( hooks==null ) initHooks(); @@ -118,6 +122,23 @@ } // New interface + +/** Generate content chunks ( not used right now ) + * Chunks will be used instead of out.println( String ), to + * enable a number of optimizations and for better support for + * large files. + */ +public void generateChunks( ServletWriter out ) + throws JasperException +{ +} + +/** Generate depend declarations. + */ +public void generateDepends( ServletWriter out ) + throws JasperException +{ +} public void generateClassDeclaration( ServletWriter out ) throws JasperException 1.5 +5 -0 jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/generator/JspParseEventListener.java Index: JspParseEventListener.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/generator/JspParseEventListener.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- JspParseEventListener.java2001/06/07 06:59:00 1.4 +++ JspParseEventListener.java2001/06/08 04:56:58 1.5 @@ -163,9 +163,14 @@ throw new CompileException(start, Constants.getString(jsp.error.include.missing.file)); + // jsp.error.include.bad.file needs taking care of here?? try { reader.pushFile(file); + // Add an IncludeGenerator - only for deps + DependGenerator dg=new DependGenerator( start,stop, + reader.getCurrentFile()); + pageInfo.addGenerator( dg ); } catch (FileNotFoundException fnfe) { throw new CompileException(start, Constants.getString(jsp.error.include.bad.file)); 1.4 +51 -0 jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/generator/ServletWriter.java Index: ServletWriter.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper34/generator/org/apache/jasper34/generator/ServletWriter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ServletWriter.java2001/06/07 06:59:02 1.3 +++ ServletWriter.java2001/06/08 04:56:59 1.4 @@ -91,6 +91,10 @@ generateStaticInit(pageInfo ); + generateDepends(pageInfo ); + + generateChunks(pageInfo ); + generateConstructor(pageInfo );