DO NOT REPLY [Bug 6263] New: - java.lang.UnsatisfiedLinkError using lotus.domino classes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6263. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6263 java.lang.UnsatisfiedLinkError using lotus.domino classes Summary: java.lang.UnsatisfiedLinkError using lotus.domino classes Product: Tomcat 3 Version: 3.3.x Nightly Platform: PC OS/Version: Linux Status: NEW Severity: Normal Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi all. I developed a class which connects to a Lotus Domino server. The class imports lotus.domino.* package. The class works fine if I run it from the command line. I developed a jsp, too, which imports my class as a bean. When I try to run the jsp, I get the following error: Location: /mailCheck/jsp/check.jsp Internal Servlet Error: java.lang.UnsatisfiedLinkError: NCreateSessionWithPasswd at lotus.domino.local.Session.createSession(Session.java:129) at lotus.domino.NotesFactory.createSession(NotesFactory.java:57) at dominoMailCheck.check(dominoMailCheck.java:34) [...cut...] I put the jars containing lotus.domino package into $TOMCAT_HOME/lib/apps and they're correctly loaded into the webapp classpath. What is wrong? Do native methods require a different way to be loaded into the classpath? Thanks for your help! -Pietro. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6263] - java.lang.UnsatisfiedLinkError using lotus.domino classes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6263. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6263 java.lang.UnsatisfiedLinkError using lotus.domino classes --- Additional Comments From [EMAIL PROTECTED] 2002-02-06 09:24 --- Created an attachment (id=1139) A java source and two jsp pages. With these little app I get UnsatisfiedLinkError -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6264] New: - Unable to javac code made with Jasper due to reference to non-existent method
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6264. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6264 Unable to javac code made with Jasper due to reference to non-existent method Summary: Unable to javac code made with Jasper due to reference to non-existent method Product: Tomcat 4 Version: 4.0.1 Final Platform: Sun OS/Version: Solaris Status: NEW Severity: Blocker Priority: Other Component: Jasper AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The java code created by Jasper references the following method: PageContext.handlePageException(Throwable) which does not exist in the PageContext class in the distributed jasper runtime jar. Manually editing the resulting java file to reference PageContext.handlePageException(Exception) fixes the problem but this is not an acceptable workaround. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6264] - Unable to javac code made with Jasper due to reference to non-existent method
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6264. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6264 Unable to javac code made with Jasper due to reference to non-existent method [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2002-02-06 12:44 --- PageContext.handlePageException(Exception) is from the Servlet 2.2 spec. Tomcat 4.0.1 implements the Servlet 2.3 spec where PageContext.handlePageException(Throwable) is correct. This error means you have old servlet 2.2 classes present. Check your CLASSPATH, jre/lib/ext directory, and your WEB-INF/lib for an old copy of servlet.jar, or possibly j2ee.jar. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6267] - RequestDispatcher breaks on URLs with anchors
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6267. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6267 RequestDispatcher breaks on URLs with anchors --- Additional Comments From [EMAIL PROTECTED] 2002-02-06 13:36 --- Created an attachment (id=1140) WAR file to demonstrate the behavior reported -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6265] - Using Apache and Tomcat is impossible
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6265. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6265 Using Apache and Tomcat is impossible [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2002-02-06 14:31 --- Please only file bugs in Bugzilla. For support questions, please use tomcat- user. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6267] - RequestDispatcher breaks on URLs with anchors
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6267. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6267 RequestDispatcher breaks on URLs with anchors [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Additional Comments From [EMAIL PROTECTED] 2002-02-06 14:33 --- *** This bug has been marked as a duplicate of 6115 *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6115] - URL encoding of session id doesn't work correctly with anchors/fragments
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6115. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6115 URL encoding of session id doesn't work correctly with anchors/fragments [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2002-02-06 14:33 --- *** Bug 6267 has been marked as a duplicate of this bug. *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6267] - RequestDispatcher breaks on URLs with anchors
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6267. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6267 RequestDispatcher breaks on URLs with anchors [EMAIL PROTECTED] changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||DUPLICATE --- Additional Comments From [EMAIL PROTECTED] 2002-02-06 15:26 --- The patch was applied after b2. *** This bug has been marked as a duplicate of 6115 *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6115] - URL encoding of session id doesn't work correctly with anchors/fragments
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6115. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6115 URL encoding of session id doesn't work correctly with anchors/fragments --- Additional Comments From [EMAIL PROTECTED] 2002-02-06 15:26 --- *** Bug 6267 has been marked as a duplicate of this bug. *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6273] New: - page directive without attribute
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6273. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6273 page directive without attribute Summary: page directive without attribute Product: Tomcat 4 Version: 4.0.1 Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Jasper AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] A JSP page containing an empty page directive should not be accepted. e.g. %@page % html /html should result in a translation error. JFH -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common JkInputStream.java
costin 02/02/06 09:11:30 Added: jk/java/org/apache/jk/common JkInputStream.java Log: Common implementation of the input stream, will be shared by all containers. This code is derived from tomcat3.3's implementation, which is newer ( it happen after j-t-c was forked, in the 3.3 impl. of Ajp13Interceptor ). It supports buffering and few other optimizations. We also support the 'chunked encoding' and available. Revision ChangesPath 1.1 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkInputStream.java Index: JkInputStream.java === /* * * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, if *any, must include the following acknowlegement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowlegement may appear in the software itself, *if and wherever such third-party acknowlegements normally appear. * * 4. The names The Jakarta Project, Tomcat, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache *nor may Apache appear in their names without prior written *permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.jk.common; import java.io.*; import java.util.List; import java.util.Iterator; import javax.servlet.ServletInputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.Cookie; import org.apache.tomcat.util.buf.MessageBytes; import org.apache.tomcat.util.http.Cookies; import org.apache.tomcat.util.http.ServerCookie; import org.apache.tomcat.util.http.BaseRequest; import org.apache.tomcat.util.http.MimeHeaders; import org.apache.jk.core.*; import org.apache.jk.common.*; import org.apache.jk.util.*; /** Generic input stream impl on top of ajp */ public class JkInputStream extends InputStream { public JkInputStream() { } public int available() throws IOException { return blen-pos; } public void close() throws IOException { this.closed=true; } public void mark(int readLimit) { } public boolean markSupported() { return false; } public void reset() throws IOException { throw new IOException(reset() not supported); } public int read() throws IOException { if( contentLength == -1 ) { return doRead1(); } if( available = 0 ) { if( dL0 ) d(doRead() nothing available ); return -1; } available--; return doRead1(); } public int read(byte[] b,
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/core JkHandler.java Handler.java
costin 02/02/06 09:25:07 Added: jk/java/org/apache/jk/core JkHandler.java Removed: jk/java/org/apache/jk/core Handler.java Log: Renamed Handler to JkHandler - the name is hugely overloaded, and likely to create conflicts. I think the architecture of jk2 is close to beeing finalized, the current model should be powerfull enough for most of our needs. I copied a lot from axis, which provides an extremely powerfull and flexible model for message processing ( which is what jk2 is doing as well ). JkHandler is the 'core' of the whole model - it supports the classic 'hook' pattern used in most apache products. Given that our preferences are split, JkHandler supports both catalina-like 'recursive' hooks invocation ( using next ) and apache ( or 3.3 ) style 'iterative' invocation. I've also renamed endpoint to MsgContext. The signature is different from Axis's handler, in that we pass both the 'source' message and the MsgContext. The reason is that Jk should be able to handle 'internal' messages during the processing of the main message. The thread local current MC is hacky. Revision ChangesPath 1.1 jakarta-tomcat-connectors/jk/java/org/apache/jk/core/JkHandler.java Index: JkHandler.java === /* * * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, if *any, must include the following acknowlegement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowlegement may appear in the software itself, *if and wherever such third-party acknowlegements normally appear. * * 4. The names The Jakarta Project, Tomcat, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache *nor may Apache appear in their names without prior written *permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.jk.core; import java.io.*; import java.util.*; import java.security.*; /** * * @author Costin Manolache */ public abstract class JkHandler { public static final int OK=0; public static final int LAST=1; public static final int ERROR=2; protected WorkerEnv wEnv; protected JkHandler next; protected String name; protected int id; public void setWorkerEnv( WorkerEnv we ) { this.wEnv=we; } /** Set the name of the handler. Will allways be called by * worker env after creating the worker. */ public void setName(String s ) { name=s; } public String getName() { return name; } /** Set the id of the worker. We
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/core MsgContext.java Endpoint.java
costin 02/02/06 09:27:03 Added: jk/java/org/apache/jk/core MsgContext.java Removed: jk/java/org/apache/jk/core Endpoint.java Log: Renamed Endpoint to MsgContext. Added few common attributes ( that are used all the times ). The MsgContext is a store for info exchanged between handlers ( like notes in apache, etc ) Revision ChangesPath 1.1 jakarta-tomcat-connectors/jk/java/org/apache/jk/core/MsgContext.java Index: MsgContext.java === /* * * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, if *any, must include the following acknowlegement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowlegement may appear in the software itself, *if and wherever such third-party acknowlegements normally appear. * * 4. The names The Jakarta Project, Tomcat, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache *nor may Apache appear in their names without prior written *permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.jk.core; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; import java.util.Enumeration; import java.security.*; import org.apache.tomcat.util.http.MimeHeaders; import org.apache.tomcat.util.http.BaseRequest; import org.apache.tomcat.util.buf.MessageBytes; import org.apache.tomcat.util.http.HttpMessages; import org.apache.tomcat.util.buf.HexUtils; /** * * @author Henri Gomez [[EMAIL PROTECTED]] * @author Dan Milstein [[EMAIL PROTECTED]] * @author Keith Wannamaker [[EMAIL PROTECTED]] * @author Kevin Seguin * @author Costin Manolache */ public class MsgContext { private Object notes[]=new Object[32]; private Channel ch; private BaseRequest req; private WorkerEnv wEnv; public final Object getNote( int id ) { return notes[id]; } public final void setNote( int id, Object o ) { notes[id]=o; } // Common attributes ( XXX should be notes for flexibility ? ) public final WorkerEnv getWorkerEnv() { return wEnv; } public final void setWorkerEnv( WorkerEnv we ) { this.wEnv=we; } public final Channel getChannel() { return ch; } public final void setChannel(Channel ch) { this.ch=ch; } public final void setRequest( BaseRequest req ) { this.req=req; } public final BaseRequest getRequest() {
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/core Webapp.java Worker.java
costin 02/02/06 09:28:42 Removed: jk/java/org/apache/jk/core Webapp.java Worker.java Log: Removed webapp - jk should deal only with the communication. The config generator will be refactored and included in a separate package. Removed Worker - it's just a handler, no need for a special class ( and different interface ! ) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/core Channel.java
costin 02/02/06 09:32:19 Modified:jk/java/org/apache/jk/core Channel.java Log: Channel is just a handler ( the first in the chain ). Note that at this moment the invoke command hardcodes the 'next' handler, but that can be overriden ( it's just a default ). The handler named 'dispatch' will be called ( if exists ), or 'request'. A third handler 'container' is the default next for 'request'. Again, similar ( but simpler ) with axis ( the idea of chains and message paths ) XXX should we call it Transport ? Revision ChangesPath 1.4 +19 -19 jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Channel.java Index: Channel.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Channel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Channel.java 26 Jan 2002 07:21:02 - 1.3 +++ Channel.java 6 Feb 2002 17:32:19 - 1.4 @@ -81,28 +81,15 @@ * @author Kevin Seguin * @author Costin Manolache */ -public abstract class Channel { -protected WorkerEnv we; -protected Worker worker; +public abstract class Channel extends JkHandler { -public void setWorkerEnv( WorkerEnv we ) { -this.we=we; -} - -public void setWorker(Worker worker) { -this.worker=worker; -} - -public void init() throws IOException { -} - /** This method is used to receive messages. It shouldn't * be exposed, as most processing is driven by sending * messages and dispatching on incoming messages. The * only current use is the aberant post packet after * the first request, which doesn't fit anything. */ -public abstract int receive( Msg msg, Endpoint ep ) +public abstract int receive( Msg msg, MsgContext ep ) throws IOException; /** @@ -111,10 +98,23 @@ * @param msg A packet with accumulated data to send to the server -- * this method will write out the length in the header. */ -public abstract int send( Msg msg, Endpoint ep ) +public abstract int send( Msg msg, MsgContext ep ) throws IOException; - - - +public int invoke( Msg msg, MsgContext mc ) throws IOException { +if( next==null ) { +if( nextName!=null ) +setNext( wEnv.getHandler( nextName ) ); +if( next==null ) +next=wEnv.getHandler( dispatch ); +if( next==null ) +next=wEnv.getHandler( request ); +log(Setting default next + next.getClass().getName()); +} + +if(logL 0 ) +log(Calling next + next.getName() + + +next.getClass().getName()); +return next.invoke(msg, mc ); +} } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/core Msg.java
costin 02/02/06 09:33:50 Modified:jk/java/org/apache/jk/core Msg.java Log: 2 more methods - peekByte used to dispatch and Tag, the message type. Msg must be abstracted, it's still too Ajp13 specific. Jk should work with any kind of messages - including soap or IIOP. Revision ChangesPath 1.4 +21 -0 jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Msg.java Index: Msg.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Msg.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Msg.java 26 Jan 2002 07:22:23 - 1.3 +++ Msg.java 6 Feb 2002 17:33:50 - 1.4 @@ -76,6 +76,9 @@ * A single packet for communication between the web server and the * container. * + * In a more generic sense, it's the event that drives the processing chain. + * XXX Use Event, make Msg a particular case. + * * @author Henri Gomez [[EMAIL PROTECTED]] * @author Dan Milstein [[EMAIL PROTECTED]] * @author Keith Wannamaker [[EMAIL PROTECTED]] @@ -84,6 +87,8 @@ */ public abstract class Msg { + + /** * Prepare this packet for accumulating a message from the container to * the web server. Set the write position to just after the header @@ -135,6 +140,8 @@ public abstract byte getByte(); +public abstract byte peekByte(); + public abstract void getBytes(MessageBytes mb); /** @@ -163,5 +170,19 @@ public abstract int getLen(); public abstract void dump(String msg); + + + +int tag; +/** Message type - the tag is used to fast dispatch + * by message type + */ +public void setTag( int i ) { +tag=i; +} + +public int getTag() { +return tag; +} } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/core WorkerEnv.java
costin 02/02/06 09:36:07 Modified:jk/java/org/apache/jk/core WorkerEnv.java Log: Moved the process() logic in the HandlerDispatch, it doesn't have to be hardcoded. Added a 'home' property. Added 'notes' for the workerenv ( for generic properties stored by handlers ) Removed the channel, consolidate Handler as the main 'plugin' mechanism. Revision ChangesPath 1.4 +35 -76 jakarta-tomcat-connectors/jk/java/org/apache/jk/core/WorkerEnv.java Index: WorkerEnv.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/core/WorkerEnv.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- WorkerEnv.java26 Jan 2002 07:22:23 - 1.3 +++ WorkerEnv.java6 Feb 2002 17:36:07 - 1.4 @@ -79,26 +79,19 @@ Hashtable properties; -Webapp webapps[]=new Webapp[20]; +Object webapps[]=new Object[20]; int webappCnt=0; public static final int ENDPOINT_NOTE=0; public static final int REQUEST_NOTE=1; int noteId[]=new int[4]; String noteName[][]=new String[4][]; +private Object notes[]=new Object[32]; -static final int MAX_HANDLERS=32; -static final int RESERVED=16; // reserved names, backward compat - -// Note that we don't make distinction between in and out -// messages ( i.e. one id is used only in one direction ) -Handler handlers[]=new Handler[MAX_HANDLERS]; -String handlerNames[]=new String[MAX_HANDLERS]; -int currentId=RESERVED; - -Hashtable workers=new Hashtable(); -Hashtable channels=new Hashtable(); - +Hashtable handlersMap=new Hashtable(); +// base dir for the jk webapp +String home; + public WorkerEnv() { for( int i=0; inoteId.length; i++ ) { noteId[i]=7; @@ -106,9 +99,9 @@ } } -public int addWebapp( Webapp wa ) { +public int addWebapp( Object wa ) { if( webappCnt = webapps.length ) { -Webapp newWebapps[]=new Webapp[ webapps.length + 20 ]; +Object newWebapps[]=new Object[ webapps.length + 20 ]; System.arraycopy( webapps, 0, newWebapps, 0, webapps.length); webapps=newWebapps; } @@ -116,94 +109,60 @@ return webappCnt++; } -public Webapp getWebapp( int i ) { +public void setJkHome( String s ) { +home=s; +} + +public String getJkHome() { +return home; +} + +public Object getWebapp( int i ) { return webapps[i]; } public int getWebappCount() { return webappCnt; } + +public final Object getNote(int i ) { +return notes[i]; +} -public void addHandler( Handler h ) { -h.setWorkerEnv( this ); -h.init(); +public final void setNote(int i, Object o ) { +notes[i]=o; } public int getNoteId( int type, String name ) { +for( int i=0; inoteId[type]; i++ ) { +if( name.equals( noteName[type][i] )) +return i; +} int id=noteId[type]++; noteName[type][id]=name; return id; } -public int registerMessageType( int id, String name, Handler h, - String sig[] ) -{ - if( id 0 ) { - // try to find it by name - for( int i=0; i handlerNames.length; i++ ) - if( name.equals( handlerNames[i] ) ) return i; - handlerNames[currentId]=name; - handlers[currentId]=h; - currentId++; - return currentId; - } - // fixed id - handlerNames[id]=name; - handlers[id]=h; - return id; -} - -public int processCallbacks( Channel ch, Endpoint ep, Msg hBuf ) -throws IOException -{ -int type=hBuf.getByte(); - -if( type handlers.length || -handlers[type]==null ) { - d( Invalid handler + type ); - return 500; - } - -if( dL 0 ) -d( Received + type + + handlerNames[type]); - - Handler handler=handlers[type]; - -return handler.callback( type, ch, ep, hBuf ); -} - -public void addWorker( String name, Worker w ) { +public void addHandler( String name, JkHandler w ) { w.setWorkerEnv( this ); -workers.put( name, w ); -} - -public Worker getWorker( String name ) { -return (Worker)workers.get(name); +w.setName( name ); +handlersMap.put( name, w ); } -public void addChannel( String name, Channel c ) { -c.setWorkerEnv( this ); -channels.put( name, c
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/core Chain.java
costin 02/02/06 09:37:16 Added: jk/java/org/apache/jk/core Chain.java Log: Initial ( incomplete ) version of the Chain - that allows iterative calling of handlers. XXX would it be better to move it in commons - it's after all just a simple handler ? Revision ChangesPath 1.1 jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Chain.java Index: Chain.java === /* * * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, if *any, must include the following acknowlegement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowlegement may appear in the software itself, *if and wherever such third-party acknowlegements normally appear. * * 4. The names The Jakarta Project, Tomcat, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache *nor may Apache appear in their names without prior written *permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.jk.core; import java.io.*; import java.util.*; import java.security.*; /** * * @author Costin Manolache */ public class Chain extends JkHandler { Vector handlersV=new Vector(); JkHandler handler[]=null; public void init() { // init all } public void destroy() { } public void setHandlers(String hlist ) { // } public void addHandler( JkHandler h ) { handlersV.addElement(h); } public int invoke(Msg msg, MsgContext mc ) throws IOException { return OK; } } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common HandlerDispatch.java
costin 02/02/06 09:41:29 Added: jk/java/org/apache/jk/common HandlerDispatch.java Log: Dispatch handler - based on the message type will call the right handler. This is specific to ajp13 ( or any other transport that stores the message type as the first byte of the message :-). Each protocol is supposed to have a set of protocol-specific handlers, some may be generic. What we'll eventually do is create an HandlerAjp13 to consolidate ajp13 specific processing. Other protocols could do the same. Then whatever info containes the 'target' will be stored as the message tag, and the rest of the info will be decoded in message/request/etc. Note that the tag is an int - we want to reduce the use of Strings, and do table dispatching, so protocol handlers should use a message handle Revision ChangesPath 1.1 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerDispatch.java Index: HandlerDispatch.java === /* * * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, if *any, must include the following acknowlegement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowlegement may appear in the software itself, *if and wherever such third-party acknowlegements normally appear. * * 4. The names The Jakarta Project, Tomcat, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache *nor may Apache appear in their names without prior written *permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.jk.common; import java.io.*; import java.net.*; import java.util.*; import java.security.*; import java.security.cert.*; import org.apache.jk.core.*; import org.apache.tomcat.util.http.*; import org.apache.tomcat.util.buf.*; /** * Dispatch based on the message type. ( XXX make it more generic, * now it's specific to ajp13 ). * * @author Costin Manolache */ public class HandlerDispatch extends JkHandler { public HandlerDispatch() { } public void init() { } JkHandler handlers[]=new JkHandler[MAX_HANDLERS]; String handlerNames[]=new String[MAX_HANDLERS]; static final int MAX_HANDLERS=32; static final int RESERVED=16; // reserved names, backward compat int currentId=RESERVED; public int registerMessageType( int id, String name, JkHandler h, String sig[] ) { if( logL 0 ) log( Register message + id + + h.getName() + +
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelJni.java ChannelSocket.java ChannelUn.java
costin 02/02/06 09:43:08 Modified:jk/java/org/apache/jk/common ChannelJni.java ChannelSocket.java ChannelUn.java Log: Update for the api changes. Added isSameAddress from Ajp12Interceptor - will be used with the secret for the shutdown handler. Few changes in jni - less code in static methods ( we'll eventually remove all, but for now it's easier on the C side ) Revision ChangesPath 1.4 +63 -47 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelJni.java Index: ChannelJni.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelJni.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ChannelJni.java 26 Jan 2002 07:24:37 - 1.3 +++ ChannelJni.java 6 Feb 2002 17:43:08 - 1.4 @@ -73,7 +73,7 @@ import org.apache.jk.apr.*; -/** Pass messages using unix domain sockets. +/** Pass messages using jni * * @author Costin Manolache */ @@ -88,20 +88,20 @@ public void init() throws IOException { // static field init, temp -wEnv=we; +wEnvStatic=wEnv; } -public int receive( Msg msg, Endpoint ep ) +public int receive( Msg msg, MsgContext ep ) throws IOException { Msg sentResponse=(Msg)ep.getNote( receivedNote ); // same buffer is used, no need to copy if( msg==sentResponse ) { -d(Returned previously received message ); +if( dL 0 ) d(Returned previously received message ); return 0; } -d(XXX Copy previously received message ); +if( dL 0 ) d(XXX Copy previously received message ); // send will alter the msg and insert the response. // copy... // XXX TODO @@ -113,14 +113,14 @@ * We could use 2 packets, or sendAndReceive(). * */ -public int send( Msg msg, Endpoint ep ) +public int send( Msg msg, MsgContext ep ) throws IOException { byte buf[]=msg.getBuffer(); EpData epData=(EpData)ep.getNote( epDataNote ); // send and get the response -d( Sending packet ); +if( dL 0 ) d( Sending packet ); msg.end(); // msg.dump(Outgoing: ); @@ -128,43 +128,78 @@ epData.jkServiceP, buf, msg.getLen() ); ep.setNote( receivedNote, msg ); -d( Sending packet - done ); +if( dL 0 ) d( Sending packet - done ); return 0; } -/* */ - -static WorkerEnv wEnv=null; static int epDataNote=-1; -static ChannelJni chJni=new ChannelJni(); -static class EpData { -public long jkEnvP; -public long jkEndpointP; -public long jkServiceP; -} - -public static Endpoint createEndpointStatic(long env, long epP) { -Endpoint ep=new Endpoint(); +public MsgContext createEndpoint(long env, long epP) { +MsgContext ep=new MsgContext(); if( epDataNote==-1) epDataNote=wEnv.getNoteId(WorkerEnv.ENDPOINT_NOTE, epData); -d(createEndpointStatic() + env + + epP); +if( dL 0 ) d(createEndpointStatic() + env + + epP); + EpData epData=new EpData(); epData.jkEnvP=env; epData.jkEndpointP=epP; ep.setNote( epDataNote, epData ); +ep.setWorkerEnv( wEnv ); + +ep.setChannel( this ); return ep; } +public int receive( long env, long rP, MsgContext ep, +MsgAjp msg) +{ +try { +// first, we need to get an endpoint. It should be +// per/thread - and probably stored by the C side. +if( dL 0 ) d(Received request + rP); +// The endpoint will store the message pt. + +msg.processHeader(); +if( dL 5 ) msg.dump(Incoming msg ); + +EpData epData=(EpData)ep.getNote( epDataNote ); + +epData.jkServiceP=rP; + +int status= this.invoke( msg, ep ); + +if(dL 0 ) d(after processCallbacks + status); + +return status; +} catch( Exception ex ) { +ex.printStackTrace(); +} +return 0; +} + +/* */ + +static WorkerEnv wEnvStatic=null; +static ChannelJni chJni=new ChannelJni(); + +static class EpData { +public long jkEnvP; +public long jkEndpointP; +
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common HandlerRequest.java
costin 02/02/06 09:48:22 Modified:jk/java/org/apache/jk/common HandlerRequest.java Log: Few big changes here: - added support for 'secret' - as a normal request attributes. If the handler is configured to require a secret, it'll block any request without one. If not - older mod_jk's will work. ( I'll commit the change on the C code for both mod_jk and mod_jk2 ) - added support for 'ajp13.id' - similar with what ajp12interceptor is doing in 3.3. This will save the connection info ( including secret ) for easy reading by caller. ( not completed ) - add useSecret option - it'll automatically generate a secret, no config needed ( and no need to ask the user to change the pass regularily - we'll do it on each server restart ). Mod_jk will just read the file. - added support for the shutdown message ( not completed ) The request handler will call 'container' as the next handler, unless overriden. It'll also check if a dispathcer is present and register the messages it supports ( right now it's the only handler, so dispatcher is optional ) Revision ChangesPath 1.4 +188 -64 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java Index: HandlerRequest.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- HandlerRequest.java 26 Jan 2002 14:14:35 - 1.3 +++ HandlerRequest.java 6 Feb 2002 17:48:22 - 1.4 @@ -60,8 +60,8 @@ package org.apache.jk.common; import java.io.*; -import java.net.Socket; -import java.util.Enumeration; +import java.net.*; +import java.util.*; import java.security.*; import java.security.cert.*; @@ -91,13 +91,15 @@ * @author Keith Wannamaker [[EMAIL PROTECTED]] * @author Costin Manolache */ -public class HandlerRequest extends Handler +public class HandlerRequest extends JkHandler { // XXX Will move to a registry system. // Prefix codes for message types from server to container public static final byte JK_AJP13_FORWARD_REQUEST = 2; +public static final byte JK_AJP13_SHUTDOWN = 7; + // Prefix codes for message types from container to server public static final byte JK_AJP13_SEND_BODY_CHUNK = 3; public static final byte JK_AJP13_SEND_HEADERS = 4; @@ -128,6 +130,7 @@ public static final byte SC_A_SSL_CIPHER= 8; public static final byte SC_A_SSL_SESSION = 9; public static final byte SC_A_SSL_KEYSIZE = 11; +public static final byte SC_A_SECRET= 12; // Used for attributes which are not in the list above public static final byte SC_A_REQ_ATTRIBUTE = 10; @@ -200,55 +203,179 @@ { } +HandlerDispatch dispatch; + public void init() { - // register incoming message handlers - we.registerMessageType( JK_AJP13_FORWARD_REQUEST, -JK_AJP13_FORWARD_REQUEST, -this, null); // 2 - - // register outgoing messages handler - we.registerMessageType( JK_AJP13_SEND_BODY_CHUNK, // 3 -JK_AJP13_SEND_BODY_CHUNK, -this,null ); - we.registerMessageType( JK_AJP13_SEND_HEADERS, // 4 -JK_AJP13_SEND_HEADERS, -this,null ); - we.registerMessageType( JK_AJP13_END_RESPONSE, // 5 -JK_AJP13_END_RESPONSE, -this,null ); - we.registerMessageType( JK_AJP13_GET_BODY_CHUNK, // 6 -JK_AJP13_GET_BODY_CHUNK, -this, null ); +dispatch=(HandlerDispatch)wEnv.getHandler( dispatch ); +if( dispatch != null ) { +// register incoming message handlers +dispatch.registerMessageType( JK_AJP13_FORWARD_REQUEST, + JK_AJP13_FORWARD_REQUEST, + this, null); // 2 + +dispatch.registerMessageType( JK_AJP13_FORWARD_REQUEST, + JK_AJP13_SHUTDOWN, + this, null); // 7 + +// register outgoing messages handler +dispatch.registerMessageType( JK_AJP13_SEND_BODY_CHUNK, // 3 + JK_AJP13_SEND_BODY_CHUNK, + this,null ); +} + +bodyNote=wEnv.getNoteId( WorkerEnv.ENDPOINT_NOTE, jkInputStream ); +tmpBufNote=wEnv.getNoteId( WorkerEnv.ENDPOINT_NOTE, tmpBuf
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common MsgAjp.java WorkerDummy.java
costin 02/02/06 09:48:52 Modified:jk/java/org/apache/jk/common MsgAjp.java WorkerDummy.java Log: Update for the api changes. Revision ChangesPath 1.5 +6 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/MsgAjp.java Index: MsgAjp.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/MsgAjp.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- MsgAjp.java 26 Jan 2002 07:25:53 - 1.4 +++ MsgAjp.java 6 Feb 2002 17:48:52 - 1.5 @@ -257,6 +257,11 @@ return res; } +public byte peekByte() { +byte res = buf[pos]; +return res; +} + public void getBytes(MessageBytes mb) { int length = getInt(); if( (length == 0x) || (length == -1) ) { @@ -370,7 +375,7 @@ } -private static final int dL=10; +private static final int dL=0; private static void d(String s ) { System.err.println( MsgAjp: + s ); } 1.4 +9 -13 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/WorkerDummy.java Index: WorkerDummy.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/WorkerDummy.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- WorkerDummy.java 26 Jan 2002 07:25:53 - 1.3 +++ WorkerDummy.java 6 Feb 2002 17:48:52 - 1.4 @@ -73,7 +73,7 @@ /** A dummy worker, will just send back a dummy response. * Used for testing and tunning. */ -public class WorkerDummy extends Worker +public class WorkerDummy extends JkHandler { public WorkerDummy() { @@ -88,18 +88,13 @@ * ready to accept new requests. */ public void init() throws IOException { -headersMsgNote=we.getNoteId( WorkerEnv.ENDPOINT_NOTE, headerMsg ); +headersMsgNote=wEnv.getNoteId( WorkerEnv.ENDPOINT_NOTE, headerMsg ); } -/** Clean up and stop the worker - */ -public void destroy() throws IOException { -} - MessageBytes body=new MessageBytes(); private int headersMsgNote; -public void service( BaseRequest req, Channel ch, Endpoint ep ) +public int invoke( Msg in, MsgContext ep ) // BaseRequest req, Channel ch, Endpoint ep ) throws IOException { MsgAjp msg=(MsgAjp)ep.getNote( headersMsgNote ); @@ -115,25 +110,26 @@ msg.appendInt(0); -ch.send( msg, ep ); +ep.getChannel().send( msg, ep ); // msg.dump(out: ); msg.reset(); msg.appendByte( HandlerRequest.JK_AJP13_SEND_BODY_CHUNK); -msg.appendInt( 10 ); +msg.appendInt( body.getLength() ); msg.appendBytes( body ); -ch.send(msg, ep); +ep.getChannel().send(msg, ep); msg.reset(); msg.appendByte( HandlerRequest.JK_AJP13_END_RESPONSE ); msg.appendInt( 1 ); -ch.send(msg, ep ); +ep.getChannel().send(msg, ep ); +return OK; } -private static final int dL=10; +private static final int dL=0; private static void d(String s ) { System.err.println( WorkerDummy: + s ); } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/config - New directory
costin 02/02/06 09:49:07 jakarta-tomcat-connectors/jk/java/org/apache/jk/config - New directory -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/util C2B.java
costin 02/02/06 09:49:42 Modified:jk/java/org/apache/jk/util C2B.java Log: remove debug statements. Revision ChangesPath 1.2 +3 -3 jakarta-tomcat-connectors/jk/java/org/apache/jk/util/C2B.java Index: C2B.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/util/C2B.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- C2B.java 26 Jan 2002 07:16:46 - 1.1 +++ C2B.java 6 Feb 2002 17:49:42 - 1.2 @@ -146,17 +146,17 @@ if( type==MessageBytes.T_STR ) { convert( mb.getString() ); -System.out.println(XXX Converting + mb.getString() ); +// System.out.println(XXX Converting + mb.getString() ); } else if( type==MessageBytes.T_CHARS ) { CharChunk charC=mb.getCharChunk(); convert( charC.getBuffer(), charC.getOffset(), charC.getLength()); -System.out.println(XXX Converting + mb.getCharChunk() ); +//System.out.println(XXX Converting + mb.getCharChunk() ); } else { System.out.println(XXX unknowon type + type ); } flushBuffer(); -System.out.println(C2B: XXX + bb.getBuffer() + bb.getLength()); +//System.out.println(C2B: XXX + bb.getBuffer() + bb.getLength()); setByteChunk(orig); } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat33 JkRequest33.java JkResponse33.java JkServlet33.java Worker33.java
costin 02/02/06 09:51:44 Modified:jk/java/org/apache/jk/server/tomcat33 JkRequest33.java JkResponse33.java JkServlet33.java Worker33.java Log: Update for the API changes. Add the missing input stream support. Now the 33 adapter should be fully functional ( or close enough - I'll start running watchdogs ). Config is still missing from both adapters, it's the only thing remaining before we're ready to release jk2 ( the java side ). Revision ChangesPath 1.3 +32 -30 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat33/JkRequest33.java Index: JkRequest33.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat33/JkRequest33.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JkRequest33.java 26 Jan 2002 17:25:20 - 1.2 +++ JkRequest33.java 6 Feb 2002 17:51:44 - 1.3 @@ -63,7 +63,6 @@ import java.net.*; import java.util.*; -import org.apache.jk.*; import org.apache.jk.core.*; import org.apache.jk.common.*; import org.apache.tomcat.modules.server.PoolTcpConnector; @@ -78,8 +77,9 @@ class JkRequest33 extends Request { BaseRequest ajpReq; -Channel ch; -Endpoint ep; +MsgContext ep; + +JkInputStream jkIS; public JkRequest33(BaseRequest ajpReq) { @@ -91,7 +91,7 @@ remoteAddrMB = ajpReq.remoteAddr(); remoteHostMB = ajpReq.remoteHost(); serverNameMB = ajpReq.serverName(); - + // XXX sync cookies scookies = new Cookies( headers ); urlDecoder=new UDecoder(); @@ -106,9 +106,11 @@ this.ajpReq=ajpReq; } -public void setEndpoint( Channel ch, Endpoint ep ) { -this.ch=ch; +public void setEndpoint( MsgContext ep ) { this.ep=ep; +int bodyNote= ep.getWorkerEnv().getNoteId( WorkerEnv.ENDPOINT_NOTE, + jkInputStream); +jkIS=(JkInputStream)ep.getNote( bodyNote ); } // Wrappers for changed method names @@ -155,17 +157,6 @@ return ajpReq.getSecure(); } -public int getContentLength() { -int i=ajpReq.getContentLength(); - if( i = 0 ) return i; - i= super.getContentLength(); - return i; -} - -public void setContentLength( int i ) { - super.setContentLength(i); // XXX sync -} - // Attributes public void setAttribute(String name, Object value) { @@ -191,6 +182,7 @@ public void recycle() { super.recycle(); ajpReq.recycle(); +jkIS.recycle(); } public String dumpRequest() { @@ -199,26 +191,36 @@ // -// XXX This should go away if we introduce an InputBuffer. -// We almost have it as result of encoding fixes, but for now -// just keep this here, doesn't hurt too much. public int doRead() throws IOException { - if( available = 0 ) - return -1; -// available--; -// return ajp13.reqHandler.doRead(ajp13); -return -1; +// we need to manager the request's available +// this should go away, we support this in JkInputStream, +// which is similar with OutputBuffer - it should +// take away the body processing +if( contentLength == -1 ) { +return jkIS.read(); + } + if( available = 0 ) { +return -1; +} + available--; + +return jkIS.read(); } public int doRead(byte[] b, int off, int len) throws IOException { - if( available = 0 ) +int rd=-1; +if( contentLength == -1 ) { + rd=jkIS.read(b,off,len); + return rd; + } + if( available = 0 ) { return -1; -// int rd=ajp13.reqHandler.doRead( ajp13, b,off, len ); -// available -= rd; -// return rd; -return -1; +} + rd=jkIS.read( b,off, len ); + available -= rd; + return rd; } } 1.3 +3 -3 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat33/JkResponse33.java Index: JkResponse33.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat33/JkResponse33.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JkResponse33.java 26 Jan 2002 17:25:20 - 1.2 +++ JkResponse33.java 6 Feb 2002 17:51:44 - 1.3 @@ -80,7 +80,7 @@ { boolean finished=false; Channel ch; -
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40 JkConfig40.java JkConnector.java JkRequest40.java JkResponse40.java Worker40.java
costin 02/02/06 09:52:28 Modified:jk/java/org/apache/jk/server/tomcat40 JkConfig40.java JkConnector.java JkRequest40.java JkResponse40.java Worker40.java Log: Updates for the 4.x adapter. It should work fine ( except config, that wasn't ported ) Revision ChangesPath 1.2 +1 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkConfig40.java Index: JkConfig40.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkConfig40.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- JkConfig40.java 12 Jan 2002 04:14:53 - 1.1 +++ JkConfig40.java 6 Feb 2002 17:52:27 - 1.2 @@ -303,7 +303,7 @@ return false; } -private static final int dL=10; +private static final int dL=0; private static void d(String s ) { System.err.println( JkConfig40: + s ); } 1.5 +2 -2 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkConnector.java Index: JkConnector.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkConnector.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- JkConnector.java 26 Jan 2002 17:29:13 - 1.4 +++ JkConnector.java 6 Feb 2002 17:52:27 - 1.5 @@ -202,11 +202,11 @@ ((ContainerBase)ct).addLifecycleListener(config); config.loadExisting( ct ); -jkMain.setDefaultWorker( worker ); +jkMain.getWorkerEnv().addHandler(container, worker ); String catalinaHome=System.getProperty(catalina.home); File f=new File( catalinaHome ); -File jkHomeF=new File( f, webapps/jk ); +File jkHomeF=new File( f, webapps/jk/WEB-INF ); d(Setting jkHome + jkHomeF ); jkMain.setJkHome( jkHomeF.getAbsolutePath() ); 1.3 +3 -48 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkRequest40.java Index: JkRequest40.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkRequest40.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JkRequest40.java 26 Jan 2002 17:25:21 - 1.2 +++ JkRequest40.java 6 Feb 2002 17:52:27 - 1.3 @@ -78,6 +78,7 @@ import org.apache.tomcat.util.http.MimeHeaders; import org.apache.jk.core.*; +import org.apache.jk.server.*; import org.apache.jk.common.*; import org.apache.jk.util.*; @@ -89,7 +90,7 @@ private static int id = 1; Channel ch; -Endpoint ep; +MsgContext ep; public JkRequest40() { super(); @@ -102,7 +103,7 @@ response=res; } -public void setEndpoint( Channel ch, Endpoint ep ) { +public void setEndpoint( Channel ch, MsgContext ep ) { this.ch=ch; this.ep=ep; } @@ -258,50 +259,4 @@ return getName(); } -} - -class JkInputStream extends InputStream { - -JkInputStream() { -} - -public int available() throws IOException { -return 0; -} - -public void close() throws IOException { -} - -public void mark(int readLimit) { -} - -public boolean markSupported() { -return false; -} - -public void reset() throws IOException { -throw new IOException(reset() not supported); -} - -byte singleRead[]=new byte[1]; - -public int read() throws IOException { -int rc=read( singleRead, 0, 1 ); -if( rc== 1 ) -return singleRead[0]; -return -1; -} - -public int read(byte[] b, int off, int len) throws IOException { -return -1;// ajp13.doRead(b, off, len); -} - -public long skip(long n) throws IOException { -if (n Integer.MAX_VALUE) { -throw new IOException(can't skip than many: + n); -} -// XXX if n is big, split this in multiple reads -byte[] b = new byte[(int)n]; -return read(b, 0, b.length); -} } 1.3 +2 -2 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkResponse40.java Index: JkResponse40.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkResponse40.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JkResponse40.java 26 Jan 2002
DO NOT REPLY [Bug 6281] New: - JDBCRealm+Form Login+URL re-writing session=broken
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6281. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6281 JDBCRealm+Form Login+URL re-writing session=broken Summary: JDBCRealm+Form Login+URL re-writing session=broken Product: Tomcat 4 Version: 4.0.2 Beta 2 Platform: All OS/Version: Other Status: NEW Severity: Major Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I am witnessing a bug where if you use cookie-less form-based login with JDBC realms, Tomcat 4.0.1 and 4.0.2b2 will force you to triple-login to actually login. (You have type your username password into the form based page three times) I am apparently not the only one who has seen this: http://mikal.org/interests/java/tomcat/archive/view?mesg=52926 The reason I believe it has to do with JDBC realms is that I tried cookieless login using the tomcat example /tomcat/webapps/examples/jsp/security , which worked fine with the memory or file-based realms. I then modified the 'examples' context in server.xml to use my jdbc realm, and while I could manage to login in, it took three efforts to actually get in. I have only tried the Win32 Platform. -Cameron Elliott [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkMain.java
costin 02/02/06 10:22:45 Modified:jk/java/org/apache/jk/server JkMain.java Log: Update for the simplified model ( handler-centric ) Read conf/jk2.properties and use if for configuration. It is very similar ( or identical ) with workers.properties - we want the C code to read it easily ( same code will be used ), that simplifies a lot in the model and eliminates duplication of config ( right now you need to change both server.xml and workers.properties ). If we want to use one of the alternate config mechanisms, we'll generate jk2.properties to get the same effect. Revision ChangesPath 1.8 +139 -71 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java Index: JkMain.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- JkMain.java 26 Jan 2002 17:23:19 - 1.7 +++ JkMain.java 6 Feb 2002 18:22:45 - 1.8 @@ -81,14 +81,15 @@ String propFile; Properties props=new Properties(); -Worker defaultWorker; -String jkHome; - public JkMain() { } - -public void setPropFile( String p ) { +// Setting + +/** Load a .properties file into and set the values + * into jk2 configuration. + */ +public void setPropertiesFile( String p ) { propFile=p; try { props.load( new FileInputStream(propFile) ); @@ -97,91 +98,106 @@ } } +/** Set a name/value as a jk2 property + */ public void setProperty( String n, String v ) { props.put( n, v ); } - + /** * Set the codechannelClassName/code that will used to connect to * httpd. */ public void setChannelClassName(String name) { -props.put( channel.default.className,name); +props.put( handler.channel.className,name); } /** - * Set the codechannelClassName/code that will used to connect to - * httpd. + * Set the codeworkerClassName/code that will handle the request. + * ( sort of 'pivot' in axis :-) */ public void setWorkerClassName(String name) { -props.put( worker.default.className,name); -} - -public void setDefaultWorker( Worker w ) { -defaultWorker=w; +props.put( handler.container.className,name); } +/** Set the base dir of jk2. ( including WEB-INF if in a webapp ). + * We'll try to guess it from classpath if none is set ( for + * example on command line ), but if in a servlet environment + * you need to use Context.getRealPath or a system property or + * set it expliciltey. + */ public void setJkHome( String s ) { -jkHome=s; +wEnv.setJkHome(s); } -private Object newInstance( String type, String name, String def ) -throws IOException + +// Initialization + +public void init() throws IOException { -try { -String classN=props.getProperty( type + . + name + .className, - def ); -Class channelclass = Class.forName(classN); -return channelclass.newInstance(); -} catch (Exception ex) { -ex.printStackTrace(); -throw new IOException(Cannot create channel class); +String home=wEnv.getJkHome(); +if( home==null ) { +// XXX use IntrospectionUtil to find myself +} +if( home != null ) { +File hF=new File(home); +File conf=new File( home, conf ); +File propsF=new File( conf, jk2.properties ); + +if( propsF.exists() ) { +setPropertiesFile( propsF.getAbsolutePath()); +} else { +if( dL 0 ) d( No properties file found + propsF ); +} } } + public void start() throws IOException { -String workers=props.getProperty( worker.list, default ); +if( props.get( handler.request.className )==null ) +props.put( handler.request.className, + org.apache.jk.common.HandlerRequest ); + +if( props.get( handler.channel.className )==null ) +props.put( handler.channel.className, + org.apache.jk.common.ChannelSocket ); + +// We must have at least 3 handlers: +// channel is the 'transport' +// request is the request processor or 'global' chain +
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkServlet.java JniMain.java
costin 02/02/06 10:23:25 Modified:jk/java/org/apache/jk/server JkServlet.java JniMain.java Log: Update for the API and JkMain changes. Revision ChangesPath 1.6 +33 -23 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkServlet.java Index: JkServlet.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkServlet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- JkServlet.java26 Jan 2002 17:25:20 - 1.5 +++ JkServlet.java6 Feb 2002 18:23:25 - 1.6 @@ -90,21 +90,6 @@ public JkServlet() { } - -protected void servletConfig2properties(JkMain jk, ServletConfig conf ) -{ -if( conf==null ) { -d(No servlet config ); -return; -} -Enumeration paramNE=conf.getInitParameterNames(); -while( paramNE.hasMoreElements() ){ -String s=(String)paramNE.nextElement(); -String v=conf.getInitParameter(s); - -jk.setProperty( s, v ); -} -} public void init(ServletConfig conf) throws ServletException { try { @@ -121,7 +106,8 @@ way to access tomcat40 internals without implementing the interface, and that will brake 3.3 ( and probably other things ). - It does seem to work for 4.0, and in future we can add a tomcat40 valve/whatever + It does seem to work for 4.0, and in future we can add a tomcat40 + valve/whatever that will provide an Attribute for 'trusted' apps with pointer to the internals. */ @@ -133,7 +119,13 @@ private void try33() { // 33 ? try { -JkServlet t33=(JkServlet)newInstance( org.apache.jk.server.tomcat33.JkServlet33 ); +Object o=newInstance( org.apache.tomcat.core.Context ); +if( o==null ) { +d(3.3 not detected or untrusted app); +return; +} +JkServlet t33= + (JkServlet)newInstance( org.apache.jk.server.tomcat33.JkServlet33 ); if( t33 == null ) { d(3.3 not detected or untrusted app); return; @@ -171,18 +163,19 @@ } } -protected JkMain jkMain; +protected JkMain jkMain=new JkMain(); -protected void initJkMain(ServletConfig cfg, Worker defaultWorker) { -jkMain=new JkMain(); +protected void initJkMain(ServletConfig cfg, JkHandler defaultWorker) { servletConfig2properties( jkMain, cfg ); -jkMain.setDefaultWorker( defaultWorker ); + +jkMain.getWorkerEnv().addHandler(container, defaultWorker ); String jkHome=cfg.getServletContext().getRealPath(/); d(Setting jkHome + jkHome ); -jkMain.setJkHome( jkHome ); +jkMain.setJkHome( jkHome + /WEB-INF ); try { +jkMain.init(); jkMain.start(); } catch( Exception ex ) { ex.printStackTrace(); @@ -203,7 +196,24 @@ } -private static final int dL=0; +/** Set jk main properties using the servlet config file + */ +private void servletConfig2properties(JkMain jk, ServletConfig conf ) +{ +if( conf==null ) { +d(No servlet config ); +return; +} +Enumeration paramNE=conf.getInitParameterNames(); +while( paramNE.hasMoreElements() ){ +String s=(String)paramNE.nextElement(); +String v=conf.getInitParameter(s); + +jk.setProperty( s, v ); +} +} + +private static final int dL=10; private static void d(String s ) { System.err.println( JkServlet: + s ); } 1.2 +4 -4 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JniMain.java Index: JniMain.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JniMain.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- JniMain.java 26 Jan 2002 17:21:41 - 1.1 +++ JniMain.java 6 Feb 2002 18:23:25 - 1.2 @@ -123,12 +123,12 @@ wEnv=new WorkerEnv(); ChannelJni cjni=new ChannelJni(); -wEnv.addChannel( jni, cjni ); -Worker defaultWorker=new WorkerDummy(); +wEnv.addHandler( jni, cjni ); +JkHandler defaultWorker=new WorkerDummy(); HandlerRequest hReq=new HandlerRequest(); -wEnv.addHandler( hReq ); -hReq.setWorker( defaultWorker );
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp Ajp13.java RequestHandler.java
costin 02/02/06 10:26:50 Modified:jk/java/org/apache/ajp Ajp13.java RequestHandler.java Log: Added support for the ajp13 secret. It shouldn't affect anything in the normal use-case - it just recognizes the new request attributes if it's sent by apache. In addition, any attributes with a single string value ( like most attributes are ) that is not known will be ignored, for better backward compatibility. Note that we don't do anything about the secret except recognizing it. A config option in the connector will use it. Revision ChangesPath 1.23 +9 -0 jakarta-tomcat-connectors/jk/java/org/apache/ajp/Ajp13.java Index: Ajp13.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/Ajp13.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- Ajp13.java19 Jan 2002 03:23:17 - 1.22 +++ Ajp13.java6 Feb 2002 18:26:50 - 1.23 @@ -142,6 +142,7 @@ // If no password is set, use only Ajp13 messaging boolean backwardCompat=true; boolean logged=false; +String secret=null; public Ajp13() { super(); @@ -207,6 +208,14 @@ logged=b; } +public void setSecret( String s ) { +secret=s; +} + +public String getSecret() { +return secret; +} + // Handlers registry static final int MAX_HANDLERS=32; 1.11 +16 -1 jakarta-tomcat-connectors/jk/java/org/apache/ajp/RequestHandler.java Index: RequestHandler.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/RequestHandler.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- RequestHandler.java 31 Jan 2002 17:18:51 - 1.10 +++ RequestHandler.java 6 Feb 2002 18:26:50 - 1.11 @@ -124,6 +124,7 @@ public static final byte SC_A_SSL_CIPHER= 8; public static final byte SC_A_SSL_SESSION = 9; public static final byte SC_A_SSL_KEYSIZE = 11; +public static final byte SC_A_SECRET= 12; // Used for attributes which are not in the list above public static final byte SC_A_REQ_ATTRIBUTE = 10; @@ -375,6 +376,17 @@ msg.getString()); break; + case SC_A_SECRET : +// If a request has a secret attribute, set it on +// channel - it'll be visible to the caller ( Interceptor, +// Connector ) and it can check it against its settings before +// trusting us. +String secret=msg.getString(); +if(secret!=null) { +ch.setSecret( secret ); +} +break; + case SC_A_SSL_SESSION : isSSL = true; req.setAttribute(javax.servlet.request.ssl_session, @@ -391,7 +403,10 @@ Integer.toString(msg.getInt())); return 200; default: - return 500; // Error +// Ignore. Assume a single-string value - we shouldn't +// allow anything else. +msg.getString(); +break; } } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
standardContext.namingInitFailed
I'm getting the following error in my log files after each webapp is loaded: StandardContext[/soap]: Cannot find message associated with key standardContext.namingInitFailed I assume this has something to do with JNDI... how can I fix it? Jack -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/conf jk2.properties
costin 02/02/06 11:04:28 Added: jk/conf jk2.properties Log: Config file for jk2. Right now everything is commented - the defaults will be used. Uncomment/edit if you want to change anything. Revision ChangesPath 1.1 jakarta-tomcat-connectors/jk/conf/jk2.properties Index: jk2.properties === # Workers.properties like file for the java side. # It should be easy to read from C as well, to avoid duplication # There are many ways to configure jk2 - including 'native' interceptor # conf in server.xml, servlet and web.xml, properties file. For the first, # version we'll use the file. If/when xml is used ( any form ), we'll # generate this file automatically. # Pattern ( similar with server.xml, but for properties ) : # # handler.NAME.className=[class name to be loaded] # handler.NAME.property=value : a setter will be called, with int,boolean # conversions if needed. # Handlers that will be loaded by jk2: # Default: # handler.list=channel,request,container # Transport handler. # Default: #handler.channel.className=org.apache.jk.common.ChannelSocket #handler.channel.debug=0 #handler.channel.port=8009 # Other options: #handler.channel.className=org.apache.jk.common.ChannelUn #handler.channel.file=${jk.home}/jk2.socket #handler.channel.className=org.apache.jk.common.ChannelJni # Optional - right now request handles all messages # handler.dispatch.className=org.apache.jk.common.HandlerDispatch # handler.dispatch.debug=0 # The only request handler we have right now, for ajp13 requests. # Default: #handler.request.className=org.apache.jk.common.HandlerRequest #handler.request.debug=0 #handler.container.className=org.apache.jk.common.WorkerDummy # This will be added automatically by the server adapter. Only dummy # needs to be added for testing purpose # handler.container.className=org.apache.jk.server.tomcat33.Worker33 # handler.container.className=org.apache.jk.server.tomcat40.Worker40 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/conf jk2.manifest
costin 02/02/06 11:06:16 Modified:jk/conf jk2.manifest Log: Added classes to classpath, for faster build in standalone Revision ChangesPath 1.2 +1 -1 jakarta-tomcat-connectors/jk/conf/jk2.manifest Index: jk2.manifest === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/conf/jk2.manifest,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk2.manifest 26 Jan 2002 16:02:32 - 1.1 +++ jk2.manifest 6 Feb 2002 19:06:16 - 1.2 @@ -1,2 +1,2 @@ Main-Class: org.apache.jk.server.JkMain -Class-Path: tomcat-util.jar workers.jar +Class-Path: tomcat-util.jar workers.jar ../classes/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp_common.c jk_ajp_common.h jk_service.h jk_util.c jk_util.h
costin 02/02/06 11:11:23 Modified:jk/native/common jk_ajp_common.c jk_ajp_common.h jk_service.h jk_util.c jk_util.h Log: Implementation of the 'secret' attribute in the request, used to pass a key used to authenticate the sender. This shouldn't affect in any way the current code - as long as the secret attribute is not set on the worker, the code will behave exactly as before and work with any tomcat from 3.2 to 4.1. If the attribute is set, the attribute will be sent - the receiving side should know how to deal with it, that means it should use a recent version of jk. On the java side, the new versions of jk will allow setting the key - that will require any web server to send the password in order to allow forwarding the request. The check will happen once per tcp connection. Revision ChangesPath 1.23 +13 -3 jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c Index: jk_ajp_common.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- jk_ajp_common.c 17 Dec 2001 15:29:38 - 1.22 +++ jk_ajp_common.c 6 Feb 2002 19:11:23 - 1.23 @@ -59,7 +59,7 @@ * Description: common stuff for bi-directional protocols ajp13/ajp14. * * Author: Gal Shachor [EMAIL PROTECTED] * * Author: Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.22 $ * + * Version: $Revision: 1.23 $ * ***/ @@ -272,7 +272,7 @@ static int ajp_marshal_into_msgb(jk_msg_buf_t*msg, jk_ws_service_t *s, jk_logger_t *l, - ajp_endpoint_t *ae) + ajp_endpoint_t *ae) { unsigned char method; unsigned i; @@ -320,6 +320,15 @@ } } +if (s-secret) { +if (jk_b_append_byte(msg, SC_A_SECRET) || +jk_b_append_string(msg, s-secret)) { +jk_log(l, JK_LOG_ERROR, + Error ajp_marshal_into_msgb - Error appending secret\n); +return JK_FALSE; +} +} + if (s-remote_user) { if (jk_b_append_byte(msg, SC_A_REMOTE_USER) || jk_b_append_string(msg, s-remote_user)) { @@ -384,7 +393,6 @@ } } - if (s-num_attributes 0) { for (i = 0 ; i s-num_attributes ; i++) { if (jk_b_append_byte(msg, SC_A_REQ_ATTRIBUTE) || @@ -1087,6 +1095,7 @@ p-reuse = JK_FALSE; *is_recoverable_error = JK_TRUE; +s-secret = p-worker-secret; /* * We get here initial request (in reqmsg) */ @@ -1240,6 +1249,7 @@ } } } +p-secret = jk_get_worker_secret(props, p-name ); } else { jk_log(l, JK_LOG_ERROR, In jk_worker_t::init, NULL parameters\n); } 1.14 +8 -4 jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.h Index: jk_ajp_common.h === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- jk_ajp_common.h 4 Dec 2001 19:44:23 - 1.13 +++ jk_ajp_common.h 6 Feb 2002 19:11:23 - 1.14 @@ -59,7 +59,7 @@ * Description: common stuff for bi-directional protocol ajp13/ajp14. * * Author: Gal Shachor [EMAIL PROTECTED] * * Author: Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.13 $ * + * Version: $Revision: 1.14 $ * ***/ #ifndef JK_AJP_COMMON_H @@ -88,6 +88,7 @@ #define SC_A_SSL_SESSION(unsigned char)9 #define SC_A_REQ_ATTRIBUTE (unsigned char)10 #define SC_A_SSL_KEY_SIZE (unsigned char)11/* only in if JkOptions +ForwardKeySize */ +#define SC_A_SECRET (unsigned char)12 #define SC_A_ARE_DONE (unsigned char)0xFF /* @@ -253,9 +254,12 @@ unsigned ep_cache_sz; ajp_endpoint_t **ep_cache; - int proto; /* PROTOCOL USED AJP13/AJP14 */ - - jk_login_service_t *login; +int
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_ajp14_worker.c
costin 02/02/06 11:13:10 Modified:jk/native2/common jk_ajp14_worker.c Log: Added the same secret option. Revision ChangesPath 1.15 +16 -52jakarta-tomcat-connectors/jk/native2/common/jk_ajp14_worker.c Index: jk_ajp14_worker.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_ajp14_worker.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- jk_ajp14_worker.c 26 Jan 2002 07:03:42 - 1.14 +++ jk_ajp14_worker.c 6 Feb 2002 19:13:10 - 1.15 @@ -101,35 +101,18 @@ jk_worker_t *p = _this; jk_worker_t *aw; char * secret_key; -int proto=AJP14_PROTO; char *channelType; aw = _this; -secret_key = jk_map_getStrProp( env, props, -worker, aw-name, secretkey, NULL ); - +_this-secret = jk_map_getStrProp( env, props, + worker, aw-name, secretkey, NULL ); +_this-secret= _this-pool-pstrdup(env, _this-pool, _this-secret); + channelType = jk_map_getStrProp( env, props, worker, aw-name, channel, socket ); -if ((!secret_key) || (!strlen(secret_key))) { -proto=AJP13_PROTO; -aw-proto= AJP13_PROTO; -} - -if (proto == AJP13_PROTO) { - port = AJP13_DEF_PORT; - host = AJP13_DEF_HOST; -} else if (proto == AJP14_PROTO) { - port = AJP14_DEF_PORT; - host = AJP14_DEF_HOST; -} else { - env-l-jkLog(env, env-l, JK_LOG_ERROR, - ajp14.validate() unknown protocol %d\n,proto); - return JK_FALSE; -} if( _this-channel == NULL ) { /* Create a default channel */ - _this-channel=env-getInstance(env, _this-pool,channel, channelType ); @@ -141,7 +124,6 @@ } err=_this-channel-init( env, _this-channel, props, p-name, _this); - if( err != JK_TRUE ) { env-l-jkLog(env, env-l, JK_LOG_ERROR, ajp14.validate(): channel init failed\n); @@ -149,8 +131,8 @@ } env-l-jkLog(env, env-l, JK_LOG_INFO, - ajp14.validate() %s protocol=%s\n, _this-name, - ((_this-secret==NULL) ? ajp13 : ajp14)); + ajp14.validate() %s %s\n, _this-name, + _this-channel-name); return JK_TRUE; } @@ -213,6 +195,11 @@ return err; } +/** There is no point of trying multiple times - each channel may +have built-in recovery mechanisms +*/ +#define JK_RETRIES 2 + /** First message in a stream-based connection. If the first send fails, try to reconnect. */ @@ -231,7 +218,7 @@ * XXX JK_RETRIES could be replaced by the number of workers in * a load-balancing configuration */ -for(attempt = 0 ; attempt worker-connect_retry_attempts ;attempt++) { +for(attempt = 0 ; attempt JK_RETRIES ;attempt++) { jk_channel_t *channel= worker-channel; /* e-request-dump(env, e-request, Before sending ); */ @@ -387,7 +374,7 @@ /* * We get here initial request (in reqmsg) */ -err=jk_serialize_request13(env, e-request, s); +err=jk_serialize_request13(env, e-request, s, e); if (err!=JK_TRUE) { s-is_recoverable_error = JK_FALSE; env-l-jkLog(env, env-l, JK_LOG_ERROR, @@ -497,7 +484,6 @@ e-cPool=endpointPool-create(env, endpointPool, HUGE_POOL_SIZE ); e-worker = _this; -e-proto = _this-proto; e-channelData = NULL; *eP = e; @@ -531,23 +517,8 @@ { jk_endpoint_t *e; int rc; -char *secret_key; -int proto=AJP14_PROTO; int cache_sz; -secret_key = jk_map_getStrProp( env, props, -worker, _this-name, secretkey, NULL ); - -if( secret_key==NULL ) { -proto=AJP13_PROTO; -_this-proto= AJP13_PROTO; -_this-secret=NULL; -} else { -/* Set Secret Key (used at logon time) */ -_this-secret = _this-pool-pstrdup(env, _this-pool, secret_key); -} - - /* start the connection cache */ cache_sz=jk_map_getIntProp(env, props, worker, _this-name, cachesize, @@ -567,10 +538,6 @@ _this-endpointCache=NULL; } -/* Set WebServerName (used at logon time) */ -if( we-server_name == NULL ) -we-server_name = _this-pool-pstrdup(env, we-pool,we-server_name); - if (_this-secret == NULL) { /* No extra initialization for AJP13 */ env-l-jkLog(env, env-l, JK_LOG_INFO, @@ -617,9 +584,9 @@
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_objCache.c
costin 02/02/06 11:14:50 Modified:jk/native2/common jk_objCache.c Log: - a more efficient and natural alghoritm - instead of searching in the array for an object, we use a normal stack. - allow the cache to grow, if -1 is set as size Revision ChangesPath 1.4 +42 -34jakarta-tomcat-connectors/jk/native2/common/jk_objCache.c Index: jk_objCache.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_objCache.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- jk_objCache.c 16 Dec 2001 23:29:55 - 1.3 +++ jk_objCache.c 6 Feb 2002 19:14:50 - 1.4 @@ -69,25 +69,34 @@ { int rc; -/* if( _this-debug 0 ) */ -/* _this-l-jkLog(_this-l, JK_LOG_DEBUG, Cache put\n); */ - -if(_this-ep_cache_sz = 0 ) +if(_this-size = 0 ) return JK_FALSE; JK_ENTER_CS(_this-cs, rc); -if(rc) { -int i; - -for(i = 0 ; i _this-ep_cache_sz ; i++) { -if(!_this-ep_cache[i]) { -_this-ep_cache[i] = obj; -break; -} +if(rc==JK_TRUE) { + +rc=JK_FALSE; + +if( _this-count = _this-size _this-maxSize== -1 ) { +/* Realloc */ +void **oldData=_this-data; +_this-data = +(void **)_this-pool-calloc(env, _this-pool, + 2 * sizeof(void *) * _this-size); +memcpy( _this-data, oldData, _this-size ); +_this-size *= 2; +/* XXX Can we destroy the old data ? Probably not. + It may be better to have a list - but it's unlikely + we'll have too many reallocations */ } + +if( _this-count _this-size ) { +_this-data[_this-count++]=obj; +} + JK_LEAVE_CS(_this-cs, rc); -if(i _this-ep_cache_sz) { +if(rc) { /* l-jkLog(l, JK_LOG_DEBUG, Return endpoint to pool\n); */ return JK_TRUE; } @@ -101,11 +110,19 @@ jk_objCache_init(jk_env_t *env, jk_objCache_t *_this, int cacheSize ) { int i; -_this-ep_cache = +if( cacheSize = 0 ) { +_this-size= 64; +} else { +_this-size= cacheSize ; +} +_this-count=0; +_this-maxSize=cacheSize; + +_this-data = (void **)_this-pool-calloc(env, _this-pool, - sizeof(void *) * cacheSize); + sizeof(void *) * _this-size); -if( _this-ep_cache==NULL ) +if( _this-data==NULL ) return JK_FALSE; JK_INIT_CS((_this-cs), i); @@ -115,11 +132,6 @@ return JK_FALSE; } -for(i = 0 ; i cacheSize ; i++) { -_this-ep_cache[i] = NULL; -} - -_this-ep_cache_sz=cacheSize; return JK_TRUE; } @@ -129,7 +141,7 @@ JK_DELETE_CS((_this-cs), i); -_this-ep_cache_sz=0; +_this-count=0; /* Nothing to free, we use pools */ return JK_TRUE; @@ -142,21 +154,13 @@ int rc; void *ae=NULL; -if (_this-ep_cache_sz = 0 ) -return NULL; - - JK_ENTER_CS(_this-cs, rc); if (rc) { -int i; - -for (i = 0 ; i _this-ep_cache_sz ; i++) { -if (_this-ep_cache[i]) { -ae = _this-ep_cache[i]; -_this-ep_cache[i] = NULL; -break; -} +if( _this-count 0 ) { +_this-count--; +ae=_this-data[ _this-count ]; } + JK_LEAVE_CS(_this-cs, rc); return ae; @@ -168,6 +172,10 @@ jk_objCache_t *_this=pool-calloc( env, pool, sizeof( jk_objCache_t )); _this-pool=pool; + +_this-count=0; +_this-size=0; +_this-maxSize=-1; _this-get=jk_objCache_get; _this-put=jk_objCache_put; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_vm_default.c
costin 02/02/06 11:15:25 Modified:jk/native2/common jk_vm_default.c Log: Update the defaults for the current naming conventions. Revision ChangesPath 1.3 +7 -11 jakarta-tomcat-connectors/jk/native2/common/jk_vm_default.c Index: jk_vm_default.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_vm_default.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- jk_vm_default.c 26 Jan 2002 07:10:30 - 1.2 +++ jk_vm_default.c 6 Feb 2002 19:15:25 - 1.3 @@ -121,9 +121,9 @@ /** Where to try to find jk jars ( if user doesn't specify it explicitely ) */ static const char *defaultJK_PATH[]={ -$(tomcat.home)$(fs)modules$(fs)jk$(fs)WEB-INF$(fs)lib$(fs)jk2.jar, +$(tomcat.home)$(fs)modules$(fs)jk$(fs)WEB-INF$(fs)lib$(fs)tomcat-jk2.jar, $(tomcat.home)$(fs)modules$(fs)jk$(fs)WEB-INF$(fs)lib$(fs)tomcat-utils.jar, -$(tomcat.home)$(fs)webapps(fs)jk$(fs)WEB-INF$(fs)lib$(fs)ajp.jar, +$(tomcat.home)$(fs)webapps(fs)jk$(fs)WEB-INF$(fs)lib$(fs)tomcat-jk2.jar, $(tomcat.home)$(fs)webapps(fs)jk$(fs)WEB-INF$(fs)lib$(fs)tomcat-utils.jar, NULL }; @@ -409,20 +409,16 @@ if(vm_args.classpath) { unsigned len = strlen(vm_args.classpath) + - strlen(p-tomcat_classpath) + - 3; +strlen(p-tomcat_classpath) + 3; char *tmp = p-pool-alloc(env, p-pool, len); -if(tmp) { -sprintf(tmp, %s%c%s, -p-tomcat_classpath, -PATH_SEPERATOR, -vm_args.classpath); -p-tomcat_classpath = tmp; -} else { +if(tmp==NULL) { env-l-jkLog(env, env-l, JK_LOG_EMERG, Fail- allocation error for classpath\n); return JK_FALSE; } +sprintf(tmp, %s%c%s, p-tomcat_classpath, +PATH_SEPERATOR, vm_args.classpath); +p-tomcat_classpath = tmp; } vm_args.classpath = p-tomcat_classpath; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_workerEnv.c
costin 02/02/06 11:16:25 Modified:jk/native2/common jk_workerEnv.c Log: Small fix - not all declared workers will be available. Revision ChangesPath 1.15 +12 -8 jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c Index: jk_workerEnv.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- jk_workerEnv.c26 Jan 2002 07:11:00 - 1.14 +++ jk_workerEnv.c6 Feb 2002 19:16:25 - 1.15 @@ -59,7 +59,7 @@ * Description: Workers controller * * Author: Gal Shachor [EMAIL PROTECTED] * * Author: Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.14 $ * + * Version: $Revision: 1.15 $ * ***/ #include jk_workerEnv.h @@ -69,7 +69,8 @@ #define DEFAULT_WORKER (ajp13) -int JK_METHOD jk_workerEnv_factory( jk_env_t *env, jk_pool_t *pool, void **result, +int JK_METHOD jk_workerEnv_factory( jk_env_t *env, jk_pool_t *pool, +void **result, const char *type, const char *name); static void jk_workerEnv_close(jk_env_t *env, jk_workerEnv_t *_this); @@ -191,20 +192,21 @@ int i; int err; char *tmp; +int declared_workers=0; /* _this-init_data=init_data; */ tmp = jk_map_getString(env, init_data, worker.list, DEFAULT_WORKER ); worker_list=jk_map_split( env, init_data, init_data-pool, - tmp, NULL, _this-num_of_workers ); + tmp, NULL, declared_workers ); -if(worker_list==NULL || _this-num_of_workers= 0 ) { +if(worker_list==NULL || declared_workers = 0 ) { /* assert() - we pass default worker, we should get something back */ return JK_FALSE; } -for(i = 0 ; i _this-num_of_workers ; i++) { +for(i = 0 ; i declared_workers ; i++) { jk_worker_t *w = NULL; jk_worker_t *oldw = NULL; const char *name=(const char*)worker_list[i]; @@ -226,7 +228,7 @@ env-l-jkLog(env, env-l, JK_LOG_INFO, workerEnv.init() %d workers, default %s\n, - _this-num_of_workers, worker_list[0]); + declared_workers, worker_list[0]); return JK_TRUE; } @@ -531,7 +533,7 @@ w=(jk_worker_t *)env-getInstance(env, workerPool, worker, type ); - + if( w == NULL ) { env-l-jkLog(env, env-l, JK_LOG_ERROR, workerEnv.createWorker(): factory can't create worker %s:%s\n, @@ -539,6 +541,7 @@ return NULL; } +w-type=type; w-name=(char *)name; w-pool=workerPool; w-workerEnv=_this; @@ -588,7 +591,8 @@ return w; } -int JK_METHOD jk_workerEnv_factory( jk_env_t *env, jk_pool_t *pool, void **result, +int JK_METHOD jk_workerEnv_factory( jk_env_t *env, jk_pool_t *pool, +void **result, const char *type, const char *name) { jk_workerEnv_t *_this; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_worker_status.c
costin 02/02/06 11:16:56 Modified:jk/native2/common jk_worker_status.c Log: Small update, remove debug statement. Revision ChangesPath 1.4 +24 -13jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c Index: jk_worker_status.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- jk_worker_status.c26 Jan 2002 06:58:50 - 1.3 +++ jk_worker_status.c6 Feb 2002 19:16:56 - 1.4 @@ -99,7 +99,7 @@ va_end(vargs); buf-s-write( env, buf-s, buf-buf, strlen(buf-buf) ); -fprintf(stderr, Writing %d %s \n, ret, buf-buf); +/*fprintf(stderr, Writing %d %s \n, ret, buf-buf); */ } static void jk_worker_status_displayWorkers( jk_env_t *env, jk_buff_t *buf, @@ -107,25 +107,39 @@ { jk_map_t *map=wenv-worker_map; int i; +int count=map-size( env, map ); -jk_printf(env, buf, H2Workers/H2\n ); +jk_printf(env, buf, H2Active workers/H2\n ); jk_printf(env, buf, table border\n); -jk_printf(env, buf, trthName/ththRetries/th - thErr/ththRecovery/th/tr); +jk_printf(env, buf, trthName/ththType/th + thChannel/ththRoute/th + thError state/ththRecovery/th + thEndpoint cache/th/tr); -for( i=0; i map-size( env, map ) ; i++ ) { +for( i=0; i count ; i++ ) { char *name=map-nameAt( env, map, i ); jk_worker_t *worker=(jk_worker_t *)map-valueAt( env, map,i ); -jk_printf(env, buf, tr id='worker.%s', name ); -jk_printf(env, buf, td class='name'%s/td, name ); -jk_printf(env, buf, td class='connect_retry'%d/td, - worker-connect_retry_attempts ); +jk_printf(env, buf, trtd%s/td, name ); +jk_printf(env, buf, td%s/td, worker-type ); +if( worker-channel != NULL ) { +jk_printf(env, buf, td%s/td,worker-channel-name ); +} else { +jk_printf(env, buf, tdnbsp;/td ); +} +if( worker-route != NULL ) { +jk_printf(env, buf, td%s/td,worker-route ); +} else { +jk_printf(env, buf, tdnbsp;/td ); +} jk_printf(env, buf, td class='in_error'%d/td, worker-in_error_state ); -jk_printf(env, buf, td class='in_error'%d/td, +jk_printf(env, buf, td class='in_recovering'%d/td, worker-in_recovering ); +jk_printf(env, buf, td class='epCount'%d/td, + ( worker-endpointCache == NULL ? 0 : +worker-endpointCache-count )); /* Endpoint cache ? */ @@ -145,9 +159,6 @@ jk_printf(env, buf, H2Worker Env Info/H2\n); jk_printf(env, buf, table border\n); -jk_printf(env, buf, trthnum_workers/th - td id='workersCount'%d/td/tr\n, - wenv-num_of_workers); /* Could be modified dynamically */ jk_printf(env, buf, trthLogLevel/th td id='logLevel'%d/td/tr\n, -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_env.h
costin 02/02/06 11:18:21 Modified:jk/native2/include jk_env.h Log: Initial work on the exception mechanism, that would allow more meaningfull error messages out of jk. We can live without it, so it's low priority. Revision ChangesPath 1.5 +46 -4 jakarta-tomcat-connectors/jk/native2/include/jk_env.h Index: jk_env.h === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_env.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- jk_env.h 16 Dec 2001 23:17:23 - 1.4 +++ jk_env.h 6 Feb 2002 19:18:21 - 1.5 @@ -114,17 +114,59 @@ */ jk_env_t* JK_METHOD jk_env_getEnv( char *id, struct jk_pool *pool ); +#define JK_LINE __FILE__,__LINE__ +struct jk_exception { +char *file; +int line; + +char *type; +char *msg; + +struct jk_exception *next; +}; + +typedef struct jk_exception jk_exception_t; + + /** * The env will be used in a similar way with the JniEnv, to provide * access to various low level services ( pool, logging, system properties ) * in a consistent way. In time we should have all methods follow - * the same pattern, with env as a first parameter, then the object ( this ) and - * the other methods parameters. + * the same pattern, with env as a first parameter, then the object ( this ) + * and the other methods parameters. */ struct jk_env { struct jk_logger *l; -struct jk_pool *globalPool; +struct jk_pool *globalPool; + +/** Pool used for local allocations. It'll be reset when the +env is released ( the equivalent of 'detach' ). Can be +used for temp. allocation of small objects. +*/ +struct jk_pool *localPool; + +/* Exceptions + */ +void (JK_METHOD *jkThrow)( jk_env_t *env, + const char *file, int line, + const char *type, + const char *fmt, ... ); + +/** re-throw the exception and record the current pos. + * in the stack trace + */ +void (JK_METHOD *jkReThrow)( jk_env_t *env, + const char *file, int line ); + +/* Last exception that occured + */ +struct jk_exception *(JK_METHOD *jkException)( jk_env_t *env ); + +/** Clear the exception state + */ +void (JK_METHOD *jkClearException)( jk_env_t *env ); + /** Global properties ( similar with System properties in java) */ @@ -171,7 +213,7 @@ /* private */ struct jk_map *_registry; - +struct jk_exception *lastException; }; void JK_METHOD jk_registry_init(jk_env_t *env); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_objCache.h jk_worker.h jk_workerEnv.h
costin 02/02/06 11:19:16 Modified:jk/native2/include jk_objCache.h jk_worker.h jk_workerEnv.h Log: Fixes/updates. Removed num_of_workers from workerEnv, it was redundant. Revision ChangesPath 1.5 +16 -3 jakarta-tomcat-connectors/jk/native2/include/jk_objCache.h Index: jk_objCache.h === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_objCache.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- jk_objCache.h 16 Dec 2001 23:17:23 - 1.4 +++ jk_objCache.h 6 Feb 2002 19:19:16 - 1.5 @@ -105,10 +105,23 @@ int (*destroy)(struct jk_env *env, jk_objCache_t *_this); -/* private, move to impl ( if any other impl is available) */ -int ep_cache_sz; +/** Cache max size. -1 for unbound ( i.e. growing ). */ +int maxSize; + +/* Current size of the table */ +int size; + +/** Number of elements in the cache. + * Postition where next element will be inserted. + */ +int count; + +/* Sync. + */ JK_CRIT_SEC cs; -void **ep_cache; + +/** Objects in the cache */ +void **data; struct jk_pool *pool; }; 1.11 +17 -30jakarta-tomcat-connectors/jk/native2/include/jk_worker.h Index: jk_worker.h === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_worker.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- jk_worker.h 26 Jan 2002 06:41:51 - 1.10 +++ jk_worker.h 6 Feb 2002 19:19:16 - 1.11 @@ -58,7 +58,7 @@ /*** * Description: Workers controller header file * * Author: Gal Shachor [EMAIL PROTECTED] * - * Version: $Revision: 1.10 $ * + * Version: $Revision: 1.11 $ * ***/ #ifndef JK_WORKER_H @@ -127,13 +127,21 @@ struct jk_workerEnv *workerEnv; char *name; +char *type; + +/** The id of the tomcat instance we connect to. We may have multiple +workers connecting to a single tomcat. If no route is defined, +the worker name will be the route name. The route can be the +name of another worker. + */ +char *route; /** Pool for worker specific informations. In future we may start/stop/reload workers at runtime, but that's far away */ struct jk_pool *pool; - + /* * A 'this' pointer which is used by the subclasses of this class to * point to data/functions which are specific to a given protocol @@ -141,39 +149,19 @@ */ void *worker_private; -/* XXX Add name and all other common properties !!! - */ - -/** Communication channle used by the worker +/** Communication channel used by the worker */ struct jk_channel *channel; -/* XXX Stuff from ajp, some is generic, some not - need to - sort out after */ -struct sockaddr_in worker_inet_addr; /* Contains host and port */ -int connect_retry_attempts; - /** Reuse the endpoint and it's connection */ struct jk_objCache *endpointCache; -/** Request pool cache. XXX We may use reqCache. +/** Request pool cache. XXX We may use a pool of requests. */ struct jk_objCache *rPoolCache; -/* - * Open connections cache... - * - * 1. Critical section object to protect the cache. - * 2. Cache size. - * 3. An array of open endpoints. - */ -/* JK_CRIT_SEC cs; */ -/* int ep_cache_sz; */ -/* struct jk_endpoint **ep_cache; */ - -int proto; -/* Password for ajp14+ connections. If null we default to ajp13.*/ +/* Private key used to connect to the remote side2.*/ char * secret; /* Each worker can be part of a load-balancer scheme. @@ -185,16 +173,15 @@ int in_error_state; int in_recovering; time_t error_time; +/** Last exception recorded on this worker, the reason for + * which this worker is in error state and can't perform. + */ +struct jk_exception *lastError; /** If num_of_workers 0 this is an load balancing worker */ jk_worker_t **lb_workers; int num_of_workers; - -/* - * For all of the below (except destroy), the first argument is - * essentially a 'this' pointer. -
DO NOT REPLY [Bug 5925] - Apache server hangs up and consumes 100% CPU resource when upload file to server
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5925. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5925 Apache server hangs up and consumes 100% CPU resource when upload file to server [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c jk_worker_jni.c
costin 02/02/06 11:20:42 Modified:jk/native2/common jk_env.c jk_worker_jni.c Log: Updates/fixes. Revision ChangesPath 1.9 +19 -8 jakarta-tomcat-connectors/jk/native2/common/jk_env.c Index: jk_env.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- jk_env.c 31 Dec 2001 22:25:03 - 1.8 +++ jk_env.c 6 Feb 2002 19:20:41 - 1.9 @@ -56,9 +56,9 @@ * = */ #include jk_env.h +#include jk_objCache.h -/* Singleton for now */ -jk_env_t *jk_env_singleton; +jk_env_t *jk_env_globalEnv; /* Private methods */ @@ -69,16 +69,26 @@ */ jk_env_t* JK_METHOD jk_env_getEnv( char *id, jk_pool_t *pool ) { - if( jk_env_singleton == NULL ) { - jk_env_singleton=(jk_env_t *)pool-calloc( NULL, pool, sizeof( jk_env_t )); - jk_env_singleton-globalPool = pool; - jk_env_initEnv( (jk_env_t *)jk_env_singleton, id ); + if( jk_env_globalEnv == NULL ) { + jk_env_globalEnv=(jk_env_t *)pool-calloc( NULL, pool, sizeof( jk_env_t )); + jk_env_globalEnv-globalPool = pool; + jk_env_initEnv( (jk_env_t *)jk_env_globalEnv, id ); } - return jk_env_singleton; + return jk_env_globalEnv; } /* Implementation */ +static jk_env_t * JK_METHOD jk_env_get( jk_env_t *env ) +{ +return NULL; +} + +static int JK_METHOD jk_env_put( jk_env_t *parent, jk_env_t *chld ) +{ + +return JK_TRUE; +} static jk_env_objectFactory_t JK_METHOD jk_env_getFactory(jk_env_t *env, const char *type, @@ -107,7 +117,8 @@ return result; } -static void *jk_env_getInstance( jk_env_t *_this, jk_pool_t *pool, const char *type, const char *name ) +static void *jk_env_getInstance( jk_env_t *_this, jk_pool_t *pool, + const char *type, const char *name ) { jk_env_objectFactory_t fac; void *result; 1.2 +2 -1 jakarta-tomcat-connectors/jk/native2/common/jk_worker_jni.c Index: jk_worker_jni.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_jni.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_worker_jni.c 26 Jan 2002 06:48:17 - 1.1 +++ jk_worker_jni.c 6 Feb 2002 19:20:41 - 1.2 @@ -198,7 +198,8 @@ if( jniWorker-jk_java_bridge_class == NULL ) { env-l-jkLog(env, env-l, JK_LOG_EMERG, - Can't find class %s\n, str_config); + Can't find class %s in %s\n, str_config, + jniWorker-vm-tomcat_classpath ); /* [V] the detach here may segfault on 1.1 JVM... */ jniWorker-vm-detach(env, jniWorker-vm); return JK_FALSE; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 mod_jk.c
costin 02/02/06 11:20:59 Modified:jk/native2/server/apache2 mod_jk.c Log: Updates. Revision ChangesPath 1.19 +11 -12jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk.c Index: mod_jk.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- mod_jk.c 26 Jan 2002 07:13:47 - 1.18 +++ mod_jk.c 6 Feb 2002 19:20:59 - 1.19 @@ -59,7 +59,7 @@ * Description: Apache 2 plugin for Jakarta/Tomcat * * Author: Gal Shachor [EMAIL PROTECTED] * * Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.18 $ * + * Version: $Revision: 1.19 $ * ***/ /* @@ -158,9 +158,9 @@ uriEnv-webapp=workerEnv-createWebapp( workerEnv-globalEnv, workerEnv, NULL, cmd-path, NULL ); -fprintf(stderr, New webapp %p %p\n,uriEnv, uriEnv-webapp); +/* fprintf(stderr, New webapp %p %p\n,uriEnv, uriEnv-webapp); */ } else { -fprintf(stderr, Existing webapp %p\n,uriEnv-webapp); +/* fprintf(stderr, Existing webapp %p\n,uriEnv-webapp); */ } if( strcmp( name, worker) == 0 ) { @@ -173,8 +173,8 @@ ap_pstrdup(cmd-pool, val)); } -fprintf(stderr, XXX Set worker %p %s %s dir=%s args=%s\n, -uriEnv, uriEnv-webapp-workerName, cmd-path, +fprintf(stderr, JkWebapp %s %s dir=%s args=%s\n, +uriEnv-webapp-workerName, cmd-path, cmd-directive-directive, cmd-directive-args); @@ -205,7 +205,7 @@ ap_pstrdup(cmd-pool, val)); } -fprintf(stderr, XXX SetServlet %p %p %s %s dir=%s args=%s\n, +fprintf(stderr, JkServlet %p %p %s %s dir=%s args=%s\n, uriEnv, uriEnv-webapp, name, val, cmd-directive-directive, cmd-directive-args); @@ -293,7 +293,7 @@ /* Generic JkSet foo bar */ m-add(env, m, ap_pstrdup( cmd-pool, name), ap_pstrdup( cmd-pool, value)); -fprintf( stderr, set2.init_data: %s %s\n, name, value ); +/* fprintf( stderr, set2.init_data: %s %s\n, name, value ); */ } else if( strcmp(type, env)==0) { workerEnv-envvars_in_use = JK_TRUE; workerEnv-envvars-put(env, workerEnv-envvars, @@ -447,10 +447,10 @@ /* XXX */ -fprintf(stderr, XXX Merged dir config %p %p %s %s %p %p\n, -base, new, -base-uri, add-uri, -base-webapp, add-webapp); +/* fprintf(stderr, XXX Merged dir config %p %p %s %s %p %p\n, */ +/* base, new, */ +/* base-uri, add-uri, */ +/* base-webapp, add-webapp); */ if( add-webapp == NULL ) { add-webapp=base-webapp; @@ -501,7 +501,6 @@ /* Local initialization */ workerEnv-_private = s; -fprintf( stderr, Create worker env %p\n, workerEnv ); } /** Create default jk_config. XXX This is mostly server-independent, -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: DO NOT REPLY [Bug 6267] - RequestDispatcher breaks on URLs with anchors
Actually, Larry is right. However, what is being asked for is rather silly. Personally, I'd go for INVALID since section 8.1 (of the 2.3 spec) only talks about paths, not URIs. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 06, 2002 6:59 AM Subject: DO NOT REPLY [Bug 6267] - RequestDispatcher breaks on URLs with anchors DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6267. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6267 RequestDispatcher breaks on URLs with anchors [EMAIL PROTECTED] changed: What|Removed |Added -- -- Status|RESOLVED|REOPENED Resolution|DUPLICATE | --- Additional Comments From [EMAIL PROTECTED] 2002-02-06 14:59 --- Tried the War file with Tomcat 4.0.2-b2 and it still shows the problem. I think the fix for 6115 only applied to encodeURL() which this webapp isn't using. (Tomcat 3.3 needs fixing too.) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkMain.java
costin 02/02/06 12:24:09 Modified:jk/java/org/apache/jk/server JkMain.java Log: Added the start time and a message to tune the initialization of jk Revision ChangesPath 1.9 +8 -0 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java Index: JkMain.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- JkMain.java 6 Feb 2002 18:22:45 - 1.8 +++ JkMain.java 6 Feb 2002 20:24:09 - 1.9 @@ -190,6 +190,8 @@ } wEnv.start(); +long initTime=System.currentTimeMillis() - start_time; +d(Jk running... init time= + initTime + ms); } // Usefull methods @@ -217,7 +219,13 @@ IntrospectionUtils.setProperty( target, name, val ); } +public long getStartTime() { +return start_time; +} + // Main + +static long start_time=System.currentTimeMillis(); public static void main(String args[]) { try { -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkMain.java
costin 02/02/06 12:24:45 Modified:jk/java/org/apache/jk/server JkMain.java Log: Forgot to save. Revision ChangesPath 1.10 +1 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java Index: JkMain.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- JkMain.java 6 Feb 2002 20:24:09 - 1.9 +++ JkMain.java 6 Feb 2002 20:24:45 - 1.10 @@ -191,7 +191,7 @@ wEnv.start(); long initTime=System.currentTimeMillis() - start_time; -d(Jk running... init time= + initTime + ms); +d(Jk running... init time= + initTime + ms); } // Usefull methods -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkMain.java
costin 02/02/06 12:33:54 Modified:jk/java/org/apache/jk/common ChannelSocket.java jk/java/org/apache/jk/server JkMain.java Log: Set the default port, improve the arg parsing for JkMain ( used for debugging and tunning mostly, but since a lot of time is spent on that it should be nice ) Revision ChangesPath 1.5 +1 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java Index: ChannelSocket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ChannelSocket.java6 Feb 2002 17:43:08 - 1.4 +++ ChannelSocket.java6 Feb 2002 20:33:54 - 1.5 @@ -96,7 +96,7 @@ */ public class ChannelSocket extends Channel { -int port; +int port=8009; InetAddress inet; int serverTimeout; boolean tcpNoDelay; 1.11 +12 -6 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java Index: JkMain.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- JkMain.java 6 Feb 2002 20:24:45 - 1.10 +++ JkMain.java 6 Feb 2002 20:33:54 - 1.11 @@ -130,6 +130,10 @@ wEnv.setJkHome(s); } +public void setDebug( int i ) { +dL=i; +d(set debug + i ); +} // Initialization @@ -173,9 +177,10 @@ String workers=props.getProperty( handler.list, channel,request,container ); Vector workerNamesV= split( workers, ,); - +if( dL 0 ) d(workers: + workers + + workerNamesV.size() ); for( int i=0; iworkerNamesV.size(); i++ ) { String name= (String)workerNamesV.elementAt( i ); +if( dL 0 ) d(Configuring + name ); JkHandler w=wEnv.getHandler( name ); if( w==null ) w=(JkHandler)newInstance( handler, name, null ); @@ -232,8 +237,9 @@ if( args.length == 1 ( -?.equals(args[0]) || -h.equals( args[0])) ) { System.out.println(Usage: ); -System.out.println( JkMain [workers.properties]); +System.out.println( JkMain [args]); System.out.println(); +System.out.println( Each bean setter corresponds to an arg ( like -debug 10 )); System.out.println( System properties:); System.out.println(jk2.homeBase dir of jk2); return; @@ -241,11 +247,11 @@ JkMain jkMain=new JkMain(); +IntrospectionUtils.processArgs( jkMain, args, new String[] {}, +null, new Hashtable()); + jkMain.guessHome(); -if( args.length 0 ) -jkMain.setPropertiesFile(args[0]); - jkMain.init(); jkMain.start(); } catch( Exception ex ) { @@ -312,7 +318,7 @@ } } -private static final int dL=0; +private static int dL=0; private static void d(String s ) { System.err.println( JkMain: + s ); } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6286] New: - Spaces should be allowed in Servlet Context paths
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6286. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6286 Spaces should be allowed in Servlet Context paths Summary: Spaces should be allowed in Servlet Context paths Product: Tomcat 4 Version: 4.0.1 Final Platform: All OS/Version: All Status: NEW Severity: Major Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Tomcat 4.0.1 does not allow spaces in Servlet Context paths, but it should. For example, if I have a context named Spaces 2 and I try to access this context using a properly escapted URL like http://localhost:8080/Spaces%202; Tomcat will give me a resource not found error. Spaces should also be allowed in directory names under the Servlet Context. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans MBeanFactory.java
amyroh 02/02/06 14:03:54 Modified:catalina/src/share/org/apache/catalina/mbeans MBeanFactory.java Log: Hard code to look for object names in Registry instead of full mbean names. Revision ChangesPath 1.5 +85 -35 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java Index: MBeanFactory.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- MBeanFactory.java 29 Jan 2002 23:10:49 - 1.4 +++ MBeanFactory.java 6 Feb 2002 22:03:54 - 1.5 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v 1.4 2002/01/29 23:10:49 amyroh Exp $ - * $Revision: 1.4 $ - * $Date: 2002/01/29 23:10:49 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v 1.5 2002/02/06 22:03:54 amyroh Exp $ + * $Revision: 1.5 $ + * $Date: 2002/02/06 22:03:54 $ * * * @@ -102,7 +102,7 @@ * codeorg.apache.catalina.core.StandardServer/code component./p * * @author Amy Roh - * @version $Revision: 1.4 $ $Date: 2002/01/29 23:10:49 $ + * @version $Revision: 1.5 $ $Date: 2002/02/06 22:03:54 $ */ public class MBeanFactory extends BaseModelMBean { @@ -145,6 +145,25 @@ // - Operations +/** + * Return the managed bean definition for the specified bean type + * + * @param type MBean type + */ +public String findObjectName(String type) { + +if (type.equals(org.apache.catalina.core.StandardContext)) { +return StandardContext; +} else if (type.equals(org.apache.catalina.core.StandardDefaultContext)) { +return DefaultContext; +} else if (type.equals(org.apache.catalina.core.StandardEngine)) { +return StandardEngine; +} else if (type.equals(org.apache.catalina.core.StandardHost)) { +return StandardHost; +} else return null; + +} + /** * Create a new AccessLoggerValve. @@ -156,13 +175,15 @@ public String createAccessLoggerValve(String parent) throws Exception { -ManagedBean managed = registry.findManagedBean(parent); +ObjectName pname = new ObjectName(parent); +String type = pname.getKeyProperty(type); +String tname = findObjectName(type); +ManagedBean managed = registry.findManagedBean(tname); String domain = null; if (managed != null) domain = managed.getDomain(); if (domain == null) domain = mserver.getDefaultDomain(); -ObjectName pname = new ObjectName(parent); Object obj = mserver.getAttribute(pname, managedResource); Container container = null; if (obj instanceof Container) { @@ -189,7 +210,8 @@ public String createDefaultContext(String parent) throws Exception { -ManagedBean managed = registry.findManagedBean(parent); +String tname = StandardHost; +ManagedBean managed = registry.findManagedBean(tname); String domain = null; if (managed != null) domain = managed.getDomain(); @@ -222,13 +244,15 @@ public String createFileLogger(String parent) throws Exception { -ManagedBean managed = registry.findManagedBean(parent); +ObjectName pname = new ObjectName(parent); +String type = pname.getKeyProperty(type); +String tname = findObjectName(type); +ManagedBean managed = registry.findManagedBean(tname); String domain = null; if (managed != null) domain = managed.getDomain(); if (domain == null) domain = mserver.getDefaultDomain(); -ObjectName pname = new ObjectName(parent); Object obj = mserver.getAttribute(pname, managedResource); Container container = null; if (obj instanceof Container) { @@ -257,7 +281,8 @@ public String createHttp10Connector(String parent, String address, int port) throws Exception { -ManagedBean managed = registry.findManagedBean(parent); +String tname = StandardService; +ManagedBean managed = registry.findManagedBean(tname); String domain = null; if (managed != null) domain = managed.getDomain(); @@ -295,7 +320,8 @@ public String createHttp11Connector(String parent, String address, int port)
Is there a Design Doc
Hi, Is there any design doc/rose model for tomcat. In case there is one can I have a link to that doc. Sorry I am new to Tomacat. regards Rajesh T -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[PATCH] Fixes problem with Warp connector and HTTP POST via SSL.
Aloha, The following patch fixes a problem with SSL client ceritificates and HTTP POST data when using the Warp connector. When Tomcat retrieves the SSL certificate, the getX509Certificates() method is called and this.packet is reset... Now, when the read() method is called to retrieve the POST data, the packet type is invalid and an exception is thrown preventing the parameters from showing up in the request. The quick fix was to make the packet variable in getX509Certificates() local, but maybe there should be another WarpPacket class variable that could be reused instead of constructing a new WarpPacket on every invocation? I'll leave that decision to people who are more familiar with the code. - Glen Nakamura --- webapp-module-1.0.1-tc401/java/WarpRequest.java Wed Oct 31 13:21:33 2001 +++ ../webapp-module-1.0.1-tc401/java/WarpRequest.java Fri Feb 1 14:46:53 2002 @@ -201,8 +201,9 @@ public String getX509Certificates() throws IOException { if (closed) throw new IOException(Stream closed); -this.packet.reset(); -this.packet.setType(Constants.TYPE_ASK_SSL_CLIENT); +WarpPacket packet = new WarpPacket(); +packet.reset(); +packet.setType(Constants.TYPE_ASK_SSL_CLIENT); this.request.getConnection().send(packet); packet.reset(); @@ -211,7 +212,7 @@ if (packet.getType()==Constants.TYPE_REP_SSL_NO) return(null); if (packet.getType()!=Constants.TYPE_REP_SSL_CERT) throw new IOException(Invalid WARP packet type for CC); -return(this.packet.readString()); +return(packet.readString()); } /** Read the data from the SSL environment. */ @@ -219,8 +220,9 @@ throws IOException { if (closed) throw new IOException(Stream closed); -this.packet.reset(); -this.packet.setType(Constants.TYPE_ASK_SSL); +WarpPacket packet = new WarpPacket(); +packet.reset(); +packet.setType(Constants.TYPE_ASK_SSL); this.request.getConnection().send(packet); packet.reset(); @@ -230,9 +232,9 @@ if (packet.getType()!=Constants.TYPE_REP_SSL) throw new IOException(Invalid WARP packet type for SSL data); WarpSSLData ssldata = new WarpSSLData(); -ssldata.ciph = this.packet.readString(); -ssldata.sess = this.packet.readString(); -ssldata.size = this.packet.readInteger(); +ssldata.ciph = packet.readString(); +ssldata.sess = packet.readString(); +ssldata.size = packet.readInteger(); return(ssldata); } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
problem with manager web app
I have a simple set up where I am using tomcat 4.0.1 and apache with mod_webapp. I have a couple of webapps and I am trying to use the manage web app to start/stop install/remove them. Everything works great if I am just using tomcat (for both http and servlet/jsp) When I use mod_webapp (apache tomcat) I can do everything but install the webapp. I can start/stop/remove. Install looks like it works and when I list the web apps it is installed. but when I try to access the webapp I get the following error in my log file: Thanks, mark 2002-01-31 18:14:59 WarpEngine[Apache]: Mapping request 2002-01-31 18:14:59 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at org.apache.catalina.connector.warp.WarpEngine.map(WarpEngine.java) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java) at org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHandler.java) at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java) at java.lang.Thread.run(Thread.java:484) Host section of my server.xml !-- Define the default virtual host -- Host reloadable=true name=mark debug=0 appBase=webapps-deploy unpackWARs=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=common/ !-- Tomcat Manager Context -- Context path=/manager docBase=manager debug=0 privileged=true/ Context docBase=registration path=/registration reloadable=true debug=0 Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=regstration_log. suffix=.txt timestamp=true/ /Context Context docBase=Gallery path=/Gallery reloadable=true debug=0 Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=Gallery_log. suffix=.txt timestamp=true/ /Context /Host httpd.conf webapp secion VirtualHost * ServerName mark DocumentRoot /home/mcgordon/pws/webroot WebAppConnection conn warp localhost:8008 #WebAppDeploy struts-example conn/struts-example WebAppDeployGallery conn/Gallery WebAppDeployregistrationconn/registration WebAppDeploymanager conn/manager /VirtualHost -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Is there a Design Doc
--- Rajesh T [EMAIL PROTECTED] wrote: Hi, Is there any design doc/rose model for tomcat. In case there is one can I have a link to that doc. Sorry I am new to Tomacat. regards Rajesh T There are some *old* documents and diagrams here http://cvs.apache.org/viewcvs/jakarta-tomcat-4.0/catalina/docs/dev/ -Janek __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4 Ajp13Connector.java Ajp13Processor.java
costin 02/02/06 16:44:40 Modified:jk/java/org/apache/ajp/tomcat4 Ajp13Connector.java Ajp13Processor.java Log: Added the 'secret' attribute to Ajp13Connector. If not set, nothing changes in the request processing. If set - tomcat will require a password on incoming connections ( i.e. a secret to be set in the ajp worker ). This is of course a new/experimental feature, not documented, etc - use on your own risk ( I'm still testing it ) ( I'll check in the 3.3 version later, I hope it'll make it in 3.3.1 ) Revision ChangesPath 1.12 +13 -4 jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Connector.java Index: Ajp13Connector.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Connector.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Ajp13Connector.java 10 Jan 2002 02:53:40 - 1.11 +++ Ajp13Connector.java 7 Feb 2002 00:44:40 - 1.12 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Connector.java,v 1.11 2002/01/10 02:53:40 seguin Exp $ - * $Revision: 1.11 $ - * $Date: 2002/01/10 02:53:40 $ + * $Header: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Connector.java,v 1.12 2002/02/07 00:44:40 costin Exp $ + * $Revision: 1.12 $ + * $Date: 2002/02/07 00:44:40 $ * * * @@ -93,7 +93,7 @@ * Implementation of an Ajp13 connector. * * @author Kevin Seguin - * @version $Revision: 1.11 $ $Date: 2002/01/10 02:53:40 $ + * @version $Revision: 1.12 $ $Date: 2002/02/07 00:44:40 $ */ @@ -271,6 +271,7 @@ */ private Service service = null; +private String secret = null; // - Properties @@ -296,6 +297,14 @@ } +public void setSecret( String s ) { +secret=s; +} + +public String getSecret() { +return secret; +} + /** * Return the accept count for this Connector. 1.7 +23 -4 jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Processor.java Index: Ajp13Processor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Processor.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Ajp13Processor.java 10 Jan 2002 03:03:59 - 1.6 +++ Ajp13Processor.java 7 Feb 2002 00:44:40 - 1.7 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Processor.java,v 1.6 2002/01/10 03:03:59 seguin Exp $ - * $Revision: 1.6 $ - * $Date: 2002/01/10 03:03:59 $ + * $Header: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Processor.java,v 1.7 2002/02/07 00:44:40 costin Exp $ + * $Revision: 1.7 $ + * $Date: 2002/02/07 00:44:40 $ * * * @@ -102,7 +102,7 @@ /** * @author Kevin Seguin - * @version $Revision: 1.6 $ $Date: 2002/01/10 03:03:59 $ + * @version $Revision: 1.7 $ $Date: 2002/02/07 00:44:40 $ */ final class Ajp13Processor @@ -360,6 +360,10 @@ } boolean moreRequests = true; +String expectedSecret=connector.getSecret(); + +boolean needAuth= ( expectedSecret != null ); + while (moreRequests !stopped.value()) { int status = 0; @@ -369,6 +373,21 @@ logger.log(process: ajp13.receiveNextRequest, e); } +if( needAuth ) { +String connSecret=ajp13.getSecret(); +if( connSecret == null ) { +logger.log( Connection without password, + +tomcat is configured to require one ); +break; +} +if( ! connSecret.equals(expectedSecret) ) { +logger.log( Connection with wrong password ); +break; +} + +needAuth=false; +} + if (stopped.value()) { if (debug 0) { logger.log(process: received request, but we're stopped); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4 Ajp13Connector.java Ajp13Processor.java
Any idea how soon? Larry -Original Message- From: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wed 2/6/2002 7:44 PM To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Cc: Subject: cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4 Ajp13Connector.java Ajp13Processor.java costin 02/02/06 16:44:40 Modified:jk/java/org/apache/ajp/tomcat4 Ajp13Connector.java Ajp13Processor.java Log: Added the 'secret' attribute to Ajp13Connector. If not set, nothing changes in the request processing. If set - tomcat will require a password on incoming connections ( i.e. a secret to be set in the ajp worker ). This is of course a new/experimental feature, not documented, etc - use on your own risk ( I'm still testing it ) ( I'll check in the 3.3 version later, I hope it'll make it in 3.3.1 ) msg21451/bin0.bin Description: application/ms-tnef -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: DO NOT REPLY [Bug 6267] - RequestDispatcher breaks on URLs with anchors
Actually, Larry is right. However, what is being asked for is rather silly. Personally, I'd go for INVALID since section 8.1 (of the 2.3 spec) only talks about paths, not URIs. Yes, I missed a key word in the comments ;-) You're supposed to use a path relative to the servlet context, so I agree with the resolution you suggest. Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin ConnectorForm.java
manveen 02/02/06 18:20:37 Modified:webapps/admin/WEB-INF/classes/org/apache/webapp/admin ConnectorForm.java Log: Range for accept Count changed to 0,128. Revision ChangesPath 1.4 +5 -5 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ConnectorForm.java Index: ConnectorForm.java === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ConnectorForm.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ConnectorForm.java5 Feb 2002 03:23:46 - 1.3 +++ ConnectorForm.java7 Feb 2002 02:20:37 - 1.4 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ConnectorForm.java,v 1.3 2002/02/05 03:23:46 manveen Exp $ - * $Revision: 1.3 $ - * $Date: 2002/02/05 03:23:46 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ConnectorForm.java,v 1.4 2002/02/07 02:20:37 manveen Exp $ + * $Revision: 1.4 $ + * $Date: 2002/02/07 02:20:37 $ * * * @@ -74,7 +74,7 @@ * Form bean for the connector page. * * @author Manveen Kaur - * @version $Revision: 1.3 $ $Date: 2002/02/05 03:23:46 $ + * @version $Revision: 1.4 $ $Date: 2002/02/07 02:20:37 $ */ public final class ConnectorForm extends ActionForm { @@ -544,7 +544,7 @@ if (submit != null) { /* general */ -numberCheck(acceptCountText, acceptCountText, true, 1, 128); +numberCheck(acceptCountText, acceptCountText, true, 0, 128); numberCheck(connTimeOutText, connTimeOutText, true, 0, 6); numberCheck(bufferSizeText, bufferSizeText, true, 1, 8192); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin ApplicationResources_en.properties ApplicationResources_es.properties
manveen 02/02/06 18:22:58 Modified:webapps/admin/WEB-INF/classes/org/apache/webapp/admin ApplicationResources_en.properties ApplicationResources_es.properties Log: Updated error message for accept count for connector screen. Added properties for Realm screens. Revision ChangesPath 1.20 +13 -1 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties Index: ApplicationResources_en.properties === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- ApplicationResources_en.properties4 Feb 2002 17:59:19 - 1.19 +++ ApplicationResources_en.properties7 Feb 2002 02:22:58 - 1.20 @@ -33,7 +33,7 @@ error.engineName.required=liEngine name is required/li error.acceptCountText.required=liAccept count required/li error.acceptCountText.format=liAccept count not a valid integer!/li -error.acceptCountText.range=liAccept count seems out of range. Valid range is 1-218. /li +error.acceptCountText.range=liAccept count seems out of range. Valid range is 0-128. /li error.connTimeOutText.required=liConnection time out required/li error.connTimeOutText.format=liConnection time out not a valid integer!/li error.connTimeOutText.range=liConnection time out seems out of range. Valid range is 0-6. /li @@ -167,3 +167,15 @@ actions.delete=Delete error.defaultHost.required=liDefault Hostname required/li error.serviceName.required=liService el nombre required/li +actions.thisrealm.delete=Delete this User Realm +realm.driver=Database Driver +realm.passwd=Database Password +realm.url=Database URL +realm.userName=Database User Name +realm.digest=Digest Algorithm +realm.passwordCol=Password Column +realm.roleNameCol=Role Name Column +realm.userRoleTable=User Role Table +realm.userTable=User Table +realm.resource=Resource Name +error.resource.required=liResource Name is required/li 1.21 +15 -3 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties Index: ApplicationResources_es.properties === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- ApplicationResources_es.properties4 Feb 2002 17:59:19 - 1.20 +++ ApplicationResources_es.properties7 Feb 2002 02:22:58 - 1.21 @@ -33,7 +33,7 @@ error.engineName.required=liSe requiere el nombre del motor/li error.acceptCountText.required=liValide la cuenta requerida/li error.acceptCountText.format=liValide la cuenta no un numero entero valido!/li -error.acceptCountText.range=liValide la cuenta se parece fuera de rango. El rango válido es 1-218. /li +error.acceptCountText.range=liValide la cuenta se parece fuera de rango. El rango valido es 0-128. /li error.connTimeOutText.required=liTiempo de conexion fuera de requerido/li error.connTimeOutText.format=liTiempo de conexion fuera no de un numero entero valido! /li error.connTimeOutText.range=liEl tiempo de conexion hacia fuera se parece fuera de rango. El rango válido es 0-6. /li @@ -165,5 +165,17 @@ error.get.attributes=liError que extrae caracteristicas de la informacion./li error.set.attributes=liError que fija caracteristicas de la informacion./li actions.delete=Delete -error.defaultHost.required=liDefault Hostname required/li -error.serviceName.required=liService name required/li +error.defaultHost.required=liDefault Hostname requerido/li +error.serviceName.required=liService name requerido/li +actions.thisrealm.delete=Suprima Este User Realm +realm.driver=Database Driver +realm.passwd=Database Password +realm.url=Database URL +realm.userName=Database User Name +realm.digest=Digest Algorithm +realm.passwordCol=Password Column +realm.roleNameCol=Role Name Column +realm.userRoleTable=Vector Del Papel Del Utilizador +realm.userTable=Vector De Utilizador +realm.resource=Nombre Del Recurso +error.resource.required=liSe requiere el nombre del recurso/li -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat/src/native/mod_jk/iis jk_isapi_plugin.c
larryi 02/02/06 19:55:37 Modified:src/native/mod_jk/iis jk_isapi_plugin.c Log: Update to use the official JK version string Revision ChangesPath 1.13 +2 -2 jakarta-tomcat/src/native/mod_jk/iis/jk_isapi_plugin.c Index: jk_isapi_plugin.c === RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/iis/jk_isapi_plugin.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- jk_isapi_plugin.c 13 Jan 2002 01:50:39 - 1.12 +++ jk_isapi_plugin.c 7 Feb 2002 03:55:37 - 1.13 @@ -57,7 +57,7 @@ * Description: ISAPI plugin for IIS/PWS * * Author: Gal Shachor [EMAIL PROTECTED] * * Author: Ignacio J. Ortega [EMAIL PROTECTED] * - * Version: $Revision: 1.12 $ * + * Version: $Revision: 1.13 $ * ***/ // This define is needed to include wincrypt,h, needed to get client certificates @@ -76,7 +76,7 @@ #include jk_ajp12_worker.h #include jk_uri_worker_map.h -#define VERSION_STRING Jakarta/ISAPI/1.0b1 +#define VERSION_STRING Jakarta/ISAPI/ JK_VERSTRING /* * We use special two headers to pass values from the filter to the -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml
larryi 02/02/06 20:01:07 Modified:src/tests/webpages/WEB-INF test-tomcat.xml Log: Fix tests to pass with forwardAll both true and false with Apache, IIS and Netscape (4.1). Added a test to ensure + is converted to space in query string. Revision ChangesPath 1.51 +39 -32jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml Index: test-tomcat.xml === RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- test-tomcat.xml 13 Jan 2002 03:01:26 - 1.50 +++ test-tomcat.xml 7 Feb 2002 04:01:07 - 1.51 @@ -16,7 +16,7 @@ early tests. -- - property name=revision value=$Revision: 1.50 $ / + property name=revision value=$Revision: 1.51 $ / property name=host value=127.0.0.1 / property name=port value=8080 / property name=colonPort value=:${port} / @@ -186,6 +186,12 @@ httpStatusMatch match=200 / responseMatch match=lt;trgt;lt;tdgt;Path Infolt;/tdgt;lt;tdgt;/path?infolt;/tdgt;lt;/trgt; / /httpClient + httpClient + commentTest '+' in query string is decoded./comment + httpRequest path=/test/servlet/RequestDump?param=more+text / + httpStatusMatch match=200 / + responseMatch match=lt;trgt;lt;tdgt;paramlt;/tdgt;lt;tdgt;lt;spangt;more textlt;/spangt; lt;/tdgt;lt;/trgt; / + /httpClient /target target name=params depends=init @@ -1253,12 +1259,6 @@ httpStatusMatch match=200/ responseMatch match=getRequestURI: /test/jsp/ShowPathInfo.jsp/ /httpClient - httpClient - httpRequest path=/test/jsp/HelloWorld%2Ejsp - method=GET / - httpStatusMatch match=200/ - goldenMatch file=${gdir}/HelloWorld.txt / - /httpClient /target target name=security_chk depends=init,security_chk_url @@ -1272,6 +1272,13 @@ returnCode=${http.protocol} 40 / + httpClient + httpRequest path=/test/jsp/HelloWorld%2Ejsp + method=GET / + httpStatusMatch match=${http.protocol} 40 if=tomcat.server / + httpStatusMatch match=${http.protocol} 200 unless=tomcat.server / + /httpClient + gtest description=This URL should return 403 Forbidden request=GET /test/jsp/HelloWorld.jsp%252E HTTP/1.0 returnCode=${http.protocol} 40 @@ -1364,79 +1371,79 @@ / /target - !-- Ensure use of Windows DOS devices in JSP name return 404 -- + !-- Ensure use of Windows DOS devices in JSP name return 40? -- target name=dos_devices gtest request=GET /test/con.jsp HTTP/1.0 - returnCode=${http.protocol} 404 / + returnCode=${http.protocol} 40 / gtest request=GET /test/aux.jsp HTTP/1.0 - returnCode=${http.protocol} 404 / + returnCode=${http.protocol} 40 / gtest request=GET /test/nul.jsp HTTP/1.0 - returnCode=${http.protocol} 404 / + returnCode=${http.protocol} 40 / gtest request=GET /test/NUL.jsp HTTP/1.0 - returnCode=${http.protocol} 404 / + returnCode=${http.protocol} 40 / gtest request=GET /test/prn.jsp HTTP/1.0 - returnCode=${http.protocol} 404 / + returnCode=${http.protocol} 40 / gtest request=GET /test/clock$$.jsp HTTP/1.0 - returnCode=${http.protocol} 404 / + returnCode=${http.protocol} 40 / gtest request=GET /test/com1.jsp HTTP/1.0 - returnCode=${http.protocol} 404 / + returnCode=${http.protocol} 40 / gtest request=GET /test/com2.jsp HTTP/1.0 - returnCode=${http.protocol} 404 / + returnCode=${http.protocol} 40 / gtest request=GET /test/com3.jsp HTTP/1.0 - returnCode=${http.protocol} 404 / + returnCode=${http.protocol} 40 / gtest request=GET /test/com4.jsp HTTP/1.0 - returnCode=${http.protocol} 404 / + returnCode=${http.protocol} 40 / gtest request=GET /test/com5.jsp HTTP/1.0 - returnCode=${http.protocol} 404 / + returnCode=${http.protocol} 40 / gtest request=GET /test/com6.jsp HTTP/1.0 - returnCode=${http.protocol} 404 / + returnCode=${http.protocol} 40 / gtest request=GET /test/com7.jsp HTTP/1.0 - returnCode=${http.protocol} 404 / + returnCode=${http.protocol} 40 / gtest request=GET /test/com8.jsp HTTP/1.0 -
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/server Ajp13.java
costin 02/02/06 21:05:54 Modified:src/share/org/apache/tomcat/modules/server Ajp13.java Log: Added the password decoding for ajp13. Revision ChangesPath 1.32 +21 -2 jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13.java Index: Ajp13.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- Ajp13.java10 Oct 2001 01:52:44 - 1.31 +++ Ajp13.java7 Feb 2002 05:05:54 - 1.32 @@ -146,6 +146,7 @@ public static final byte SC_A_SSL_CERT = 7; public static final byte SC_A_SSL_CIPHER= 8; public static final byte SC_A_SSL_SESSION = 9; +public static final byte SC_A_SECRET = 12; // Used for attributes which are not in the list above public static final byte SC_A_REQ_ATTRIBUTE = 10; @@ -218,7 +219,8 @@ int pos; // Current read position within that buffer boolean end_of_stream; // true if we've received an empty packet - +String secret=null; + // True to ignore HTTP server auth private boolean tomcatAuthentication=true; @@ -254,6 +256,10 @@ pos = 0; } +public String getSecret() { +return secret; +} + /** * Read a new packet from the web server and decode it. If it's a * forwarded request, store its properties in the passed-in Request @@ -292,6 +298,10 @@ return decodeRequest(req, hBuf); case JK_AJP13_SHUTDOWN: +if( hBuf.getLen() 3 ) { +// we have a secret +secret=hBuf.getString(); +} return -2; } return 200; // XXX This is actually an error condition @@ -410,6 +420,12 @@ } break; +case SC_A_SECRET : +String s=msg.getString(); +if( s!=null ) +secret=s; +break; + case SC_A_SSL_CIPHER : isSSL = true; req.setAttribute(javax.servlet.request.cipher_suite, @@ -428,7 +444,10 @@ break; default: - return 500; // Error +// Ignore. Assume a single-string value - we shouldn't +// allow anything else. +msg.getString(); +break; } } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/server Ajp13Interceptor.java
costin 02/02/06 21:07:36 Modified:src/share/org/apache/tomcat/modules/server Ajp13Interceptor.java Log: Added the logic to check for the password on ajp13 connections. Also cutpaste the logic to generate the 'ajp13.id' if useSecret is set ( with a random generated password and the connection info ). If a secret is set, shutdown via ajp13 is enabled automatically. All normal code is running as before if no secret is set. Revision ChangesPath 1.18 +110 -6 jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13Interceptor.java Index: Ajp13Interceptor.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13Interceptor.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- Ajp13Interceptor.java 4 Oct 2001 20:27:47 - 1.17 +++ Ajp13Interceptor.java 7 Feb 2002 05:07:36 - 1.18 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13Interceptor.java,v 1.17 2001/10/04 20:27:47 costin Exp $ - * $Revision: 1.17 $ - * $Date: 2001/10/04 20:27:47 $ + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13Interceptor.java,v 1.18 2002/02/07 05:07:36 costin Exp $ + * $Revision: 1.18 $ + * $Date: 2002/02/07 05:07:36 $ * * * @@ -70,6 +70,7 @@ import org.apache.tomcat.util.net.*; import org.apache.tomcat.util.*; import org.apache.tomcat.util.log.*; +import org.apache.tomcat.util.io.FileUtil; /* Frozen, bug fixes only: all active development goes in jakarta-tomcat-connectors/jk/org/apache/ajp/Ajp14* @@ -85,6 +86,8 @@ private boolean decoded=true; private int decodedNote; +private String secret; +private File ajpidFile; public Ajp13Interceptor() { @@ -109,6 +112,36 @@ shutDownEnable=b; } +/** Enable the use of a secret. The secret will be + * randomly generated. mod_jk must read the secret to + * communicate with tomcat. + * + * Note that we don't use the secret only for shutdown, but + * for normal request processing. A 'bad' request may forge + * auth, etc. + */ +public void setUseSecret(boolean b ) { + secret=Double.toString(Math.random()); +} + +/** Set the 'secret'. If this is set, all sensitive operations + * will be disabled unless the request includes a password. + * + * This requires a recent version of mod_jk and the + *worker.NAME.secret property in workers.properties. + */ +public void setSecret( String s ) { +secret=s; +shutDownEnable=true; +} + +/** Specify ajpid file used when shutting down tomcat + */ +public void setAjpidFile( String path ) { +ajpidFile=( path==null?null:new File(path)); +} + + public void setDecodedUri( boolean b ) { decoded=b; } @@ -125,6 +158,50 @@ req.decoded ); } +public void engineState(ContextManager cm, int state ) + throws TomcatException +{ + +if( state==ContextManager.STATE_START ) { +// the engine is now started, create the ajp12.id +// file that will allow us to stop the server and +// know that the server is started ok. +Ajp13Interceptor tcpCon=this; +int portInt=tcpCon.getPort(); +InetAddress address=tcpCon.getAddress(); +File sf=FileUtil.getConfigFile(ajpidFile, new File(cm.getHome()), + conf/ajp13.id); +Properties props=new Properties(); + +if( ajpidFile != null || debug 0) +log( Using stop file: +sf); +try { +// PrintWriter stopF=new PrintWriter +// (new FileWriter(sf)); +FileOutputStream stopF=new FileOutputStream( sf ); +props.put( port, Integer.toString( portInt )); +// stopF.println( portInt ); +if( address==null ) { +// stopF.println( ); +} else { +//stopF.println( address.getHostAddress() ); +props.put( address, address.getHostAddress() ); +} +if( secret !=null ) { +//stopF.println( secret ); +props.put( secret, secret ); +} else { +// stopF.println(); +} +//
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup StopTomcat.java
costin 02/02/06 21:09:36 Modified:src/share/org/apache/tomcat/startup StopTomcat.java Log: Added logic to send the shutdown command using ajp13. That means ajp12 is no longer needed if the password is enabled on ajp13. The ajp13.id is cleaner ( i.e. a properties file ) - it can be read from mod_jk as well ( but that's for a future version ), to eliminate duplicated config. Revision ChangesPath 1.14 +93 -19 jakarta-tomcat/src/share/org/apache/tomcat/startup/StopTomcat.java Index: StopTomcat.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/startup/StopTomcat.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- StopTomcat.java 16 Oct 2001 21:03:37 - 1.13 +++ StopTomcat.java 7 Feb 2002 05:09:36 - 1.14 @@ -86,6 +86,7 @@ String secretFile=null; String args[]; boolean help=false; +boolean isAjp13=false; public StopTomcat() { @@ -154,6 +155,10 @@ help = true; } +public void setAjp13( boolean b ) { +isAjp13=b; +} + public void setArgs( String args[] ) { this.args=args; } @@ -187,24 +192,52 @@ // read TOMCAT_HOME/conf/ajp12.id unless command line params // specify a port/host/secret try { - if( secretFile==null ) - secretFile=tchome + /conf/ajp12.id; - BufferedReader rd=new BufferedReader - ( new FileReader(secretFile)); - String line=rd.readLine(); - - if( port 0 ) { - try { - port=Integer.parseInt( line ); - } catch(NumberFormatException ex ) { - ex.printStackTrace(); - } - } - - line=rd.readLine(); - if( host==null ) host=line; - line=rd.readLine(); - if( secret==null ) secret=line; + if( secretFile==null ) { + secretFile=tchome + /conf/ajp13.id; +File f=new File( secretFile ); +// if ajp13.id exists, use it +if( f.exists() ) { +isAjp13=true; +} else { +secretFile=tchome + /conf/ajp12.id; +} +} + + if( isAjp13 ) { +Properties props=new Properties(); +props.load( new FileInputStream( secretFile )); + +String line=props.getProperty( port ); +if( port 0 ) { +try { +port=Integer.parseInt( line ); +} catch(NumberFormatException ex ) { +ex.printStackTrace(); +} +} + +line=props.getProperty( address ); +if( host==null ) host=line; +line=props.getProperty( secret ); +if( secret==null ) secret=line; +} else { +BufferedReader rd=new BufferedReader +( new FileReader(secretFile)); +String line=rd.readLine(); + +if( port 0 ) { +try { +port=Integer.parseInt( line ); +} catch(NumberFormatException ex ) { +ex.printStackTrace(); +} +} + +line=rd.readLine(); +if( host==null ) host=line; +line=rd.readLine(); +if( secret==null ) secret=line; +} } catch( IOException ex ) { //ex.printStackTrace(); System.out.println(Can't read + secretFile); @@ -258,7 +291,10 @@ address = InetAddress.getLocalHost(); Socket socket = new Socket(address, portInt); OutputStream os=socket.getOutputStream(); - sendAjp12Stop( os, secret ); +if( isAjp13 ) +sendAjp13Stop( os, secret ); +else +sendAjp12Stop( os, secret ); // Setting soLinger to 0 will help make sure the connection is // closed on NetWare. If the other side closes the connection @@ -299,6 +335,32 @@ } } +/** Small AJP13 client util + */ +public void sendAjp13Stop( OutputStream os, String secret ) + throws IOException +{ + byte stopMessage[]=new byte[5]; + stopMessage[0]=(byte)0x12; + stopMessage[1]=(byte)0x34; +int len=secret.length() + 4; // 1==shutdown cmd, 2==string len, 1=\0 +stopMessage[2]= (byte) ( len/256 ); +
RE: cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4 Ajp13Connector.java Ajp13Processor.java
On Wed, 6 Feb 2002, Larry Isaacs wrote: Any idea how soon? Done. I hope it doesn't delay any plans, the code shouldn't affect any previous behavior. Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Filters and HttpServletResponse.close();
On Wed, 6 Feb 2002, Glen Nakamura wrote: Date: Wed, 6 Feb 2002 18:59:13 -1000 From: Glen Nakamura [EMAIL PROTECTED] Reply-To: Tomcat Developers List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Filters and HttpServletResponse.close(); Aloha, When does the HttpServletResponse object get closed if the servlet doGet() method doesn't call HttpServletResponse.close() explicitly? For example, suppose a servlet filter creates a HttpServletResponseWrapper to wrap the initial HttpServletResponse and passes on this new response object down the doFilter() chain. The servlet doGet() method eventually gets called, but doesn't explicitly call close() of the wrapped response object. After tomcat returns from the container's invoke() method, it calls finishResponse() which is supposed to flush and close the response object, but isn't this the original response object? What about the wrapped response object created by the filter? It appears it never gets closed and is not flushed properly. I think this explains why I'm not getting any output from my filter when doGet() doesn't explicitly call HttpServletResponse.close(). Did I miss something? As you noted, Tomcat calls finishResponse() after the servlet returns. However, this is called only on the *original* response that Tomcat provided to the servlet -- not to any wrappers that your application has created. It is your application's responsibility to ensure that anything it has buffered in a response wrapper is flushed to the real response prior to your filter returning from its doFilter() method. - Glen Nakamura Craig McClanahan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm SetUpUserDBRealmAction.java UserDBRealmAction.java UserDBRealmForm.java
manveen 02/02/06 21:06:53 Modified:webapps/admin/WEB-INF struts-config.xml webapps/admin/WEB-INF/classes/org/apache/webapp/admin ApplicationResources_en.properties ApplicationResources_es.properties TomcatTreeBuilder.java Added: webapps/admin userDBRealm.jsp webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm SetUpUserDBRealmAction.java UserDBRealmAction.java UserDBRealmForm.java Log: Realms visible from the tree, (added to TomcatTreeBuilder). Added UserDatabase Realm screen and functionality. Revision ChangesPath 1.1 jakarta-tomcat-4.0/webapps/admin/userDBRealm.jsp Index: userDBRealm.jsp === !-- Standard Struts Entries -- %@ page language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/controls.tld prefix=controls % html:html locale=true %@ include file=header.jsp % !-- Body -- body bgcolor=white !--Form -- html:errors/ html:form method=POST action=/UserDBRealm table width=100% border=0 cellspacing=0 cellpadding=0 tr bgcolor=7171A5 td width=81% html:hidden property=realmName/ html:hidden property=realmType/ div class=page-title-text align=left bean:write name=userdbRealmForm property=nodeLabel scope=session/ /div /td td width=19% div align=right controls:actions controls:action selected=true bean:message key=actions.available.actions/ /controls:action controls:action - /controls:action !-- will add the urls later once those screens get implemented -- controls:action url= bean:message key=actions.thisrealm.delete/ /controls:action /controls:actions /div /td /tr /table %@ include file=buttons.jsp % br table class=back-table border=0 cellspacing=0 cellpadding=0 width=100% tr td controls:table tableStyle=front-table lineStyle=line-row controls:row header=true labelStyle=table-header-text dataStyle=table-header-text controls:labelbean:message key=service.property//controls:label controls:databean:message key=service.value//controls:data /controls:row controls:row labelStyle=table-label-text dataStyle=table-normal-text controls:labelbean:message key=connector.type/:/controls:label controls:data bean:write name=userdbRealmForm property=realmType scope=session/ /controls:data /controls:row controls:row labelStyle=table-label-text dataStyle=table-normal-text controls:labelbean:message key=server.debuglevel/:/controls:label controls:data html:select property=debugLvl bean:define id=debugLvlVals name=userdbRealmForm property=debugLvlVals/ html:options collection=debugLvlVals property=value labelProperty=label/ /html:select /controls:data /controls:row controls:row labelStyle=table-label-text dataStyle=table-normal-text controls:labelbean:message key=realm.resource/:/controls:label controls:data html:text property=resource size=25 maxlength=25/ /controls:data /controls:row /controls:table /td /tr /table %@ include file=buttons.jsp % br /html:form pnbsp;/p /body /html:html 1.23 +40 -0 jakarta-tomcat-4.0/webapps/admin/WEB-INF/struts-config.xml Index: struts-config.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/struts-config.xml,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- struts-config.xml 4 Feb 2002 17:59:19 - 1.22 +++ struts-config.xml 7 Feb 2002 05:06:52 - 1.23 @@ -63,6 +63,14 @@ form-bean name=userForm type=org.apache.webapp.admin.UserForm/ +!-- JDBC Realm form bean -- +form-bean name=realmForm +type=org.apache.webapp.admin.realm.JDBCRealmForm/ + + !-- UserDB Realm form bean -- +form-bean name=userdbRealmForm +type=org.apache.webapp.admin.realm.UserDBRealmForm/ + /form-beans @@ -142,6 +150,14 @@ path=/user.jsp
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf ByteChunk.java CharChunk.java
keith 02/02/06 21:37:35 Modified:util/java/org/apache/tomcat/util/buf ByteChunk.java CharChunk.java Log: indexOf should return an index relative to the internal starting point of the string rather than the beginning of the array. Ported over from main j-t repository. Revision ChangesPath 1.6 +2 -1 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/ByteChunk.java Index: ByteChunk.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/ByteChunk.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ByteChunk.java31 Dec 2001 18:20:04 - 1.5 +++ ByteChunk.java7 Feb 2002 05:37:35 - 1.6 @@ -626,7 +626,8 @@ * @param s the string */ public int indexOf(char c, int starting) { - return indexOf( buff, start+starting, end, c); + int ret = indexOf( buff, start+starting, end, c); + return (ret = start) ? ret - start : -1; } public static int indexOf( byte bytes[], int off, int end, char qq ) 1.3 +2 -1 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/CharChunk.java Index: CharChunk.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/CharChunk.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CharChunk.java29 May 2001 06:22:53 - 1.2 +++ CharChunk.java7 Feb 2002 05:37:35 - 1.3 @@ -597,7 +597,8 @@ * @param s the string */ public int indexOf(char c, int starting) { - return indexOf( buff, start+starting, end, c ); + int ret = indexOf( buff, start+starting, end, c ); + return (ret = start) ? ret - start : -1; } public static int indexOf( char chars[], int off, int cend, char qq ) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
servlet-path, path-info and Filters
Does anyone here know what the official correct handling of ServletRequest.getServletPath() and ServletRequest.getPathInfo() should be? More specifically, if I specify a filter with an url-pattern of /files/* and I make a request to /context/files/foo.jpg, what should getServletPath() and getPathInfo() return? I've observed some differing behavior between Tomcat 4.0.1 and Jetty in this regard and the spec doesn't explicitly clear up the issue between the two. Thanks, russ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6299] New: - SSI problem with multiple include statements in one file
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6299. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6299 SSI problem with multiple include statements in one file Summary: SSI problem with multiple include statements in one file Product: Tomcat 4 Version: 4.0.1 Final Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi, I have successfully mapped the ssi servlet to the *.xml file extension. For example, the following thing does not work properly: File Default.xml ?xml version=1.0? root !--#include file=Top.xml-- !--#include file=Bottom.xml-- /root File Top.xml child !-- Some data here -- /child File Bottom.xml === child !-- Some other data here -- /child In my case only the first include statement is resolved. The other is just ignored. No error message is printed in the logs. Hope, that it is my fault ;-) Regards Holger -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]