cvs commit: jakarta-tomcat-jasper/jasper2 build.properties.sample
costin 2002/08/08 12:45:35 Modified:jasper2 build.properties.sample Log: Update to match the new build dir. Uncomment jsptl, use the one in cvs. Revision ChangesPath 1.2 +4 -4 jakarta-tomcat-jasper/jasper2/build.properties.sample Index: build.properties.sample === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/build.properties.sample,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- build.properties.sample 16 Jul 2002 19:45:04 - 1.1 +++ build.properties.sample 8 Aug 2002 19:45:35 - 1.2 @@ -10,8 +10,8 @@ # - # - Pointer to Catalina - -catalina.home=../../jakarta-tomcat-4.0/build +catalina.home=../../jakarta-tomcat-5/build # - Pointer to JSP Standard Tag Library distribution - -standard.home=${base.path}/jakarta-taglibs/standard -jsp20el.jar=${standard.home}/../dist/jsp20el/jsp20el.jar +#standard.home=${base.path}/jakarta-taglibs/standard +#jsp20el.jar=${standard.home}/../dist/jsp20el/jsp20el.jar -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [5][PATCH]commons-logging built without log4j/LogKit
It's headed in the right direction, I think. But depending on CVS versions of other projects _by_default_ is a bit on the scary side. -Original Message- From: Bill Barker [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 08, 2002 1:32 AM To: Tomcat Developers List Subject: Re: [5][PATCH]commons-logging built without log4j/LogKit Now, like Costin, I'm starting to think that the 5.0 build is scary. - Original Message - From: Steve Downey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 07, 2002 10:00 PM Subject: [5][PATCH]commons-logging built without log4j/LogKit The commons-logging package built by 'ant download' doesn't have support for log4j or LogKit in it, unless the properties happen to be set outside of jakarta-tomcat-5. This patch adds downloads for the released versions of log4j and logkit. -- -- -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-servletapi-5 build.xml
patrickl2002/08/08 13:26:32 Modified:.build.xml Log: Patch to save javadocs between builds. Submitted by: [EMAIL PROTECTED] Revision ChangesPath 1.4 +1 -1 jakarta-servletapi-5/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-servletapi-5/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- build.xml 8 Aug 2002 19:04:48 - 1.3 +++ build.xml 8 Aug 2002 20:26:32 - 1.4 @@ -38,7 +38,7 @@ mkdir dir=${servletapi.lib}/ uptodate property=docs.uptodate targetfile=${servletapi.build}/docs/api/index.html -srcfiles dir=src/share includes=**/*.java / + srcfiles dir=src/share includes=**/*.java / /uptodate /target -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tocmat 5 failing watchdog on all tests
All, After the commits this morning to jakarta-tomcat-catalina, all of the watchdog tests are failing for Tomcat 5. I suspect that this has something to do with Jean-Francois' patch this morning but I cannot be sure as the problem is that Tomcat 5 is throwing exceptions when parsing TLD files. This was not happening when a did a clean checkout and build this morning. So, can those that made commits today take a look at this? Thanks, Patrick -- Patrick Luby Email: [EMAIL PROTECTED] Sun Microsystems Phone: 408-276-7471 901 San Antonio Road, USCA14-303 Palo Alto, CA 94303-4900 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[PATCH][tomcat-catalina] RealmBase/Authenticator re-factoring.
HI, I have completed the move of the authorization logic from the o.a.c.authenticator.AuthenticatorBase to the o.a.c.realm.RealmBase. The Realm class has now three new methods: /** * Return the SecurityConstraint configured to guard the request URI for * this request, or codenull/code if there is no such constraint. * * @param request Request we are processing */ public SecurityConstraint findSecurityConstraint(HttpRequest request, Context context); /** * Perform access control based on the specified authorization constraint. * Return codetrue/code if this constraint is satisfied and processing * should continue, or codefalse/code otherwise. * * @param request Request we are processing * @param response Response we are creating * @param constraint Security constraint we are enforcing * @param The Context to which client of this class is attached. * * @exception IOException if an input/output error occurs */ public boolean hasResourcePermission(HttpRequest request, HttpResponse response, SecurityConstraint constraint, Context context) throws IOException; /** * Enforce any user data constraint required by the security constraint * guarding this request URI. Return codetrue/code if this constraint * was not violated and processing should continue, or codefalse/code * if we have created a response already. * * @param request Request we are processing * @param response Response we are creating * @param constraint Security constraint being checked * * @exception IOException if an input/output error occurs */ public boolean hasUserDataPermission(HttpRequest request, HttpResponse response, SecurityConstraint constraint) throws IOException; Now, Realm can overload those methods an implement a different resource authorization mechanism. Actual Realm implementatin still work since they all extend RealmBase. Let me know if you see any issues. Can somebody apply this patch? Thanks, -- Jeanfrancois Index: Realm.java === RCS file: /home/cvspublic/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Realm.java,v retrieving revision 1.2 diff -u -r1.2 Realm.java --- Realm.java 7 Aug 2002 20:51:44 - 1.2 +++ Realm.java 8 Aug 2002 20:18:10 - @@ -64,7 +64,6 @@ package org.apache.catalina; - import java.beans.PropertyChangeListener; import java.io.IOException; import java.security.Principal; @@ -171,7 +170,14 @@ */ public Principal authenticate(X509Certificate certs[]); - +/** + * Return the SecurityConstraint configured to guard the request URI for + * this request, or codenull/code if there is no such constraint. + * + * @param request Request we are processing + */ +public SecurityConstraint findSecurityConstraint(HttpRequest request, + Context context); /** * Perform access control based on the specified authorization constraint. * Return codetrue/code if this constraint is satisfied and processing @@ -184,10 +190,10 @@ * * @exception IOException if an input/output error occurs */ -public boolean hasResourceAccess(HttpRequest request, - HttpResponse response, - SecurityConstraint constraint, - Context context) +public boolean hasResourcePermission(HttpRequest request, + HttpResponse response, + SecurityConstraint constraint, + Context context) throws IOException; @@ -201,7 +207,23 @@ */ public boolean hasRole(Principal principal, String role); - +/** + * Enforce any user data constraint required by the security constraint + * guarding this request URI. Return codetrue/code if this constraint + * was not violated and processing should continue, or codefalse/code + * if we have created a response already. + * + * @param request Request we are processing + * @param response Response we are creating + * @param constraint Security constraint being checked + * + * @exception IOException if an input/output error occurs + */ +public boolean hasUserDataPermission(HttpRequest request, + HttpResponse response, + SecurityConstraint constraint) +throws
cvs commit: jakarta-servletapi-5/src/share/javax/servlet/jsp/tagext DynamicAttributes.java JspFragment.java SimpleTag.java SimpleTagSupport.java AttributeNotSupportedException.java
kinman 2002/08/08 13:33:14 Modified:src/share/javax/servlet/jsp JspTagException.java PageContext.java src/share/javax/servlet/jsp/tagext DynamicAttributes.java JspFragment.java SimpleTag.java SimpleTagSupport.java Added: src/share/javax/servlet/jsp SkipPageException.java Removed: src/share/javax/servlet/jsp/tagext AttributeNotSupportedException.java Log: - JSP2.0 API updates Submitted by: Mark Roth Revision ChangesPath 1.2 +55 -4 jakarta-servletapi-5/src/share/javax/servlet/jsp/JspTagException.java Index: JspTagException.java === RCS file: /home/cvs/jakarta-servletapi-5/src/share/javax/servlet/jsp/JspTagException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- JspTagException.java 16 Jul 2002 16:38:41 - 1.1 +++ JspTagException.java 8 Aug 2002 20:33:14 - 1.2 @@ -63,16 +63,67 @@ public class JspTagException extends JspException { /** - * Constructor with a message. - */ + * Constructs a new JspTagException with the specified message. + * The message can be written to the server log and/or displayed + * for the user. + * + * @param msg a codeString/code specifying the text of + * the exception message + */ public JspTagException(String msg) { - super(msg); + super( msg ); } /** - * No message + * Constructs a new JspTagException with no message. */ public JspTagException() { super(); } + +/** + * Constructs a new JspTagException when the JSP Tag + * needs to throw an exception and include a message + * about the root cause exception that interfered with its + * normal operation, including a description message. + * + * + * @param messagea codeString/code containing + * the text of the exception message + * + * @param rootCause the codeThrowable/code exception + * that interfered with the JSP Tag's + * normal operation, making this JSP Tag + * exception necessary + * + */ +public JspTagException(String message, Throwable rootCause) { + super( message, rootCause ); +} + + +/** + * Constructs a new JSP Tag exception when the JSP Tag + * needs to throw an exception and include a message + * about the root cause exception that interfered with its + * normal operation. The exception's message is based on the localized + * message of the underlying exception. + * + * pThis method calls the codegetLocalizedMessage/code method + * on the codeThrowable/code exception to get a localized exception + * message. When subclassing codeJspTagException/code, + * this method can be overridden to create an exception message + * designed for a specific locale. + * + * @param rootCause the codeThrowable/code exception + * that interfered with the JSP Tag's + * normal operation, making the JSP Tag + * exception necessary + * + */ + +public JspTagException(Throwable rootCause) { + super( rootCause ); +} + } 1.2 +0 -3 jakarta-servletapi-5/src/share/javax/servlet/jsp/PageContext.java Index: PageContext.java === RCS file: /home/cvs/jakarta-servletapi-5/src/share/javax/servlet/jsp/PageContext.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- PageContext.java 16 Jul 2002 16:38:41 - 1.1 +++ PageContext.java 8 Aug 2002 20:33:14 - 1.2 @@ -113,9 +113,6 @@ * p * The following methods enable the Bmanagement of nested/B JspWriter streams to * implement Tag Extensions: codepushBody()/code and codepopBody()/code - * To facilitate Simple Tag Extensions, the codepushPageScope()/code, - * codepopPageScope()/code and codepeekPageScope()/code methods are - * added. * * pBMethods Intended for JSP authors/B * p 1.1 jakarta-servletapi-5/src/share/javax/servlet/jsp/SkipPageException.java Index: SkipPageException.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
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources messages.properties
kinman 2002/08/08 13:41:03 Modified:jasper2/src/share/org/apache/jasper/compiler Generator.java Parser.java TagFileProcessor.java Validator.java jasper2/src/share/org/apache/jasper/resources messages.properties Log: - Mod to use new JSP api - Implement isELEnabled attribute to page directive - Add other new (PD2) attributes to tag directive. Revision ChangesPath 1.64 +12 -14 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java Index: Generator.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v retrieving revision 1.63 retrieving revision 1.64 diff -u -r1.63 -r1.64 --- Generator.java8 Aug 2002 11:04:51 - 1.63 +++ Generator.java8 Aug 2002 20:41:02 - 1.64 @@ -859,7 +859,7 @@ public void visit(Node.ELExpression n) throws JasperException { n.setBeginJavaLine(out.getJavaLine()); -if ( true /*isELEnabled*/ ) { +if ( pageInfo.isELEnabled() ) { out.printil( out.write( + JspUtil.interpreterCall(this.isTagFile, @@ -1987,7 +1987,11 @@ out.print(tagHandlerVar); out.println(.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)); out.pushIndent(); - out.printil((methodNesting 0)? return true;: return;); + if (isTagFile) { + out.printil(throw new javax.servlet.jsp.SkipPageException();); + } else { + out.printil((methodNesting 0)? return true;: return;); + } out.popIndent(); // Synchronize AT_BEGIN and AT_END scripting variables @@ -2089,12 +2093,8 @@ isSimpleTagHandler = tmpIsSimpleTagHandler; } - out.printin(if (); - out.print(tagHandlerVar); - out.println(.doTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)); - out.pushIndent(); - out.printil((methodNesting 0)? return true;: return;); - out.popIndent(); + out.printin(tagHandlerVar); + out.println(.doTag();); // Synchronize AT_BEGIN and AT_END scripting variables syncScriptingVariables(n, VariableInfo.AT_BEGIN); @@ -2818,7 +2818,7 @@ if (tagInfo.hasDynamicAttributes()) generateSetDynamicAttribute(); - out.printil(public int doTag() throws javax.servlet.jsp.JspException {); + out.printil(public void doTag() throws javax.servlet.jsp.JspException {); out.pushIndent(); // Declare parameter map for fragment/body invocation out.printil(java.util.Map params = null;); @@ -2845,8 +2845,6 @@ out.printil(getJspContext().popPageScope();); out.popIndent(); out.printil(}); - out.println(); - out.printil(return EVAL_PAGE;); out.popIndent(); out.printil(}); out.popIndent(); 1.19 +3 -7 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java Index: Parser.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- Parser.java 1 Aug 2002 20:55:04 - 1.18 +++ Parser.java 8 Aug 2002 20:41:02 - 1.19 @@ -133,10 +133,6 @@ boolean isTagFile) throws JasperException { Parser parser = new Parser(pc, reader, isTagFile); - // Tag files takes only scriptless body. - if (isTagFile) - parser.scriptlessCount++; - Node.Root root = new Node.Root(null, reader.mark(), parent); while (reader.hasMoreInput()) { 1.11 +20 -8 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagFileProcessor.java Index: TagFileProcessor.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagFileProcessor.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- TagFileProcessor.java 6 Aug 2002 00:11:36 - 1.10 +++ TagFileProcessor.java 8 Aug 2002 20:41:03 - 1.11 @@ -95,7 +95,11 @@ new JspUtil.ValidAttribute(large-icon), new JspUtil.ValidAttribute(description), new JspUtil.ValidAttribute(example), -new JspUtil.ValidAttribute(pageEncoding) }; +new JspUtil.ValidAttribute(pageEncoding), +new JspUtil.ValidAttribute(language), +
RE: Here we go again - mod_webapp and mod_rewrite
Pier, I have a releated question - does it also mean that currently mod_webapp will not work with Apache 2 that uses worker mpm? thanks Julius Gawlas -Original Message- From: Pier Fumagalli [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 07, 2002 9:57 AM To: Tomcat Developers List Subject: Re: Here we go again - mod_webapp and mod_rewrite Brendan Benke [EMAIL PROTECTED] wrote: touche! so let me ask you this, what are some alternative connectors? mod_webapp seems like the most current and best idea. We're woring on mod_webapp for Apache 2.0, and that will work with windows as well, now that Aaron wrote the APR resourcelist, we're really close to completion. Pier -- 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-servletapi-5/src/share/javax/servlet/jsp JspContext.java
kinman 2002/08/08 14:16:23 Modified:src/share/javax/servlet/jsp JspContext.java Log: - Oops! Forgot this one. Revision ChangesPath 1.2 +0 -46 jakarta-servletapi-5/src/share/javax/servlet/jsp/JspContext.java Index: JspContext.java === RCS file: /home/cvs/jakarta-servletapi-5/src/share/javax/servlet/jsp/JspContext.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- JspContext.java 16 Jul 2002 16:38:41 - 1.1 +++ JspContext.java 8 Aug 2002 21:16:23 - 1.2 @@ -77,12 +77,6 @@ * scripting environment * /ul * - * pBMethods Intended for Container Generated Code/B - * p - * To facilitate Simple Tag Extensions, the codepushPageScope()/code, - * codepopPageScope()/code and codepeekPageScope()/code methods are - * added. - * * pBMethods Intended for JSP authors/B * p * The following methods provide Bconvenient access/B to implicit objects: @@ -226,46 +220,6 @@ abstract public JspWriter getOut(); -/** - * Pops the page scope from the stack. After calling this method, the - * PageScope will appear the same as it was before the last call to - * pushPageScope. - * - * @return A Map representing the state of the page scope just before - * it was popped. This object can be passed to pushPageScope to - * restore this state. The keys of the returned Map are Strings - * representing attribute names. The values are the values of - * those attributes. - * @throws java.util.EmptyStackException if this is the last page scope on the - * stack. - */ -public abstract java.util.Map popPageScope() -throws java.util.EmptyStackException; - -/** - * Pushes a page scope on the stack. The scopeState cannot be arbitrary. - * Only a page scope returned from popPageScope() or peekPageScope() may - * be passed in. - * - * @param scopeState If null, a new, empty, page scope is pushed. - * Otherwise, the state of the page scope is restored to the - * contents of the provided Map. - */ -public abstract void pushPageScope( java.util.Map scopeState ); - -/** - * Peeks at the top element of the page scope stack. This value is - * the current state of the page scope. Does not modify the state of - * the stack or copy any objects. - * - * @return A Map representing the state of the page scope currently - * at the top of the stack. This object can be passed to - * pushPageScope to restore this state. The keys of the returned - * Map are Strings representing attribute names. The values are - * the values of those attributes. - */ -public abstract java.util.Map peekPageScope(); - /** * Provides programmatic access to the ExpressionEvaluator. * The JSP Container must return a valid instance of an -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [VOTE] new commiters
[EMAIL PROTECTED] wrote: Well, we thank you - we'll have less work to do and more free time ( and the reverse will happen for you ) :-) Just remember that is frustrating if commiters don't review and commit contributions and patches in a timely manner :-) Now you are the commiters. And fix bugs ;-) Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PROPOSAL] Have Bootstrap and BootsrapService share startup/shutdowncode
Patrick Luby wrote: All, I have tested out some code in o.a.c.startup.Bootstrap.main() that finds and loads the JDK tools (e.g. javac), loads the JSSE jars in jsse.home, turns on the Java security manager, determines and catalina.home dynamically. These steps are currently done by the catalina.[sh|bat] scripts. My goal is to simplify the various Tomcat scripts to the point where all they do is invoke a class. In other words, I would like to move all of the construction of all sorts of optional system properties, etc. from the scripts into Tomcat's main() method. Originally, I had proposed using the commons-launcher to do this. However, commons-launcher is adds another layer on top of the existing o.a.c.startup.Bootstrap class and forks another JVM. This works, but is a bit heavyweight. I am willing to move the script code into main(). However, there is one problem: there are currently 2 sets of startup code. Current Bootstrap and BootstrapService both do a lot of the same steps to start Tomcat. Before I make any changes to Bootstrap, I would like to propose that we separate out the common methods in Bootstrap and BootstrapService (e.g. creating the classloaders, invoking Catalina.start(), etc.). My hope would be that that Bootstrap.main() could be simplified to do the following: - Set up the shutdown port - Invoke BootstrapService.start() - Invoke BootstrapService.stop() when the shutdown port receives a shutdown request I would need Remy's and Pier's help to separate out the BootstrapService methods so that they can compile without commons-daemons. I can them move Bootstrap to use these methods and move the script code into these methods so that both Bootstrap and BootstrapService share these features. Is anyone interested in pursuing this? If so, let me know. If not (I know everyone is busy), then I can leave things the way they are and repropose this sometime in the future. No, I'd rather do something according to the pre-proposal put forward by Costin that would be a refactoring of the whole startup and configuration code, rather than an evolution of the current code. I don't have much interest in trying to improve that code, as I think it's good enough (ie, it gets the job done). Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11572] New: - Bug with Http11Processor class
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=11572. 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=11572 Bug with Http11Processor class Summary: Bug with Http11Processor class Product: Tomcat 4 Version: 4.0.4 Beta 2 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Connector:Coyote HTTP/1.1 AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] This is an inconsistent problem I've encountered. When an invalid URL is sent to Tomcat, instead of a 404 page I get a blank page and the following stack trace in the catalina.out log: [WARN] Http11Processor - -Error decoding URI [WARN] Http11Processor - -Error decoding URI [WARN] Http11Processor - -Error decoding URI [WARN] Http11Processor - -Error decoding URI [WARN] Http11Processor - -Error decoding URI java.lang.ArrayIndexOutOfBoundsException at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalI nputBuffer.java:431) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:3 10) at org.apache.coyote.tomcat4.CoyoteProcessor.process(CoyoteProcessor.java: 791) at org.apache.coyote.tomcat4.CoyoteProcessor.run(CoyoteProcessor.java:870) at java.lang.Thread.run(Thread.java:484) [WARN] Http11Processor - -Error parsing HTTP request java.lang.ArrayIndexOutOfBou ndsException java.lang.ArrayIndexOutOfBoundsException at org.apache.coyote.http11.filters.ChunkedInputFilter.parseChunkHeader(Ch unkedInputFilter.java:290) at org.apache.coyote.http11.filters.ChunkedInputFilter.doRead(ChunkedInput Filter.java:162) at org.apache.coyote.http11.filters.ChunkedInputFilter.end(ChunkedInputFil ter.java:211) at org.apache.coyote.http11.InternalInputBuffer.endRequest(InternalInputBu ffer.java:397) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:3 44) at org.apache.coyote.tomcat4.CoyoteProcessor.process(CoyoteProcessor.java: 791) at org.apache.coyote.tomcat4.CoyoteProcessor.run(CoyoteProcessor.java:870) at java.lang.Thread.run(Thread.java:484) [ERROR] Http11Processor - -Error finishing request java.lang.ArrayIndexOutOfBound sException Upon inspection of the org.apache.coyote.http11.Http11Processor class and org.apache.coyote.http11.InternalInputBuffer class, it seems like the InternalInputBuffer class did not catch ArrayIndexOutOfBoundException in line 431. Thus, propagating the error back to the Http11Processor class line310. Also, line318 of Http11Processor class contradicts the comment right above it (one said 500, the other set status to 400). I was using the coyote connector in the server.xml of Tomcat. A URL that has caused this problem is something that contains a period('.'). Now my question is whether this behaviour is only found in the coyote conector. Or does the http connector share this code? Our application has to be shipped with the Tomcat4.0.4 release and later patches won't help. (I'd just like to know, not asking for a fix in 4.0.4) Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11307] - Deadlock in ClassLoader
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=11307. 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=11307 Deadlock in ClassLoader --- Additional Comments From [EMAIL PROTECTED] 2002-08-08 21:27 --- Sorry, but I need an explanation. The trace looks fine to me (thread 1 wants to lock the CL, while thread 2 waits on a ResourceEntry). If you understand what the problem is and you can explain it to me, maybe you could also take five minutes, and help everyone here, as: I really don't understand what the problem is, and, more importantly, I cannot reproduce this and never ran into this problem (so it does work for me). -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11572] - Bug with Http11Processor class
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=11572. 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=11572 Bug with Http11Processor class [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WORKSFORME Summary|Bug with Http11Processor|Bug with Http11Processor |class |class --- Additional Comments From [EMAIL PROTECTED] 2002-08-08 21:28 --- This likely doesn't exist anymore in more recent builds (try 4.1.8). -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11573] New: - Can't run or compile JSP's
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=11573. 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=11573 Can't run or compile JSP's Summary: Can't run or compile JSP's Product: Tomcat 4 Version: 4.0.4 Final Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Blocker Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I have been all over everywhere trying to find a solution to this, I have searched the user list, I have been through the bug database and I have learned that this is a chronic problem for many, many people and yet I have found no workable solution. I have a completely fresh install of Tomcat 4.0.4, my servlet.jar is up to date, I have set JAVA_HOME correctly ( I even explicitly set the path to my jdk\lib\tools.jar in the setclasspath.bat file. All to no avail. It will not run the example JSP's or any of mine, which ran on 3.x versions. Here is the error I get in the browser: Apache Tomcat/4.0.4 - HTTP Status 503 - Servlet jsp is currently unavailable type Status report message Servlet jsp is currently unavailable description The requested service (Servlet jsp is currently unavailable) is not currently available. From the log: 2002-08-08 17:22:51 StandardHost[localhost]: Installing web application at context path /webdav from URL file:C:\forte_jdk\forte4j\tomcat404\webapps\webdav 2002-08-08 17:22:51 WebappLoader[/webdav]: Deploying class repositories to work directory C:\forte_jdk\forte4j\tomcat404\work\Standalone\localhost\webdav 2002-08-08 17:22:51 StandardManager[/webdav]: Seeding random number generator class java.security.SecureRandom 2002-08-08 17:22:51 StandardManager[/webdav]: Seeding of random number generator has been completed 2002-08-08 17:22:51 ContextConfig[/webdav]: Added certificates - request attribute Valve 2002-08-08 17:22:51 StandardWrapper[/webdav:default]: Loading container servlet default 2002-08-08 17:22:51 default: init 2002-08-08 17:22:51 StandardWrapper[/webdav:invoker]: Loading container servlet invoker 2002-08-08 17:22:51 invoker: init 2002-08-08 17:22:51 StandardWrapper[/webdav:jsp]: Marking servlet jsp as unavailable 2002-08-08 17:22:51 StandardContext[/webdav]: Servlet /webdav threw load() exception javax.servlet.ServletException: Error instantiating servlet class org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet at org.apache.catalina.core.StandardWrapper.loadServlet (StandardWrapper.java:895) at org.apache.catalina.core.StandardWrapper.load (StandardWrapper.java:810) at org.apache.catalina.core.StandardContext.loadOnStartup (StandardContext.java:3279) at org.apache.catalina.core.StandardContext.start (StandardContext.java:3421) at org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java:785) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478) at org.apache.catalina.core.StandardHost.install(StandardHost.java:738) at org.apache.catalina.startup.HostConfig.deployApps (HostConfig.java:300) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389) at org.apache.catalina.startup.HostConfig.lifecycleEvent (HostConfig.java:232) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java:155) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) at org.apache.catalina.core.StandardHost.start(StandardHost.java:638) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start (StandardEngine.java:343) at org.apache.catalina.core.StandardService.start (StandardService.java:388) at org.apache.catalina.core.StandardServer.start (StandardServer.java:506) at org.apache.catalina.startup.Catalina.start(Catalina.java:781) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) - Root Cause - java.lang.NoClassDefFoundError: org/apache/jasper/JasperError at java.lang.Class.getDeclaredConstructors0(Native Method)
[5.0] [PATCH] I18N, CharsetMapper, DeploymentDescriptor
In the Servlet 2.4 spec section 5.4 on i18n, the deployment descriptor gets new stuff for mapping locale to character encoding. The spec says, [Servlet 2.4, Section 5.4] [...] The setLocale method also sets charset component in Content-Type with an encoding information which can be obtained from the locale-encoding-mapping element in the deployment descriptor, if present. For example, to map a locale to the specific encoding, the syntax of locale-encoding-mapping would be: locale-encoding-mapping-list locale-encoding-mapping localeja/locale encodingISO-2022-JP/encoding /locale-encoding-mapping /locale-encoding-mapping-list To implement this, I did this, 1. I added some lines to the digester to push the local and encoding info into the Context 2. I changed the Context to push the mapping into the CharsetMapper class 3. Changed the CharsetMapper class so it can accept new mappings 4. changed CoyoteResponse.setLocale() so it consults CharsetMapper and sets the mapped encoding What do people think? (I used some long method names on Context and CharsetMapper to make it clear that the information is coming from the Deployment Descriptor.) Can someone review and patch this? Cheers, -bob Index: coyote/src/java/org/apache/coyote/Response.java === RCS file: /home/cvspublic/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Response.java,v retrieving revision 1.12 diff -u -r1.12 Response.java --- coyote/src/java/org/apache/coyote/Response.java 1 Aug 2002 17:20:36 - 1.12 +++ coyote/src/java/org/apache/coyote/Response.java 8 Aug 2002 19:13:47 - @@ -455,8 +455,6 @@ if (isCommitted()) return; -characterEncoding = charset; - String type = this.contentType; int start = type.indexOf(charset=); if ( start != -1 ) { @@ -468,8 +466,11 @@ type = type.substring(0,start+8) +charset; this.contentType = type; - +} else { +type += charset= + charset; } +setContentType( type ); + } public String getCharacterEncoding() { Index: coyote/src/java/org/apache/coyote/tomcat5/CoyoteResponse.java === RCS file: /home/cvspublic/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteResponse.java,v retrieving revision 1.2 diff -u -r1.2 CoyoteResponse.java --- coyote/src/java/org/apache/coyote/tomcat5/CoyoteResponse.java 8 Aug 2002 04:08:41 - 1.2 +++ coyote/src/java/org/apache/coyote/tomcat5/CoyoteResponse.java 8 Aug 2002 19:13:49 - @@ -753,6 +753,12 @@ coyoteResponse.setLocale(locale); +CharsetMapper cm = context.getCharsetMapper(); +String charset = cm.getCharset( locale ); + +if ( charset != null ) +setCharacterEncoding( charset); + } Index: catalina/src/share/org/apache/catalina/Context.java === RCS file: /home/cvspublic/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Context.java,v retrieving revision 1.2 diff -u -r1.2 Context.java --- catalina/src/share/org/apache/catalina/Context.java 2 Aug 2002 01:37:42 - 1.2 +++ catalina/src/share/org/apache/catalina/Context.java 8 Aug 2002 21:22:46 - @@ -481,6 +481,15 @@ /** + * Add a Locale Encoding Mapping (see Sec 5.4 of Servlet spec 2.4) + * + * @param locale locale to map an encoding for + * @param encoding encoding to be used for a give locale + */ +public void addLocaleEncodingMappingParameter(String locale, String encoding); + + +/** * Add a local EJB resource reference for this web application. * * @param ejb New local EJB resource reference Index: catalina/src/share/org/apache/catalina/core/StandardContext.java === RCS file: /home/cvspublic/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v retrieving revision 1.2 diff -u -r1.2 StandardContext.java --- catalina/src/share/org/apache/catalina/core/StandardContext.java 2 Aug 2002 01:37:43 - 1.2 +++ catalina/src/share/org/apache/catalina/core/StandardContext.java 8 Aug 2002 21:22:53 - @@ -1508,6 +1508,17 @@ /** + * Add a Locale Encoding Mapping (see Sec 5.4 of Servlet spec 2.4) + * + * @param locale locale to map an encoding for + * @param encoding encoding to be used for a give locale + */ +public void addLocaleEncodingMappingParameter(String locale, String encoding){ +getCharsetMapper().addCharsetMappingFromDeploymentDescriptor(locale, encoding); +} + + +/** * Add a local EJB resource reference for this web application. * * @param ejb New EJB resource reference Index:
DO NOT REPLY [Bug 11307] - Deadlock in ClassLoader
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=11307. 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=11307 Deadlock in ClassLoader --- Additional Comments From [EMAIL PROTECTED] 2002-08-08 21:47 --- Sorry, I was a bit short in my last message... I was just dismayed that the bug was being marked as resolved despite the documentation to the contrary. Anyway, you're right, the Threads are trying to lock different objects. The problem is that each Thread has already locked what the other Thread now wants to lock. Looking at the stack traces, you'll see: Thread-4 at WebappClassLoader.java:1660 is trying to lock object 0x33b3b78 (a org.apache.catalina.loader.ResourceEntry) but task has already locked that object at WebappClassLoader.java:1661. Likewise, task at ClassLoader.java:530 wants to lock object 0x2d965c8 (a org.apache.catalina.loader.WebappClassLoader), but Thread-4 has already locked that object at ClassLoader.java:310. (Aside: I agree, threaded deadlocks are notoriously hard to reproduce. Generally I end up having to examine the stacks and audit the code to find out what went wrong. Given that I'm not familiar with the Catalina code, don't have an environment set up to work on it, and am desparately trying to meet a deadline at work, I just have to apologize profusely for not being able to help right now. But please let me know if I can explain anything else that would help you navigate the deadlock information.) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PROPOSAL] Have Bootstrap and BootsrapService share startup/shutdowncode
Remy, Remy Maucherat wrote: No, I'd rather do something according to the pre-proposal put forward by Costin that would be a refactoring of the whole startup and configuration code, rather than an evolution of the current code. I don't have much interest in trying to improve that code, as I think it's good enough (ie, it gets the job done). That makes sense. Trying to rework the startup stuff at the same time before Costin's pre-proposal is implemented would probably cause a lot more problems (or at least later rework) than waiting until after Costin's pre-proposl is implemented. Patrick -- Patrick Luby Email: [EMAIL PROTECTED] Sun Microsystems Phone: 408-276-7471 901 San Antonio Road, USCA14-303 Palo Alto, CA 94303-4900 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-servletapi-5/src/share/javax/servlet/jsp JspContext.java
patrickl2002/08/08 15:20:31 Modified:src/share/javax/servlet/jsp JspContext.java Log: Reverse previous commit as it breaks the jakarta-tomcat-jasper/jasper2 build. Revision ChangesPath 1.3 +46 -0 jakarta-servletapi-5/src/share/javax/servlet/jsp/JspContext.java Index: JspContext.java === RCS file: /home/cvs/jakarta-servletapi-5/src/share/javax/servlet/jsp/JspContext.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JspContext.java 8 Aug 2002 21:16:23 - 1.2 +++ JspContext.java 8 Aug 2002 22:20:31 - 1.3 @@ -77,6 +77,12 @@ * scripting environment * /ul * + * pBMethods Intended for Container Generated Code/B + * p + * To facilitate Simple Tag Extensions, the codepushPageScope()/code, + * codepopPageScope()/code and codepeekPageScope()/code methods are + * added. + * * pBMethods Intended for JSP authors/B * p * The following methods provide Bconvenient access/B to implicit objects: @@ -220,6 +226,46 @@ abstract public JspWriter getOut(); +/** + * Pops the page scope from the stack. After calling this method, the + * PageScope will appear the same as it was before the last call to + * pushPageScope. + * + * @return A Map representing the state of the page scope just before + * it was popped. This object can be passed to pushPageScope to + * restore this state. The keys of the returned Map are Strings + * representing attribute names. The values are the values of + * those attributes. + * @throws java.util.EmptyStackException if this is the last page scope on the + * stack. + */ +public abstract java.util.Map popPageScope() +throws java.util.EmptyStackException; + +/** + * Pushes a page scope on the stack. The scopeState cannot be arbitrary. + * Only a page scope returned from popPageScope() or peekPageScope() may + * be passed in. + * + * @param scopeState If null, a new, empty, page scope is pushed. + * Otherwise, the state of the page scope is restored to the + * contents of the provided Map. + */ +public abstract void pushPageScope( java.util.Map scopeState ); + +/** + * Peeks at the top element of the page scope stack. This value is + * the current state of the page scope. Does not modify the state of + * the stack or copy any objects. + * + * @return A Map representing the state of the page scope currently + * at the top of the stack. This object can be passed to + * pushPageScope to restore this state. The keys of the returned + * Map are Strings representing attribute names. The values are + * the values of those attributes. + */ +public abstract java.util.Map peekPageScope(); + /** * Provides programmatic access to the ExpressionEvaluator. * The JSP Container must return a valid instance of an -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [5][PATCH]commons-logging built without log4j/LogKit
If you follow the directions in BUILDING.txt, it's not necessary to download log4j or LogKit. BUILDING.txt asks for a nightly build of commons-logging, which would have been built against log4j and LogKit. If they aren't present at runtime, they won't be used as the implementation of commons-logging. But if they aren't present at build time, they can't be used. It's basically the same as, say, the JSSE for a Tomcat build. You need it to build SSL support, but if not present at runtime it just means that Tomcat can't do SSL. On Thursday 08 August 2002 01:46 am, Patrick Luby wrote: Steve, Thanks for the patch. I just committed it. I assume that log4j and LogKit are required dependencies. Any chance that you could add those items to BUILDING.txt? Thanks, Patrick Steve Downey wrote: The commons-logging package built by 'ant download' doesn't have support for log4j or LogKit in it, unless the properties happen to be set outside of jakarta-tomcat-5. This patch adds downloads for the released versions of log4j and logkit. ? .project Index: build.properties.default === RCS file: /home/cvspublic/jakarta-tomcat-5/build.properties.default,v retrieving revision 1.17 diff -u -r1.17 build.properties.default --- build.properties.default7 Aug 2002 14:14:03 - 1.17 +++ build.properties.default8 Aug 2002 04:54:58 - @@ -122,8 +122,17 @@ activation.jar=${activation.lib}/activation.jar # - Log4j - -log4j.home=${base.path}/log4j -log4j.jar=${log4j.home}/log4j.jar +log4j.home=${base.path}/jakarta-log4j-1.2.6 +log4j.lib=${log4j.home} +log4j.jar=${log4j.lib}/dist/lib/log4j-1.2.6.jar +log4j.loc=http://jakarta.apache.org/log4j/jakarta-log4j-1.2.6.tar.gz + +# - LogKit - +logkit.home=${base.path}/LogKit-1.0.1 +logkit.lib=${logkit.home} +logkit.jar=${logkit.lib}/logkit-1.0.1.jar +logkit.loc=http://jakarta.apache.org/builds/jakarta-avalon/release/logki t/latest/LogKit-1.0.1-bin.tar.gz + # - Jaxen ( required by taglibs/standard required by jasper ) - jaxen.home=${base.path}/jaxen-1.0-FCS Index: build.xml === RCS file: /home/cvspublic/jakarta-tomcat-5/build.xml,v retrieving revision 1.18 diff -u -r1.18 build.xml --- build.xml 7 Aug 2002 14:14:03 - 1.18 +++ build.xml 8 Aug 2002 04:54:59 - @@ -492,6 +492,16 @@ /antcall -- +antcall target=downloadgz + param name=sourcefile value=${log4j.loc}/ + param name=destfile value=${log4j.jar}/ +/antcall + +antcall target=downloadgz + param name=sourcefile value=${logkit.loc}/ + param name=destfile value=${logkit.jar}/ +/antcall + antcall target=cvsbuild param name=location value=${commons-logging.loc}/ param name=subdir value=${commons-logging.home}/ -- 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-catalina/catalina/src/share/org/apache/catalina/realm Constants.java JAASMemoryLoginModule.java RealmBase.java
amyroh 2002/08/08 18:12:39 Modified:catalina/src/share/org/apache/catalina Realm.java catalina/src/share/org/apache/catalina/authenticator AuthenticatorBase.java catalina/src/share/org/apache/catalina/realm Constants.java JAASMemoryLoginModule.java RealmBase.java Log: Complete the move of the authorization logic from the o.a.c.authenticator.AuthenticatorBase to the o.a.c.realm.RealmBase. Patch submitted by Jean-francois Arcand. Revision ChangesPath 1.3 +33 -11 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Realm.java Index: Realm.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Realm.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Realm.java7 Aug 2002 20:51:44 - 1.2 +++ Realm.java9 Aug 2002 01:12:39 - 1.3 @@ -64,7 +64,6 @@ package org.apache.catalina; - import java.beans.PropertyChangeListener; import java.io.IOException; import java.security.Principal; @@ -171,7 +170,14 @@ */ public Principal authenticate(X509Certificate certs[]); - +/** + * Return the SecurityConstraint configured to guard the request URI for + * this request, or codenull/code if there is no such constraint. + * + * @param request Request we are processing + */ +public SecurityConstraint findSecurityConstraint(HttpRequest request, + Context context); /** * Perform access control based on the specified authorization constraint. * Return codetrue/code if this constraint is satisfied and processing @@ -184,10 +190,10 @@ * * @exception IOException if an input/output error occurs */ -public boolean hasResourceAccess(HttpRequest request, - HttpResponse response, - SecurityConstraint constraint, - Context context) +public boolean hasResourcePermission(HttpRequest request, + HttpResponse response, + SecurityConstraint constraint, + Context context) throws IOException; @@ -201,7 +207,23 @@ */ public boolean hasRole(Principal principal, String role); - +/** + * Enforce any user data constraint required by the security constraint + * guarding this request URI. Return codetrue/code if this constraint + * was not violated and processing should continue, or codefalse/code + * if we have created a response already. + * + * @param request Request we are processing + * @param response Response we are creating + * @param constraint Security constraint being checked + * + * @exception IOException if an input/output error occurs + */ +public boolean hasUserDataPermission(HttpRequest request, + HttpResponse response, + SecurityConstraint constraint) +throws IOException; + /** * Remove a property change listener from this component. * 1.3 +14 -143 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/AuthenticatorBase.java Index: AuthenticatorBase.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/AuthenticatorBase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AuthenticatorBase.java7 Aug 2002 20:51:44 - 1.2 +++ AuthenticatorBase.java9 Aug 2002 01:12:39 - 1.3 @@ -462,8 +462,11 @@ } } +Realm realm = this.context.getRealm(); // Is this request URI subject to a security constraint? -SecurityConstraint constraint = findConstraint(hrequest); +SecurityConstraint constraint = realm. +findSecurityConstraint(hrequest, this.context); + if ((constraint == null) /* (!Constants.FORM_METHOD.equals(config.getAuthMethod())) */ ) { if (debug = 1) @@ -486,10 +489,11 @@ // Enforce any user data constraint for this security constraint if (debug = 1) -log( Calling checkUserData()); -if (!checkUserData(hrequest, hresponse, constraint)) { +log( Calling hasUserDataPermission()); + +if
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardContext.java LocalStrings.properties
horwat 2002/08/08 19:07:12 Modified:catalina/src/share/org/apache/catalina/valves LocalStrings.properties catalina/src/share/org/apache/catalina/mbeans mbeans-descriptors.xml catalina/src/share/org/apache/catalina/core StandardContext.java LocalStrings.properties Added: catalina/src/share/org/apache/catalina/valves RequestListenerValve.java Log: Add a valve to handle the servlet request lifecycle events. Revision ChangesPath 1.2 +2 -0 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/LocalStrings.properties Index: LocalStrings.properties === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/LocalStrings.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- LocalStrings.properties 18 Jul 2002 16:47:42 - 1.1 +++ LocalStrings.properties 9 Aug 2002 02:07:12 - 1.2 @@ -6,6 +6,8 @@ interceptorValve.notStarted=Interceptor Valve has not yet been started requestFilterValve.next=No 'next' valve has been configured requestFilterValve.syntax=Syntax error in request filter pattern {0} +requestListenerValve.requestInit=Exception sending request initialized lifecycle event to listener instance of class {0} +requestListenerValve.requestDestroy=Exception sending request destroyed lifecycle event to listener instance of class {0} valveBase.noNext=Configuration error: No 'next' valve configured # Error report valve 1.1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/RequestListenerValve.java Index: RequestListenerValve.java === /* * $Header: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/RequestListenerValve.java,v 1.1 2002/08/09 02:07:12 horwat Exp $ * $Revision: 1.1 $ * $Date: 2002/08/09 02:07:12 $ * * * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * 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] *
cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5 CoyoteRequest.java LocalStrings.properties
horwat 2002/08/08 19:10:10 Modified:coyote/src/java/org/apache/coyote/tomcat5 CoyoteRequest.java LocalStrings.properties Log: Add servlet request attribute change event support. Revision ChangesPath 1.2 +130 -6 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteRequest.java Index: CoyoteRequest.java === RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteRequest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CoyoteRequest.java4 Aug 2002 19:39:49 - 1.1 +++ CoyoteRequest.java9 Aug 2002 02:10:10 - 1.2 @@ -91,6 +91,10 @@ import javax.servlet.ServletException; import javax.servlet.ServletInputStream; import javax.servlet.ServletRequest; +import javax.servlet.ServletRequestEvent; +import javax.servlet.ServletRequestListener; +import javax.servlet.ServletRequestAttributeEvent; +import javax.servlet.ServletRequestAttributeListener; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -105,6 +109,7 @@ import org.apache.catalina.Context; import org.apache.catalina.Globals; import org.apache.catalina.HttpRequest; +import org.apache.catalina.Logger; import org.apache.catalina.Manager; import org.apache.catalina.Realm; import org.apache.catalina.Session; @@ -214,6 +219,12 @@ /** + * List of read only attributes for this Request. + */ +private HashMap readOnlyAttributes = new HashMap(); + + +/** * The preferred Locales assocaited with this Request. */ protected ArrayList locales = new ArrayList(); @@ -1136,7 +1147,42 @@ * @param name Name of the request attribute to remove */ public void removeAttribute(String name) { -attributes.remove(name); +Object value = null; +boolean found = false; + +// Remove the specified attribute +synchronized (attributes) { +// Check for read only attribute + if (readOnlyAttributes.containsKey(name)) +return; +found = attributes.containsKey(name); +if (found) { +value = attributes.get(name); +attributes.remove(name); +} else { +return; +} +} + +// Notify interested application event listeners +Object listeners[] = context.getApplicationListeners(); +if ((listeners == null) || (listeners.length == 0)) +return; +ServletRequestAttributeEvent event = + new ServletRequestAttributeEvent(context.getServletContext(), + getRequest(), name, value); +for (int i = 0; i listeners.length; i++) { +if (!(listeners[i] instanceof ServletRequestAttributeListener)) +continue; +ServletRequestAttributeListener listener = +(ServletRequestAttributeListener) listeners[i]; +try { +listener.attributeRemoved(event); +} catch (Throwable t) { +// FIXME - should we do anything besides log these? +log(sm.getString(coyoteRequest.attributeEvent), t); +} +} } @@ -1159,8 +1205,50 @@ return; } -attributes.put(name, value); +Object oldValue = null; +boolean replaced = false; +// Add or replace the specified attribute +synchronized (attributes) { +// Check for read only attribute +if (readOnlyAttributes.containsKey(name)) +return; +oldValue = attributes.get(name); +if (oldValue != null) +replaced = true; +attributes.put(name, value); +} + +// Notify interested application event listeners +Object listeners[] = context.getApplicationListeners(); +if ((listeners == null) || (listeners.length == 0)) +return; +ServletRequestAttributeEvent event = null; +if (replaced) +event = +new ServletRequestAttributeEvent(context.getServletContext(), + getRequest(), name, oldValue); +else +event = +new ServletRequestAttributeEvent(context.getServletContext(), + getRequest(), name, value); + +for (int i = 0; i listeners.length; i++) { +if (!(listeners[i] instanceof
cvs commit: jakarta-tomcat-catalina/tester/src/tester/org/apache/tester Request01.java RequestListener01.java
horwat 2002/08/08 19:12:14 Modified:tester/web/WEB-INF web.xml tester/src/bin tester.xml Added: tester/src/tester/org/apache/tester Request01.java RequestListener01.java Log: Add test case for new servlet request events. Revision ChangesPath 1.2 +24 -0 jakarta-tomcat-catalina/tester/web/WEB-INF/web.xml Index: web.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/tester/web/WEB-INF/web.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- web.xml 18 Jul 2002 16:47:25 - 1.1 +++ web.xml 9 Aug 2002 02:12:13 - 1.2 @@ -344,6 +344,11 @@ /filter-mapping filter-mapping +filter-nameHttpFilter/filter-name +url-pattern/WrappedRequest01/url-pattern +/filter-mapping + +filter-mapping filter-nameGenericFilter/filter-name url-pattern/WrappedReset01/url-pattern /filter-mapping @@ -449,6 +454,10 @@ -- listener +listener-classorg.apache.tester.RequestListener01/listener-class +/listener + +listener listener-classorg.apache.tester.SessionListener01/listener-class /listener @@ -906,6 +915,11 @@ /servlet servlet +servlet-nameRequest01/servlet-name +servlet-classorg.apache.tester.Request01/servlet-class +/servlet + +servlet servlet-nameReset01/servlet-name servlet-classorg.apache.tester.Reset01/servlet-class /servlet @@ -1690,6 +1704,16 @@ servlet-mapping servlet-nameReflection01/servlet-name url-pattern/WrappedReflection01/url-pattern +/servlet-mapping + +servlet-mapping +servlet-nameRequest01/servlet-name +url-pattern/Request01/url-pattern +/servlet-mapping + +servlet-mapping +servlet-nameRequest01/servlet-name +url-pattern/WrappedRequest01/url-pattern /servlet-mapping servlet-mapping 1.2 +10 -0 jakarta-tomcat-catalina/tester/src/bin/tester.xml Index: tester.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/tester/src/bin/tester.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- tester.xml18 Jul 2002 16:47:30 - 1.1 +++ tester.xml9 Aug 2002 02:12:13 - 1.2 @@ -1504,6 +1504,16 @@ request=${context.path}/WrappedAggregate02?a=1 outContent=Aggregate02 PASSED/ +tester host=${host} port=${port} protocol=${protocol} + debug=${debug} + request=${context.path}/Request01 + outContent=Request01 PASSED/ + +tester host=${host} port=${port} protocol=${protocol} + debug=${debug} + request=${context.path}/WrappedRequest01 + outContent=Request01 PASSED/ + !-- == Other ServletRequest Tests -- !-- Servlet compliance tests, until equivalent tests are included 1.1 jakarta-tomcat-catalina/tester/src/tester/org/apache/tester/Request01.java Index: Request01.java === /* = * * * * The Apache Software License, Version 1.1 * * * * Copyright (c) 1999, 2000 The Apache Software Foundation. * * All rights reserved.* * * * = * * * * Redistribution and use in source and binary forms, with or without modi- * * fication, are permitted provided that the following conditions are met: * * * * 1. Redistributions of source code must retain the above copyright notice * *notice, this list of conditions and the following disclaimer. * * * * 2. Redistributions in binary form must reproduce the above copyright * *notice, this list of conditions and the following disclaimer in the * *documentation and/or other materials provided with the distribution. * * * * 3.
Re: [PROPOSAL] Have Bootstrap and BootsrapService share startup/shutdown code
Remy Maucherat wrote: BootstrapService never used a port. You're right. I keep confusing the things - I now switched to CatalinaService and it works. BootstrapService depends on daemon - and I don't use daemon to start. ( I hope deamon will switch to introspection ) Sorry I missed something, but I had the impression that the bootstrap code was linked with the configuration code. I don't see how we can do all the changes and add JMX at the core level without doing a new JMX based launcher (JBoss style, I guess). Maybe I missed something (too much vacation, I suppose) ;-) Ok. First, I don't think the bootstrap is 'linked' to configuration. The role of bootstrap is to create 2 classloaders, load a class and pass all the params. The only possible configuration would be the location of the server/lib and common/lib - and that could be done using the trick we discuss ( look in the classpath, find the dir ). Having one class with start/stop/main/execute/setters and minimal external deps ( commons-logging and introspection maybe ) should work. The second step is Catalina/CatalinaService. Again, having a single story would be really good. This is the real 'entry point' and should have setters and execute for ant and JMX, as well as main. Regarding JMX - any application can use modeler ( or a similar tool ) and use Catalina.java as a JMX bean. With DynamicMBean it takes one line of code. After that - no need to use any tomcat-specific API, it's just a regular MBean. The configuration is more of an issue after start() is called. If we want to use JMX 'everywhere' ( JBoss style ) or not - that's a different issue. I think it is a good idea, but it needs more discussion and feedback. So far my 'pre-proposal' on configuration got some nodding, but no real feedback or interest. If I'm the only one who has this itch - we can leave server.xml, I won't spend the time implementing something that nobody needs. Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[POLL] Configuration API of tomcat5
Few questions: 1. JMX as low-level configuration API. The question is - should we follow the path of JBoss and make everything that is configurable an MBean, and base the entire architecture on JMX ? The benefits: - standard API - reasonably clean - easy to integrate with other apps using JMX Possible problems: - may affect performance ( lots of introspection - jboss does a lot of tricks in their jmx impl. ) - we still don't have the test suite for jmx - so licence issues are still there ( and we don't know if mx4j would pass it ) - we'll be very dependent on JMX - with little control over implementation. - again, tomcat won't work without jmx. 2. Wrapper-JMX for configuration. We can use a small wrapper that will work without JMX. Something similar with modeler, but with no 'direct' dependency on JMX. We can register the components with this wrapper and use it to pass/query config info. If JMX is available, that will translate into JMX calls. One possible ( still standard ) API for the wrapper is JNDI. If we register all the 'interesting' objects in the jndi we can easily 'wrap' them for jmx. The APIs are very similar, the code is easy and most people are supposed to be familiar with the API. There are other choices as well. We already depend on JNDI - so no extra deps here, and it'll probably be easier to make it work with ldap or other backends. 3. Small config API ( with JMX hooks ). That's what I started in util.config - just minimal objectName/attributes/attriubte change notifications, no extra overhead. That would probably be cleaner and smaller, but it's yet-another-api. 4. Just keep the current API and implementation, with a jmx layer on top. The listener provides access to the objects and allows it to transparently register them with JMX. We rewrite the config read to keep the information in memory and get all the changes made by user, then save. We could use DOM or something similar and preserve even the comments ( if XML backend is used ). The key difference is in what we use as a low-level API to 'assemble' the components. First 3 choices give more decoupling, the third is the easiest to implement ( almost nothing to change ). Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5 CoyoteRequest.java LocalStrings.properties
+// Remove the specified attribute +synchronized (attributes) { +// Check for read only attribute + if (readOnlyAttributes.containsKey(name)) +return; +found = attributes.containsKey(name); +if (found) { +value = attributes.get(name); +attributes.remove(name); +} else { +return; +} +} Requests are per-thread, so the synchronized is unnecessary. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]