svn commit: r326717 - /tomcat/sandbox/
Author: markt Date: Wed Oct 19 14:43:58 2005 New Revision: 326717 URL: http://svn.apache.org/viewcvs?rev=326717&view=rev Log: Create the sandbox. A readme explaining how to use it will follow as soon as I write it. Added: tomcat/sandbox/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r326729 - /tomcat/sandbox/README.txt
Author: markt Date: Wed Oct 19 15:20:14 2005 New Revision: 326729 URL: http://svn.apache.org/viewcvs?rev=326729&view=rev Log: Add some guidance for the use of the sandbox directory. This is just my view so feel free to modify it. Added: tomcat/sandbox/README.txt Added: tomcat/sandbox/README.txt URL: http://svn.apache.org/viewcvs/tomcat/sandbox/README.txt?rev=326729&view=auto == --- tomcat/sandbox/README.txt (added) +++ tomcat/sandbox/README.txt Wed Oct 19 15:20:14 2005 @@ -0,0 +1,52 @@ +General +=== + +The sandbox is for experimental development of Tomcat components. The components +may provide new functionality or improve existing functionality. + +Components may be targetted at one or more Tomcat versions. + + +Life-cycle +== + +The life-cycle of a sandbox component is: +1. Create new component in sandbox +2. Develop it +3. Do one of + i) Incorporate it in the standard Tomcat source trees + ii) Release it as a separate component + iii) Archive it for future reference + + +SVN +=== + +Sandbox components should be developed in a sub-directory of the /tomcat/sandbox +directory. Developers may choose whether to add source directly under the +component's directory or to create the standard subversion /trunk/, /branches/ +and /tags/ directories and add the source under the /trunk/ directory. + +The svn commands to do this will look something like: +svn mkdir https://svn.apache.org/repos/asf/tomcat/sandbox/component +svn mkdir https://svn.apache.org/repos/asf/tomcat/sandbox/component/trunk +svn mkdir https://svn.apache.org/repos/asf/tomcat/sandbox/component/branches +svn mkdir https://svn.apache.org/repos/asf/tomcat/sandbox/component/tags + + +Releases + + +Components may be released from the sandbox but only as alpha or beta. If +releases are made, then the standard subversion structure of /trunk/, +/branches/ and /tags/ must be used. + +Stable releases may not be made from the sandbox. + +All releases are subject to the same voting rules as any other Tomcat release. + +If released as a separate component, and if it does not already exist, +a new top level directory (/tomcat/modules/) will need to be created and a +sub-directory for the new component should be created under the modules +directory. At this point, the standard svn /trunk/, /branches/ and /tags/ must +be used for each component. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r328753 - in /tomcat/site/trunk/xdocs: download-33.xml download-41.xml
Author: markt Date: Wed Oct 26 15:26:44 2005 New Revision: 328753 URL: http://svn.apache.org/viewcvs?rev=328753&view=rev Log: Fix download locations for Tomcat 3 and Tomcat 4 after move to TLP structure. Modified: tomcat/site/trunk/xdocs/download-33.xml tomcat/site/trunk/xdocs/download-41.xml Modified: tomcat/site/trunk/xdocs/download-33.xml URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/xdocs/download-33.xml?rev=328753&r1=328752&r2=328753&view=diff == --- tomcat/site/trunk/xdocs/download-33.xml (original) +++ tomcat/site/trunk/xdocs/download-33.xml Wed Oct 26 15:26:44 2005 @@ -19,4 +19,4 @@ [end] The KEYS link links to the code signing keys used to sign the product. The PGP link downloads the OpenPGP compatible signature from our main site. -For more information concerning Tomcat 3, see the http://jakarta.apache.org/tomcat/tomcat-3.3-doc/"; class="name">Tomcat 3 site. http://www.apache.org/dist/jakarta/tomcat-3/v3.3.2/KEYS";>KEYSBinary3.3.2 tar.gz[http://www.apache.org/dist/jakarta/tomcat-3/v3.3.2/bin/jakarta-tomcat-3.3.2.tar.gz.asc";>pgp]3.3.2 zip[http://www.apache.org/dist/jakarta/tomcat-3/v3.3.2/bin/jakarta-tomcat-3.3.2.zip.asc";>pgp]Source3.3.2 tar.gz[http://www.apache.org/dist/jakarta/tomcat-3/v3.3.2/src/jakarta-tomcat-3.3.2-src.tar.gz.asc";>pgp]3.3.2 zip[http://www.apache.org/dist/jakarta/tomcat-3/v3.3.2/src/jakarta-tomcat-3.3.2-src.zip.asc";>pgp]browse download areahttp://archive.apache.org/dist/jakarta/tomcat-3/";>archives... \ No newline at end of file +For more information concerning Tomcat 3, see the http://jakarta.apache.org/tomcat/tomcat-3.3-doc/"; class="name">Tomcat 3 site. http://www.apache.org/dist/tomcat/tomcat-3/v3.3.2/KEYS";>KEYSBinary3.3.2 tar.gz[http://www.apache.org/dist/tomcat/tomcat-3/v3.3.2/bin/jakarta-tomcat-3.3.2.tar.gz.asc";>pgp]3.3.2 zip[http://www.apache.org/dist/tomcat/tomcat-3/v3.3.2/bin/jakarta-tomcat-3.3.2.zip.asc";>pgp]Source3.3.2 tar.gz[http://www.apache.org/dist/tomcat/tomcat-3/v3.3.2/src/jakarta-tomcat-3.3.2-src.tar.gz.asc";>pgp]3.3.2 zip[http://www.apache.org/dist/tomcat/tomcat-3/v3.3.2/src/jakarta-tomcat-3.3.2-src.zip.asc";>pgp]browse download areahttp://archive.apache.org/dist/tomcat/tomcat-3/";>archives... \ No newline at end of file Modified: tomcat/site/trunk/xdocs/download-41.xml URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/xdocs/download-41.xml?rev=328753&r1=328752&r2=328753&view=diff == --- tomcat/site/trunk/xdocs/download-41.xml (original) +++ tomcat/site/trunk/xdocs/download-41.xml Wed Oct 26 15:26:44 2005 @@ -31,7 +31,7 @@ The KEYS link links to the code signing keys used to sign the product. The PGP link downloads the OpenPGP compatible signature from our main site. The MD5 link downloads the checksum from the main site. -For more information concerning Tomcat 4, see the http://jakarta.apache.org/tomcat/tomcat-4.1-doc/"; class="name">Tomcat 4 site. http://www.apache.org/dist/jakarta/tomcat-4/KEYS";>KEYSBinary4.1.31 exe[http://www.apache.org/dist/jakarta/tomcat-4/v4.1.31/bin/jakarta-tomcat-4.1.31.exe.md5";>md5][http://www.apache.org/dist/jakarta/tomcat-4/v4.1.31/bin/jakarta-tomcat-4.1.31.exe.asc";>pgp]4.1.31 tar.gz[http://www.apache.org/dist/jakarta/tomcat-4/v4.1.31/bin/jakarta-tomcat-4.1.31.tar.gz.md5";>md5][http://www.apache.org/dist/jakarta/tomcat-4/v4.1.31/bin/jakarta-tomcat-4.1.31.tar.gz.asc";>pgp]4.1.31 zip[http://www.apache.org/dist/jakarta/tomcat-4/v4.1.31/bin/jakarta-tomcat-4.1.31.zip.md5";>md5][http://www.apache.org/dist/jakarta/tomcat-4/v4.1.31/bin/jakarta-tomcat-4.1.31.zip.asc";>pgp]Source4.1.31 tar.gz[http://www.apache.org/dist/jakarta/tomcat-4/v4.1.31/src/jakarta-tomcat-4.1.31-src.tar.gz.md5";>md5][http://www.apache.org/dist/jakarta/tomcat-4/v4.1.31/src/jakarta-tomcat-4.1.31-src.tar.gz.asc";>pgp]4.1.31 zip[http://www.apache.org/dist/jakarta/tomcat-4/v4.1.31/src/jakarta-tomcat-4.1.31-src.zip.md5";>md5][http://www.apache.org/dist/jakarta/tomcat-4/v4.1.31/src/jakarta-tomcat-4.1.31-src.zip.asc";>pgp]browse download areahttp://archive.apache.org/dist/jakarta/tomcat-4/";>archives... +For more information concerning Tomcat 4, see the http://jakarta.apache.org/tomcat/tomcat-4.1-doc/"; class="name">Tomcat 4 site. http://www.apache.org/dist/tomcat/tomcat-4/KEYS";>KEYSBinary4.1.31 exe[http://www.apache.org/dist/tomcat/tomcat-4/v4.1.31/bin/jakarta-tomcat-4.1.31.exe.md5";>md5][http://www.apache.org/dist/tomcat/tomcat-4/v4.1.31/bin/jakart
svn commit: r328769 - in /tomcat/site/trunk/docs: download-33.html download-41.html
Author: markt Date: Wed Oct 26 18:34:39 2005 New Revision: 328769 URL: http://svn.apache.org/viewcvs?rev=328769&view=rev Log: Update html as well as xml. Modified: tomcat/site/trunk/docs/download-33.html tomcat/site/trunk/docs/download-41.html Modified: tomcat/site/trunk/docs/download-33.html URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/docs/download-33.html?rev=328769&r1=328768&r2=328769&view=diff == --- tomcat/site/trunk/docs/download-33.html (original) +++ tomcat/site/trunk/docs/download-33.html Wed Oct 26 18:34:39 2005 @@ -4,14 +4,14 @@ Apache Tomcat - Tomcat 3 Downloads - - + + http://tomcat.apache.org/";> - + @@ -22,21 +22,21 @@ http://www.apache.org/";> -http://www.apache.org/images/asf-logo.gif"; /> +http://www.apache.org/images/asf-logo.gif"; align="right" alt="Apache Logo" border="0"/> - + - + - + Apache Tomcat @@ -147,11 +147,11 @@ - - + + - + Tomcat 3 Downloads @@ -170,8 +170,8 @@ encounter a problem with this mirror, please select another mirror. If all mirrors are failing, there are backup mirrors (at the end of the mirrors list) that should be -available.[if-any logo] - +available.[if-any logo] + [end] @@ -186,7 +186,7 @@ [for backup][backup] (backup)[end] [end] - + @@ -195,7 +195,7 @@ For more information concerning Tomcat 3, see the http://jakarta.apache.org/tomcat/tomcat-3.3-doc/"; class="name">Tomcat 3 site. -http://www.apache.org/dist/jakarta/tomcat-3/v3.3.2/KEYS";>KEYS +http://www.apache.org/dist/tomcat/tomcat-3/v3.3.2/KEYS";>KEYS @@ -205,18 +205,18 @@ -3.3.2 tar.gz +3.3.2 tar.gz -[http://www.apache.org/dist/jakarta/tomcat-3/v3.3.2/bin/jakarta-tomcat-3.3.2.tar.gz.asc";>pgp] +[http://www.apache.org/dist/tomcat/tomcat-3/v3.3.2/bin/jakarta-tomcat-3.3.2.tar.gz.asc";>pgp] -3.3.2 zip +3.3.2 zip -[http://www.apache.org/dist/jakarta/tomcat-3/v3.3.2/bin/jakarta-tomcat-3.3.2.zip.asc";>pgp] +[http://www.apache.org/dist/tomcat/tomcat-3/v3.3.2/bin/jakarta-tomcat-3.3.2.zip.asc";>pgp] @@ -228,28 +228,28 @@ -3.3.2 tar.gz +3.3.2 tar.gz -[http://www.apache.org/dist/jakarta/tomcat-3/v3.3.2/src/jakarta-tomcat-3.3.2-src.tar.gz.asc";>pgp] +[http://www.apache.org/dist/tomcat/tomcat-3/v3.3.2/src/jakarta-tomcat-3.3.2-src.tar.gz.asc";>pgp] -3.3.2 zip +3.3.2 zip -[http://www.apache.org/dist/jakarta/tomcat-3/v3.3.2/src/jakarta-tomcat-3.3.2-src.zip.asc";>pgp] +[http://www.apache.org/dist/tomcat/tomcat-3/v3.3.2/src/jakarta-tomcat-3.3.2-src.zip.asc";>pgp] -browse download area +browse download area -http://archive.apache.org/dist/jakarta/tomcat-3/";>archives... +http://archive.apache.org/dist/tomcat/tomcat-3/";>archives... @@ -258,7 +258,7 @@ - + @@ -267,14 +267,14 @@ - + - + Copyright © 1999-2005, The Apache Software Foundation Modified: tomcat/site/trunk/docs/download-41.html URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/docs/download-41.html?rev=328769&r1=328768&r2=328769&view=diff == --- tomcat/site/trunk/docs/download-41.html (original) +++ tomcat/site/trunk/docs/download-41.html Wed Oct 26 18:34:39 2005 @@ -4,14 +4,14 @@ Apache Tomcat - Apache Tomcat 4 Downloads - - + + http://tomcat.apache.org/";> - + @@ -22,21 +22,21 @@ http://www.apache.org/";> -http://www.apache.org/images/asf-logo.gif"; /> +http://www.apache.org/images/asf-logo.gif"; align="right" alt="Apache Logo" border="0"/> - + - + - + Apache Tomcat @@ -147,11 +147,11 @@ - - + + - + Tomcat 4 Downloads @@ -172,8 +172,8 @@ encounter a problem with this mirror, please select another mirror. If all mirrors are failing, there are backup mirrors (at the end of the mirrors list) that should be -available.[if-any logo] - +available.[if-any logo] + [end] @@ -188,7 +188,7 @@ [for backup][backup] (backup)[end] [end] - + @@ -199,7 +199,7 @@ For more information concerning Tomcat 4, see the http://jakarta.apache.org/tomcat/tomcat-4.1-doc/"; class="name">Tomcat 4 site. -http://www.apache.org/dist/jakarta/tomcat-4/KEYS";>KEYS +http://www.apache.org/dist/tomcat/tomcat-4/KEYS";>KEYS @@ -209,29 +209,29 @@ -4.1.31 exe +4.1.31 exe -[http://www.apache
svn commit: r329593 - in /tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler: Compiler.java Generator.java JspDocumentParser.java JspReader.java Node.java PageDataImpl.java Pa
Author: markt Date: Sun Oct 30 09:52:51 2005 New Revision: 329593 URL: http://svn.apache.org/viewcvs?rev=329593&view=rev Log: Fix bug 22802 - implement mappedfile. Port of: - Kin-man's mappedfile implementation from TC5 - Jan's patch to use String rather than char[] Added: tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/TextOptimizer.java (with props) Modified: tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/Compiler.java tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/Generator.java tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/JspReader.java tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/Node.java tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/PageDataImpl.java tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/Parser.java Modified: tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/Compiler.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/Compiler.java?rev=329593&r1=329592&r2=329593&view=diff == --- tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/Compiler.java (original) +++ tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/Compiler.java Sun Oct 30 09:52:51 2005 @@ -196,6 +196,9 @@ // Determine which custom tag needs to declare which scripting vars ScriptingVariabler.set(pageNodes); +// Optimization: concatenate contiguous template texts. +TextOptimizer.concatenate(this, pageNodes); + // generate servlet .java file Generator.generate(writer, this, pageNodes); writer.close(); Modified: tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/Generator.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/Generator.java?rev=329593&r1=329592&r2=329593&view=diff == --- tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/Generator.java (original) +++ tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/Generator.java Sun Oct 30 09:52:51 2005 @@ -597,7 +597,7 @@ public void visit(Node.Scriptlet n) throws JasperException { n.setBeginJavaLine(out.getJavaLine()); -out.printMultiLn(new String(n.getText())); +out.printMultiLn(n.getText()); out.println(); n.setEndJavaLine(out.getJavaLine()); } @@ -1225,8 +1225,7 @@ public void visit(Node.TemplateText n) throws JasperException { -char[] chars = n.getText(); -int size = chars.length; +String text = n.getText(); n.setBeginJavaLine(out.getJavaLine()); @@ -1234,8 +1233,8 @@ StringBuffer sb = new StringBuffer("out.write(\""); int initLength = sb.length(); int count = CHUNKSIZE; -for (int i = 0 ; i < size ; i++) { -char ch = chars[i]; +for (int i = 0 ; i < text.length() ; i++) { +char ch = text.charAt(i); --count; switch(ch) { case '"': Modified: tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java?rev=329593&r1=329592&r2=329593&view=diff == --- tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java (original) +++ tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java Sun Oct 30 09:52:51 2005 @@ -231,9 +231,7 @@ if ((current instanceof Node.JspText) || !isAllSpace) { Mark start = new Mark(path, locator.getLineNumber(), locator.getColumnNumber()); -char[] bufCopy = new char[len]; -System.arraycopy(buf, offset, bufCopy, 0, len); -new Node.TemplateText(bufCopy, start, current); +new Node.TemplateText(new String(buf, offset, len), start, current); } } @@ -268,9 +266,7 @@ if (!inDTD) { Mark start = new Mark(path, locator.getLineNumber(),
svn commit: r330947 - in /tomcat: connectors/trunk/ container/tc5.5.x/ jasper/tc5.5.x/ servletapi/servlet2.4-jsp2.0-tc5.x/
Author: markt Date: Fri Nov 4 16:39:24 2005 New Revision: 330947 URL: http://svn.apache.org/viewcvs?rev=330947&view=rev Log: Add Eclipse 3.x build files. Assumptions include: - Checkout of /tomcat/current/tc5.5.x/ in workspace directory - Location of libs is workspace/../libs - Sufficient source for remote debugging included This is not a recommended configuration - just one that works that people can use as a starting point. Everyone will have their own preferences for compiler warning settings etc and they are free to set them how they like. Added: tomcat/connectors/trunk/.classpath (with props) tomcat/connectors/trunk/.project (with props) tomcat/container/tc5.5.x/.classpath (with props) tomcat/container/tc5.5.x/.project (with props) tomcat/jasper/tc5.5.x/.classpath (with props) tomcat/jasper/tc5.5.x/.project (with props) tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/.classpath (with props) tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/.project (with props) Added: tomcat/connectors/trunk/.classpath URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/.classpath?rev=330947&view=auto == --- tomcat/connectors/trunk/.classpath (added) +++ tomcat/connectors/trunk/.classpath Fri Nov 4 16:39:24 2005 @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + Propchange: tomcat/connectors/trunk/.classpath -- svn:eol-style = native Added: tomcat/connectors/trunk/.project URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/.project?rev=330947&view=auto == --- tomcat/connectors/trunk/.project (added) +++ tomcat/connectors/trunk/.project Fri Nov 4 16:39:24 2005 @@ -0,0 +1,17 @@ + + + Connectors + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + Propchange: tomcat/connectors/trunk/.project -- svn:eol-style = native Added: tomcat/container/tc5.5.x/.classpath URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/.classpath?rev=330947&view=auto == --- tomcat/container/tc5.5.x/.classpath (added) +++ tomcat/container/tc5.5.x/.classpath Fri Nov 4 16:39:24 2005 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Propchange: tomcat/container/tc5.5.x/.classpath -- svn:eol-style = native Added: tomcat/container/tc5.5.x/.project URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/.project?rev=330947&view=auto == --- tomcat/container/tc5.5.x/.project (added) +++ tomcat/container/tc5.5.x/.project Fri Nov 4 16:39:24 2005 @@ -0,0 +1,17 @@ + + + Container + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + Propchange: tomcat/container/tc5.5.x/.project -- svn:eol-style = native Added: tomcat/jasper/tc5.5.x/.classpath URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc5.5.x/.classpath?rev=330947&view=auto == --- tomcat/jasper/tc5.5.x/.classpath (added) +++ tomcat/jasper/tc5.5.x/.classpath Fri Nov 4 16:39:24 2005 @@ -0,0 +1,11 @@ + + + + + + + + + + + Propchange: tomcat/jasper/tc5.5.x/.classpath -- svn:eol-style = native Added: tomcat/jasper/tc5.5.x/.project URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc5.5.x/.project?rev=330947&view=auto == --- tomcat/jasper/tc5.5.x/.project (added) +++ tomcat/jasper/tc5.5.x/.project Fri Nov 4 16:39:24 2005 @@ -0,0 +1,17 @@ + + + Jasper + + + + + + org.
svn commit: r331102 - in /tomcat: build/tc5.5.x/build.properties.default container/tc5.5.x/webapps/docs/changelog.xml
Author: markt Date: Sun Nov 6 04:08:59 2005 New Revision: 331102 URL: http://svn.apache.org/viewcvs?rev=331102&view=rev Log: Update optional dependencies. Modified: tomcat/build/tc5.5.x/build.properties.default tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/build/tc5.5.x/build.properties.default URL: http://svn.apache.org/viewcvs/tomcat/build/tc5.5.x/build.properties.default?rev=331102&r1=331101&r2=331102&view=diff == --- tomcat/build/tc5.5.x/build.properties.default (original) +++ tomcat/build/tc5.5.x/build.properties.default Sun Nov 6 04:08:59 2005 @@ -226,7 +226,7 @@ # - Java Activation Framework (JAF), version 1.0.1 or later - -activation.home=${base.path}/jaf-1.0.1 +activation.home=${base.path}/jaf-1.0.2 activation.lib=${activation.home} activation.jar=${activation.lib}/activation.jar @@ -238,12 +238,12 @@ jsse.jar=${jsse.lib}/jsse.jar # - Java Transaction API (JTA), version 1.0.1a or later - -jta.home=${base.path}/jta-1_0_1a +jta.home=${base.path}/jta-1_0_1b jta.lib=${jta.home} jta.jar=${jta.lib}/jta.jar # - Java Mail, version 1.2 or later - -mail.home=${base.path}/javamail-1.3.2 +mail.home=${base.path}/javamail-1.3.3_01 mail.lib=${mail.home} mail.jar=${mail.lib}/mail.jar Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=331102&r1=331101&r2=331102&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sun Nov 6 04:08:59 2005 @@ -36,6 +36,9 @@ 37035: Add a placeholder file in the temp directory for WinZip tar.gz handling. (yoavs) + +Update JAF dependency to 1.0.2, JTA to 1.0.1b and JavaMail to 1.3.3_01. (markt) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r331103 - in /tomcat: connectors/trunk/.classpath container/tc5.5.x/.classpath jasper/tc5.5.x/.classpath
Author: markt Date: Sun Nov 6 04:11:16 2005 New Revision: 331103 URL: http://svn.apache.org/viewcvs?rev=331103&view=rev Log: Use relative paths to libraries for Eclipse projects. Correct some library versions to align with build.properties.default Modified: tomcat/connectors/trunk/.classpath tomcat/container/tc5.5.x/.classpath tomcat/jasper/tc5.5.x/.classpath Modified: tomcat/connectors/trunk/.classpath URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/.classpath?rev=331103&r1=331102&r2=331103&view=diff == --- tomcat/connectors/trunk/.classpath (original) +++ tomcat/connectors/trunk/.classpath Sun Nov 6 04:11:16 2005 @@ -8,11 +8,11 @@ - - - - - - + + + + + + Modified: tomcat/container/tc5.5.x/.classpath URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/.classpath?rev=331103&r1=331102&r2=331103&view=diff == --- tomcat/container/tc5.5.x/.classpath (original) +++ tomcat/container/tc5.5.x/.classpath Sun Nov 6 04:11:16 2005 @@ -11,22 +11,21 @@ - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + Modified: tomcat/jasper/tc5.5.x/.classpath URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc5.5.x/.classpath?rev=331103&r1=331102&r2=331103&view=diff == --- tomcat/jasper/tc5.5.x/.classpath (original) +++ tomcat/jasper/tc5.5.x/.classpath Sun Nov 6 04:11:16 2005 @@ -3,9 +3,9 @@ - - - - + + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r331105 - /tomcat/current/tc5.5.x/
Author: markt Date: Sun Nov 6 04:38:45 2005 New Revision: 331105 URL: http://svn.apache.org/viewcvs?rev=331105&view=rev Log: Align tomcat/current SVN externals configuration with the main build script. Modified: tomcat/current/tc5.5.x/ (props changed) Propchange: tomcat/current/tc5.5.x/ -- --- svn:externals (original) +++ svn:externals Sun Nov 6 04:38:45 2005 @@ -1,5 +1,5 @@ build https://svn.apache.org/repos/asf/tomcat/build/tc5.5.x container https://svn.apache.org/repos/asf/tomcat/container/tc5.5.x connectors https://svn.apache.org/repos/asf/tomcat/connectors/trunk -jasper https://svn.apache.org/repos/asf/tomcat/jasper/tc5.5.x +jasper https://svn.apache.org/repos/asf/tomcat/jasper/tc5.5.x/jasper2 servletapi https://svn.apache.org/repos/asf/tomcat/servletapi/servlet2.4-jsp2.0-tc5.x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r331106 - in /tomcat/jasper/tc5.5.x: .classpath jasper2/.classpath
Author: markt Date: Sun Nov 6 04:41:19 2005 New Revision: 331106 URL: http://svn.apache.org/viewcvs?rev=331106&view=rev Log: Move eclipse files to align new with tomcat/current/tc5.5.x configuration Added: tomcat/jasper/tc5.5.x/jasper2/.classpath - copied unchanged from r331105, tomcat/jasper/tc5.5.x/.classpath Removed: tomcat/jasper/tc5.5.x/.classpath - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r331107 - in /tomcat/jasper/tc5.5.x: .project jasper2/.project
Author: markt Date: Sun Nov 6 04:41:44 2005 New Revision: 331107 URL: http://svn.apache.org/viewcvs?rev=331107&view=rev Log: Move eclipse files to align new with tomcat/current/tc5.5.x configuration Added: tomcat/jasper/tc5.5.x/jasper2/.project - copied unchanged from r331106, tomcat/jasper/tc5.5.x/.project Removed: tomcat/jasper/tc5.5.x/.project - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r331108 - /tomcat/jasper/tc5.5.x/jasper2/.classpath
Author: markt Date: Sun Nov 6 04:43:19 2005 New Revision: 331108 URL: http://svn.apache.org/viewcvs?rev=331108&view=rev Log: Update eclipse classpath to align new with tomcat/current/tc5.5.x configuration Modified: tomcat/jasper/tc5.5.x/jasper2/.classpath Modified: tomcat/jasper/tc5.5.x/jasper2/.classpath URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc5.5.x/jasper2/.classpath?rev=331108&r1=331107&r2=331108&view=diff == --- tomcat/jasper/tc5.5.x/jasper2/.classpath (original) +++ tomcat/jasper/tc5.5.x/jasper2/.classpath Sun Nov 6 04:43:19 2005 @@ -1,6 +1,6 @@ - + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r331869 - /tomcat/container/tc5.5.x/webapps/docs/building.xml
Author: markt Date: Tue Nov 8 11:29:05 2005 New Revision: 331869 URL: http://svn.apache.org/viewcvs?rev=331869&view=rev Log: Update building docs for SVN. Modified: tomcat/container/tc5.5.x/webapps/docs/building.xml Modified: tomcat/container/tc5.5.x/webapps/docs/building.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/building.xml?rev=331869&r1=331868&r2=331869&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/building.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/building.xml Tue Nov 8 11:29:05 2005 @@ -16,7 +16,7 @@ -Building Tomcat from CVS is very easy, and is the first step to contributing to +Building Tomcat from SVN is very easy, and is the first step to contributing to Tomcat. The following is a step by step TODO list. @@ -25,9 +25,10 @@ -Earlier releases would also work, but are harder to work with due to the need to -download additional dependencies. Tomcat also runs much faster on -the latest 1.4 JDK. +The default distribution of Tomcat 5.5.x requires a 5.0 or later JDK. Tomcat +can be built using a 1.4.x JDK but you will need to copy the contents of the +compat directory (created by the build process) to your build directory before +Tomcat will start. @@ -51,7 +52,7 @@ Unpack the binary distribution into a convenient location so that the Ant release resides in its own directory (conventionally named -"jakarta-ant-1.6.2"). For the purposes of the remainder of this document, +"apache-ant-1.6.x"). For the purposes of the remainder of this document, the symbolic name "${ant.home}" is used to refer to the full pathname of the release directory. @@ -91,7 +92,7 @@ -WARNING: Running this command will checkout the Tomcat 5 sources from CVS, as +WARNING: Running this command will checkout the Tomcat 5 sources from SVN, as well as download binaries to the /usr/share/java directory. Make sure this is appropriate to do so on your computer. On Windows, this usually corresponds to the C:\usr\share\java directory, @@ -157,7 +158,7 @@ Note that you must complete all the above steps to fetch the repositories and build some JAR files the first time. After you have completed the above steps, you can set up a -series of Eclipse 3 projects. +series of Eclipse 4 projects. Note that this will not let you build everything under Eclipse; the build process requires use of Ant for the many stages that aren't simple Java compilations. @@ -167,18 +168,19 @@ +Use Windows->Preferences and then Java->Build Path->Classpath +Variables to add a new Classpath variable called "TOMCAT_LIBS_BASE" and +set this to the base path where the binary dependencies have been +downloaded. Use File->New Project to create a new Java project for each of the binaries repository (e.g., /usr/share/java), -tomcat-connectors, tomcat-catalina, jasper, servletapi. +container, connectors, jasper, servletapi. Unless you thought ahead to make the ${tomcat.source} directory be under your Workspace folder, tell Eclipse the external location. -The obvious dependencies will be needed; the "repository" project -needs to export all its jars, and be referred to by the other projects. -Eclipse will find all source trees and jars, and -hopefully compile without problems -You will need to add ${ant-home}/lib/ant.jar as an "External Jar" -under Project Properties for some of these projects (notably those that fail -to compile for want of BuildException). +Eclipse .project and .classpath files are provided in each of these +directories so Eclipse should find all source trees and jars, and +hopefully compile without problems. Note that these +files assume you are using Eclipse with a 5.0 or later JDK. @@ -191,9 +193,9 @@ Note also that due to the way the Tomcat source is assembled -from several CVS projects, you may not be able to use the Eclipse -CVS client to update (nor to commit, if you are a committer). -Use the external CVS client of your choice, then use the +from several SVN projects, you may not be able to use the Eclipse +SVN client to update (nor to commit, if you are a committer). +Use the external SVN client of your choice, then use the Eclipse PackageExplorer or Navigator "Refresh" context menu item to tell Eclipse that you've updated the files. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r331870 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
Author: markt Date: Tue Nov 8 11:32:28 2005 New Revision: 331870 URL: http://svn.apache.org/viewcvs?rev=331870&view=rev Log: Simple part of fix for bug 37150 based on profiler output. Doesn't fix the major culprit. Needs more work. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java?rev=331870&r1=331869&r2=331870&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java Tue Nov 8 11:32:28 2005 @@ -424,9 +424,6 @@ // Temp. content file used to support partial PUT File contentFile = null; -// Input stream for temp. content file used to support partial PUT -FileInputStream contentFileInStream = null; - Range range = parseContentRange(req, resp); InputStream resourceInputStream = null; @@ -1161,8 +1158,11 @@ try { // Render the directory entries within this directory -DirContext directory = cacheEntry.context; NamingEnumeration enumeration = resources.list(cacheEntry.name); + +// rewriteUrl(contextPath) is expensive. cache result for later reuse +String rewrittenContextPath = rewriteUrl(contextPath); + while (enumeration.hasMoreElements()) { NameClassPair ncPair = (NameClassPair) enumeration.nextElement(); @@ -1184,7 +1184,7 @@ .append((childCacheEntry.context != null)?"dir":"file") .append("'"); sb.append(" urlPath='") - .append(rewriteUrl(contextPath)) + .append(rewrittenContextPath) .append(rewriteUrl(cacheEntry.name + resourceName)) .append((childCacheEntry.context != null)?"/":"") .append("'"); @@ -1273,6 +1273,9 @@ PrintWriter writer = new PrintWriter(osWriter); StringBuffer sb = new StringBuffer(); + +// rewriteUrl(contextPath) is expensive. cache result for later reuse +String rewrittenContextPath = rewriteUrl(contextPath); // Render the page header sb.append("\r\n"); @@ -1298,7 +1301,7 @@ if (slash >= 0) { String parent = name.substring(0, slash); sb.append(" - \r\n"); sb.append("
svn commit: r332127 - in /tomcat/container/tc5.5.x: catalina/src/conf/web.xml catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java webapps/docs/changelog.xml webapps/docs/default-servle
Author: markt Date: Wed Nov 9 11:50:47 2005 New Revision: 332127 URL: http://svn.apache.org/viewcvs?rev=332127&view=rev Log: Fix bug 37150. Turn off directory listings by default and add a warning to the docs. Modified: tomcat/container/tc5.5.x/catalina/src/conf/web.xml tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java tomcat/container/tc5.5.x/webapps/docs/changelog.xml tomcat/container/tc5.5.x/webapps/docs/default-servlet.xml Modified: tomcat/container/tc5.5.x/catalina/src/conf/web.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/conf/web.xml?rev=332127&r1=332126&r2=332127&view=diff == --- tomcat/container/tc5.5.x/catalina/src/conf/web.xml (original) +++ tomcat/container/tc5.5.x/catalina/src/conf/web.xml Wed Nov 9 11:50:47 2005 @@ -34,7 +34,10 @@ - + + + + @@ -74,7 +77,7 @@ listings -true +false 1 Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java?rev=332127&r1=332126&r2=332127&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java Wed Nov 9 11:50:47 2005 @@ -94,7 +94,7 @@ /** * Should we generate directory listings? */ -protected boolean listings = true; +protected boolean listings = false; /** Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=332127&r1=332126&r2=332127&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Wed Nov 9 11:50:47 2005 @@ -64,6 +64,10 @@ 37264: JNDI resources were no longer available when stopping listeners, submitted by Bogdan Calmac (remm) + +37150: Turn off directory listing by default and add a warning +regarding enabling listing of directories with many entries. (markt) + Modified: tomcat/container/tc5.5.x/webapps/docs/default-servlet.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/default-servlet.xml?rev=332127&r1=332126&r2=332127&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/default-servlet.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/default-servlet.xml Wed Nov 9 11:50:47 2005 @@ -89,6 +89,10 @@ value may be true or false Welcome files are part of the servlet api. + +WARNING: Listings of directories containing many entries are +expensive. Multiple requests for large directory listings can consume +significant proportions of server resources. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r332143 - in /tomcat/container/branches/tc5.0.x: catalina/src/conf/web.xml catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java webapps/docs/default-servlet.xml
Author: markt Date: Wed Nov 9 13:16:40 2005 New Revision: 332143 URL: http://svn.apache.org/viewcvs?rev=332143&view=rev Log: Port fix for 37150 to 5.0 branch in case there is another 5.0 release. Modified: tomcat/container/branches/tc5.0.x/catalina/src/conf/web.xml tomcat/container/branches/tc5.0.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java tomcat/container/branches/tc5.0.x/webapps/docs/default-servlet.xml Modified: tomcat/container/branches/tc5.0.x/catalina/src/conf/web.xml URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc5.0.x/catalina/src/conf/web.xml?rev=332143&r1=332142&r2=332143&view=diff == --- tomcat/container/branches/tc5.0.x/catalina/src/conf/web.xml (original) +++ tomcat/container/branches/tc5.0.x/catalina/src/conf/web.xml Wed Nov 9 13:16:40 2005 @@ -31,7 +31,10 @@ - + + + + @@ -68,7 +71,7 @@ listings -true +false 1 Modified: tomcat/container/branches/tc5.0.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc5.0.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java?rev=332143&r1=332142&r2=332143&view=diff == --- tomcat/container/branches/tc5.0.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java (original) +++ tomcat/container/branches/tc5.0.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java Wed Nov 9 13:16:40 2005 @@ -98,7 +98,7 @@ /** * Should we generate directory listings? */ -protected boolean listings = true; +protected boolean listings = false; /** Modified: tomcat/container/branches/tc5.0.x/webapps/docs/default-servlet.xml URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc5.0.x/webapps/docs/default-servlet.xml?rev=332143&r1=332142&r2=332143&view=diff == --- tomcat/container/branches/tc5.0.x/webapps/docs/default-servlet.xml (original) +++ tomcat/container/branches/tc5.0.x/webapps/docs/default-servlet.xml Wed Nov 9 13:16:40 2005 @@ -89,6 +89,10 @@ value may be true or false Welcome files are part of the servlet api. + +WARNING: Listings of directories containing many entries are +expensive. Multiple requests for large directory listings can consume +significant proportions of server resources. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r332159 - in /tomcat/container/branches/tc4.1.x/catalina/src: conf/web.xml share/org/apache/catalina/servlets/DefaultServlet.java
Author: markt Date: Wed Nov 9 14:14:33 2005 New Revision: 332159 URL: http://svn.apache.org/viewcvs?rev=332159&view=rev Log: Port of fix for Bug37150 to TC4. Modified: tomcat/container/branches/tc4.1.x/catalina/src/conf/web.xml tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java Modified: tomcat/container/branches/tc4.1.x/catalina/src/conf/web.xml URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/conf/web.xml?rev=332159&r1=332158&r2=332159&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/conf/web.xml (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/conf/web.xml Wed Nov 9 14:14:33 2005 @@ -34,7 +34,10 @@ - + + + + @@ -57,7 +60,7 @@ listings -true +false 1 Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java?rev=332159&r1=332158&r2=332159&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java Wed Nov 9 14:14:33 2005 @@ -93,7 +93,7 @@ /** * Should we generate directory listings when no welcome file is present? */ -protected boolean listings = true; +protected boolean listings = false; /** @@ -552,9 +552,6 @@ File contentFile = null; // Input stream for temp. content file used to support partial PUT -FileInputStream contentFileInStream = null; - -ResourceInfo resourceInfo = new ResourceInfo(path, resources); Range range = parseContentRange(req, resp); InputStream resourceInputStream = null; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r332846 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
Author: markt Date: Sat Nov 12 13:55:40 2005 New Revision: 332846 URL: http://svn.apache.org/viewcvs?rev=332846&view=rev Log: Tidy up CGIServlet Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java?rev=332846&r1=332845&r2=332846&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Sat Nov 12 13:55:40 2005 @@ -246,9 +246,6 @@ /* some vars below copied from Craig R. McClanahan's InvokerServlet */ -/** the Context container associated with our web application. */ -private ServletContext context = null; - /** the debugging detail level for this servlet. */ private int debug = 0; @@ -322,6 +319,7 @@ } catch (IOException ioe) { ServletException e = new ServletException( "Unable to read shell environment variables", ioe); +throw e; } } @@ -335,9 +333,6 @@ parameterEncoding = value; } -// Identify the internal container resources we need -context = config.getServletContext(); - } @@ -1888,7 +1883,6 @@ */ protected String getPostInput(ArrayList params) { -String lineSeparator = System.getProperty("line.separator"); StringBuffer qs = new StringBuffer(""); for (int i=0; i < params.size(); i++) { NameValuePair nvp = (NameValuePair) this.params.get(i); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r333073 - /tomcat/build/tc5.5.x/resources/build.xml
Author: markt Date: Sun Nov 13 09:28:21 2005 New Revision: 333073 URL: http://svn.apache.org/viewcvs?rev=333073&view=rev Log: Use current/tc5.5.x to do the checkout Remove commons-daemon source checkout as we now use the official release. Modified: tomcat/build/tc5.5.x/resources/build.xml Modified: tomcat/build/tc5.5.x/resources/build.xml URL: http://svn.apache.org/viewcvs/tomcat/build/tc5.5.x/resources/build.xml?rev=333073&r1=333072&r2=333073&view=diff == --- tomcat/build/tc5.5.x/resources/build.xml (original) +++ tomcat/build/tc5.5.x/resources/build.xml Sun Nov 13 09:28:21 2005 @@ -17,7 +17,7 @@ - + http://svn.apache.org/repos/asf/"; /> @@ -28,14 +28,7 @@ - - - - - - - - + - @@ -75,34 +68,11 @@ message="If the checkout fails, - todo - " /> - - - - - - - - - - - - - - - - - + - - - - - - @@ -112,22 +82,9 @@ - - - - - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r344236 - /tomcat/container/branches/tc4.1.x/catalina/src/conf/web.xml
Author: markt Date: Mon Nov 14 13:18:52 2005 New Revision: 344236 URL: http://svn.apache.org/viewcvs?rev=344236&view=rev Log: Align settings with defaults. Modified: tomcat/container/branches/tc4.1.x/catalina/src/conf/web.xml Modified: tomcat/container/branches/tc4.1.x/catalina/src/conf/web.xml URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/conf/web.xml?rev=344236&r1=344235&r2=344236&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/conf/web.xml (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/conf/web.xml Mon Nov 14 13:18:52 2005 @@ -261,7 +261,7 @@ org.apache.catalina.servlets.CGIServlet debug - 6 + 0 cgiPathPrefix - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r344239 - /tomcat/container/tc5.5.x/catalina/src/conf/web.xml
Author: markt Date: Mon Nov 14 13:25:53 2005 New Revision: 344239 URL: http://svn.apache.org/viewcvs?rev=344239&view=rev Log: Align config with defaults Modified: tomcat/container/tc5.5.x/catalina/src/conf/web.xml Modified: tomcat/container/tc5.5.x/catalina/src/conf/web.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/conf/web.xml?rev=344239&r1=344238&r2=344239&view=diff == --- tomcat/container/tc5.5.x/catalina/src/conf/web.xml (original) +++ tomcat/container/tc5.5.x/catalina/src/conf/web.xml Mon Nov 14 13:25:53 2005 @@ -311,7 +311,7 @@ org.apache.catalina.servlets.CGIServlet debug - 6 + 0 cgiPathPrefix - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r344456 - /tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java
Author: markt Date: Tue Nov 15 14:45:34 2005 New Revision: 344456 URL: http://svn.apache.org/viewcvs?rev=344456&view=rev Log: Fix infinite recursion when calling EL function in same taglib from tabfile (bug 35276) - Patch provided by Kin-man Modified: tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java Modified: tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java?rev=344456&r1=344455&r2=344456&view=diff == --- tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java (original) +++ tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java Tue Nov 15 14:45:34 2005 @@ -459,7 +459,7 @@ private void processChars() throws SAXException { -if (charBuffer == null) { +if (charBuffer == null || directivesOnly) { return; } @@ -758,6 +758,11 @@ public void startPrefixMapping(String prefix, String uri) throws SAXException { TagLibraryInfo taglibInfo; + +if (directivesOnly && !(JSP_URI.equals(uri))) { +return; +} + try { taglibInfo = getTaglibInfo(prefix, uri); } catch (JasperException je) { @@ -781,6 +786,14 @@ * Receives notification of the end of a Namespace mapping. */ public void endPrefixMapping(String prefix) throws SAXException { + +if (directivesOnly) { +String uri = pageInfo.getURI(prefix); +if (!JSP_URI.equals(uri)) { +return; +} +} + pageInfo.popPrefixMapping(prefix); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r345597 - in /tomcat/site/trunk: docs/lists.html xdocs/lists.xml
Author: markt Date: Fri Nov 18 15:16:31 2005 New Revision: 345597 URL: http://svn.apache.org/viewcvs?rev=345597&view=rev Log: Fix MARC links. Add actual posting addresses to hopefully stop people sending messages to the owner address asking how to post once they have subscribed. Modified: tomcat/site/trunk/docs/lists.html tomcat/site/trunk/xdocs/lists.xml Modified: tomcat/site/trunk/docs/lists.html URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/docs/lists.html?rev=345597&r1=345596&r2=345597&view=diff == --- tomcat/site/trunk/docs/lists.html (original) +++ tomcat/site/trunk/docs/lists.html Fri Nov 18 15:16:31 2005 @@ -187,7 +187,7 @@ -User support and discussion +User support and discussion Development mailing list and source change reports @@ -253,6 +253,13 @@ + Posting questions to the list: + +mailto:users@tomcat.apache.org";> + users@tomcat.apache.org + + + Getting help with the list: mailto:[EMAIL PROTECTED]"> @@ -263,7 +270,7 @@ Archives: http://mail-archives.apache.org";>at Apache, -http://marc.theaimsgroup.com/?l=apache-tomcat-user";>at MARC. +http://marc.theaimsgroup.com/?l=tomcat-user";>at MARC. @@ -325,6 +332,13 @@ + Posting questions to the list: + +mailto:dev@tomcat.apache.org";> + dev@tomcat.apache.org + + + Unsubscription addresses: mailto:[EMAIL PROTECTED]"> @@ -344,7 +358,7 @@ Searchable Archives: http://mail-archives.apache.org/mod_mbox/tomcat-dev/";>at Apache, -http://marc.theaimsgroup.com/?l=apache-tomcat-dev";>at MARC. +http://marc.theaimsgroup.com/?l=tomcat-dev";>at MARC. Modified: tomcat/site/trunk/xdocs/lists.xml URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/xdocs/lists.xml?rev=345597&r1=345596&r2=345597&view=diff == --- tomcat/site/trunk/xdocs/lists.xml (original) +++ tomcat/site/trunk/xdocs/lists.xml Fri Nov 18 15:16:31 2005 @@ -23,7 +23,7 @@ to access most of the lists with a news reader. - User support and discussion + User support and discussion Development mailing list and source change reports @@ -61,6 +61,11 @@ [EMAIL PROTECTED] + Posting questions to the list: + mailto:users@tomcat.apache.org";> + users@tomcat.apache.org + + Getting help with the list: mailto:[EMAIL PROTECTED]"> [EMAIL PROTECTED] @@ -69,7 +74,7 @@ Archives: http://mail-archives.apache.org";>at Apache, -http://marc.theaimsgroup.com/?l=apache-tomcat-user";>at MARC. +http://marc.theaimsgroup.com/?l=tomcat-user";>at MARC. @@ -107,6 +112,11 @@ [EMAIL PROTECTED] + Posting questions to the list: + mailto:dev@tomcat.apache.org";> + dev@tomcat.apache.org + + Unsubscription addresses: mailto:[EMAIL PROTECTED]"> [EMAIL PROTECTED] @@ -122,7 +132,7 @@ Searchable Archives: http://mail-archives.apache.org/mod_mbox/tomcat-dev/";>at Apache, -http://marc.theaimsgroup.com/?l=apache-tomcat-dev";>at MARC. +http://marc.theaimsgroup.com/?l=tomcat-dev";>at MARC. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r349305 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/ssi/SSIServletExternalResolver.java
Author: markt Date: Sun Nov 27 12:41:41 2005 New Revision: 349305 URL: http://svn.apache.org/viewcvs?rev=349305&view=rev Log: Fix SSI so it works when getContext() requires an exact context path Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/ssi/SSIServletExternalResolver.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/ssi/SSIServletExternalResolver.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/ssi/SSIServletExternalResolver.java?rev=349305&r1=349304&r2=349305&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/ssi/SSIServletExternalResolver.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/ssi/SSIServletExternalResolver.java Sun Nov 27 12:41:41 2005 @@ -347,12 +347,12 @@ } -protected String getPathWithoutContext(String servletPath) { +protected String getPathWithoutContext(String contextPath, String servletPath) { String retVal = null; -int secondSlash = servletPath.indexOf('/', 1); -if (secondSlash >= 0) { + +if (contextPath.length() >= 0) { //cut off context -retVal = servletPath.substring(secondSlash); +retVal = servletPath.substring(contextPath.length()); } return retVal; } @@ -403,17 +403,19 @@ if (isVirtualWebappRelative) { return new ServletContextAndPath(context, normalized); } else { -ServletContext normContext = context.getContext(normalized); -if (normContext == null) { +String contextPath = getContextPath(normalized); +if (contextPath == null) { throw new IOException("Couldn't get context for path: " + normalized); } +ServletContext normContext = context.getContext(contextPath); + //If it's the root context, then there is no context element // to remove, // ie: // '/file1.shtml' vs '/appName1/file1.shtml' if (!isRootContext(normContext)) { -String noContext = getPathWithoutContext(normalized); +String noContext = getPathWithoutContext(contextPath, normalized); if (noContext == null) { throw new IOException( "Couldn't remove context from path: " @@ -427,17 +429,38 @@ } } +// Looks for the longest matching context path +protected String getContextPath(String uri) { +String candidatePath = uri; +ServletContext contextFound = null; +String result = null; + +while (true) { +contextFound = context.getContext(candidatePath); +if (contextFound != null) { +result = candidatePath; +break; +} + +int slash = candidatePath.lastIndexOf('/'); +if (slash < 0) +break; + +candidatePath = candidatePath.substring(0, slash); +} +return result; +} //Assumes servletContext is not-null //Assumes that identity comparison will be true for the same context -//Assuming the above, getContext("/") will be non-null as long as the root +//Assuming the above, getContext("") will be non-null as long as the root // context is // accessible. //If it isn't, then servletContext can't be the root context anyway, hence // they will // not match. protected boolean isRootContext(ServletContext servletContext) { -return servletContext == servletContext.getContext("/"); +return servletContext == servletContext.getContext(""); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r349308 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/ssi/SSIServletExternalResolver.java
Author: markt Date: Sun Nov 27 12:52:55 2005 New Revision: 349308 URL: http://svn.apache.org/viewcvs?rev=349308&view=rev Log: Just spotted a complication. Reverting previous change until it is resolved. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/ssi/SSIServletExternalResolver.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/ssi/SSIServletExternalResolver.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/ssi/SSIServletExternalResolver.java?rev=349308&r1=349307&r2=349308&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/ssi/SSIServletExternalResolver.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/ssi/SSIServletExternalResolver.java Sun Nov 27 12:52:55 2005 @@ -347,12 +347,12 @@ } -protected String getPathWithoutContext(String contextPath, String servletPath) { +protected String getPathWithoutContext(String servletPath) { String retVal = null; - -if (contextPath.length() >= 0) { +int secondSlash = servletPath.indexOf('/', 1); +if (secondSlash >= 0) { //cut off context -retVal = servletPath.substring(contextPath.length()); +retVal = servletPath.substring(secondSlash); } return retVal; } @@ -403,19 +403,17 @@ if (isVirtualWebappRelative) { return new ServletContextAndPath(context, normalized); } else { -String contextPath = getContextPath(normalized); -if (contextPath == null) { +ServletContext normContext = context.getContext(normalized); +if (normContext == null) { throw new IOException("Couldn't get context for path: " + normalized); } -ServletContext normContext = context.getContext(contextPath); - //If it's the root context, then there is no context element // to remove, // ie: // '/file1.shtml' vs '/appName1/file1.shtml' if (!isRootContext(normContext)) { -String noContext = getPathWithoutContext(contextPath, normalized); +String noContext = getPathWithoutContext(normalized); if (noContext == null) { throw new IOException( "Couldn't remove context from path: " @@ -429,38 +427,17 @@ } } -// Looks for the longest matching context path -protected String getContextPath(String uri) { -String candidatePath = uri; -ServletContext contextFound = null; -String result = null; - -while (true) { -contextFound = context.getContext(candidatePath); -if (contextFound != null) { -result = candidatePath; -break; -} - -int slash = candidatePath.lastIndexOf('/'); -if (slash < 0) -break; - -candidatePath = candidatePath.substring(0, slash); -} -return result; -} //Assumes servletContext is not-null //Assumes that identity comparison will be true for the same context -//Assuming the above, getContext("") will be non-null as long as the root +//Assuming the above, getContext("/") will be non-null as long as the root // context is // accessible. //If it isn't, then servletContext can't be the root context anyway, hence // they will // not match. protected boolean isRootContext(ServletContext servletContext) { -return servletContext == servletContext.getContext(""); +return servletContext == servletContext.getContext("/"); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r349829 - in /tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF: classes/org/apache/webapp/admin/filters/SetCharacterEncodingFilter.java web.xml
Author: markt Date: Tue Nov 29 15:13:49 2005 New Revision: 349829 URL: http://svn.apache.org/viewcvs?rev=349829&view=rev Log: Align package name with directory structure. Modified: tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/filters/SetCharacterEncodingFilter.java tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/web.xml Modified: tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/filters/SetCharacterEncodingFilter.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/filters/SetCharacterEncodingFilter.java?rev=349829&r1=349828&r2=349829&view=diff == --- tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/filters/SetCharacterEncodingFilter.java (original) +++ tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/filters/SetCharacterEncodingFilter.java Tue Nov 29 15:13:49 2005 @@ -15,7 +15,7 @@ */ -package filters; +package org.apache.webapp.admin.filters; import java.io.IOException; Modified: tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/web.xml URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/web.xml?rev=349829&r1=349828&r2=349829&view=diff == --- tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/web.xml (original) +++ tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/web.xml Tue Nov 29 15:13:49 2005 @@ -18,7 +18,7 @@
svn commit: r350056 - /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java
Author: markt Date: Wed Nov 30 13:31:50 2005 New Revision: 350056 URL: http://svn.apache.org/viewcvs?rev=350056&view=rev Log: Fix bug 17970. Use of multi-level contexts could result in multiple deployment attempts. This patch is a sticking plaster. If TC4 was less mature I would port Remy's changes from TC5. This patch based based on one submitted by Richard June. Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java?rev=350056&r1=350055&r2=350056&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java Wed Nov 30 13:31:50 2005 @@ -27,6 +27,7 @@ import javax.naming.NamingException; import javax.naming.directory.DirContext; import org.apache.naming.resources.ResourceAttributes; +import org.apache.catalina.Container; import org.apache.catalina.Context; import org.apache.catalina.Deployer; import org.apache.catalina.Host; @@ -37,6 +38,7 @@ import org.apache.catalina.Logger; import org.apache.catalina.core.StandardHost; import org.apache.catalina.util.StringManager; +import org.apache.commons.digester.Digester; /** @@ -62,6 +64,12 @@ /** + * The Context that was added via a call to + * addChild() while parsing the configuration descriptor. + */ +private Context context = null; + +/** * The Java class name of the Context implementation we should use. */ protected String contextClass = "org.apache.catalina.core.StandardContext"; @@ -81,6 +89,15 @@ /** + * The Digester instance to use for parsing web application + * deployment descriptors. WARNING - Usage of this + * instance must be appropriately synchronized to prevent simultaneous + * access by multiple threads. + */ +private Digester digester = null; + + +/** * The Host we are associated with. */ protected Host host = null; @@ -382,6 +399,10 @@ String contextPath = "/" + file; if (file.equals("ROOT")) { contextPath = ""; +} else { + String path = getContextPath(dir); + if (path != null) + contextPath = path; } if (host.findChild(contextPath) != null) { continue; @@ -404,6 +425,74 @@ } + +/** + * Get the path from a context defined by an XML context descriptor. + */ +protected synchronized String getContextPath(File configFile) { +InputStream stream = null; +String contextPath = null; +try { +URL config = new URL("file", null, configFile.getCanonicalPath()); +stream = config.openStream(); +Digester digester = createDigester(); +digester.setDebug(getDebug()); +digester.clear(); +digester.push(this); +digester.parse(stream); +stream.close(); +stream = null; +if (context !=null) { + contextPath = context.getPath(); +} +} catch (Exception e) { + log( "Parse exception :", e ); + return null; +} finally { +if (stream != null) { +try { +stream.close(); +} catch (Throwable t) { +; +} +} + digester.push(null); +context = null; +} +return contextPath; +} + + +/** + * Create (if necessary) and return a Digester configured to process the + * context configuration descriptor for an application. + */ +protected Digester createDigester() { + +if (digester == null) { +digester = new Digester(); +digester.setValidating(false); +digester.addRuleSet(new ContextRuleSet("")); +digester.addRuleSet(new NamingRuleSet("Context/")); +} +return (digester); +} + + +/** + * Used by digester to add a context in [EMAIL PROTECTED] getContextPath}. + */ +public void addChild(Container child) { +context = (Context) child; +} + + +/** + * Delegate a request for the parent class loader to our associated Host. + */ +public ClassLoader getParentClas
svn commit: r350299 - in /tomcat/jasper/tags: 5.5.x/ tc5.5.x/
Author: markt Date: Thu Dec 1 11:20:29 2005 New Revision: 350299 URL: http://svn.apache.org/viewcvs?rev=350299&view=rev Log: Align directory names with rest of repo. Added: tomcat/jasper/tags/tc5.5.x/ - copied from r350298, tomcat/jasper/tags/5.5.x/ Removed: tomcat/jasper/tags/5.5.x/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r350301 - in /tomcat/jasper/tags: 5.0.x/ tc5.0.x/
Author: markt Date: Thu Dec 1 11:20:54 2005 New Revision: 350301 URL: http://svn.apache.org/viewcvs?rev=350301&view=rev Log: Align directory names with rest of repo. Added: tomcat/jasper/tags/tc5.0.x/ - copied from r350300, tomcat/jasper/tags/5.0.x/ Removed: tomcat/jasper/tags/5.0.x/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r350303 - in /tomcat/jasper/tags: 4.1.x/ tc4.1.x/
Author: markt Date: Thu Dec 1 11:21:14 2005 New Revision: 350303 URL: http://svn.apache.org/viewcvs?rev=350303&view=rev Log: Align directory names with rest of repo. Added: tomcat/jasper/tags/tc4.1.x/ - copied from r350302, tomcat/jasper/tags/4.1.x/ Removed: tomcat/jasper/tags/4.1.x/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r351975 - /tomcat/connectors/trunk/KEYS
Author: markt Date: Sat Dec 3 08:20:55 2005 New Revision: 351975 URL: http://svn.apache.org/viewcvs?rev=351975&view=rev Log: Add my key. Modified: tomcat/connectors/trunk/KEYS Modified: tomcat/connectors/trunk/KEYS URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/KEYS?rev=351975&r1=351974&r2=351975&view=diff == --- tomcat/connectors/trunk/KEYS (original) +++ tomcat/connectors/trunk/KEYS Sat Dec 3 08:20:55 2005 @@ -401,3 +401,40 @@ eu3RL84AoMcX7B/EsPMLGyhBvB6whQAqBvse =s/wJ -END PGP PUBLIC KEY BLOCK- + +pub 1024D/33C60243 2004-09-12 Mark E D Thomas <[EMAIL PROTECTED]> + Key fingerprint = DCFD 35E0 BF8C A734 4752 DE8B 6FB2 1E89 33C6 0243 +sig 33C60243 2004-09-12 Mark E D Thomas <[EMAIL PROTECTED]> +sub 2048g/0BECE548 2004-09-12 +sig 33C60243 2004-09-12 Mark E D Thomas <[EMAIL PROTECTED]> + +-BEGIN PGP PUBLIC KEY BLOCK- +Version: GnuPG v1.2.1 (MingW32) + +mQGiBEFEjegRBADocGttfROvtLGrTOW3xRqZHmFWybmEaI6jmnRdN/1gGXmb3wQL +rHsS3fLFIIOYLPph0Kov9q4qNq36LekShIvjMBDFoj2/wRxaUtFq81asaRZg8Mcw +4kVeIoe8OIOuWmvYhU8SH2jJNUnVVrpTPAa6QWquTmseNi6UJMjLxuL7DwCg//9u +k2yj0vk6e4WSO6Fe5+EkQDED/AjQsy0kj9TpNHkKSSUR2evRlWPYA0YtxBSbsgON +tT0cYipAp5IcYt6Zq5QzHiZreyQXLAjItDS2oGCIXfNbTYJ3kxxJTCU/3wlefVdq +LBh4ttm7gmWaiTDTgG4axLF5oMpAb3m4v6s1KvXVVj2pqkhBknfuoRh1wPqbtwks +7HOIBADVezl1/vny5YzdoqsDx1ByXMLi7CuMexQPllhRbdN+an+ZiJ5YP8J9rPdl +NCELsCCcDKLGLjlp43XfMxsgYAPEZNG2ObjKTarhk3uGYN3aJrx7s+G+c2bu8o2n +SyAFQ1iDsjS87PgSPCONA2/36ZShmv1OjLWz5Vo7hGSPcW4ZdLQiTWFyayBFIEQg +VGhvbWFzIDxtYXJrdEBhcGFjaGUub3JnPohdBBARAgAdBQJBRI3oBwsJCAcDAgoC +GQEFGwMFHgEACgkQb7IeiTPGAkOkvgCg0AcTAfe8m2ZSWkbsoqplLDsM +0+oAoNl4EjXT+T2j2z8jdUYPaA8LztJguQINBEFEjekQCAD2Qle3CH8IF3Kiutap +QvMF6PlTETlPtvFuuUs4INoBp1ajFOmPQFXz0AfGy0OplK33TGSGSfgMg71l6RfU +odNQ+PVZX9x2Uk89PY3bzpnhV5JZzf24rnRPxfx2vIPFRzBhznzJZv8V+bv9kV7H +AarTW56NoKVyOtQa8L9GAFgr5fSI/VhOSdvNILSd5JEHNmszbDgNRR0PfIizHHxb +LY7288kjwEPwpVsYjY67VYy4XTjTNP18F1dDox0YbN4zISy1Kv884bEpQBgRjXyE +pwpy1obEAxnIByl6ypUM2Zafq9AKUJsCRtMIPWakXUGfnHy9iUsiGSa6q6Jew1Xp +Mgs7AAICCACuLSE3vBSOeTMM04ezuPt4zZUp0PFQGQL3bzuZp24f18S8P3BemGAk +2V3HZYJmzmNgd4L0vIC9xyFduICFgbiV9uyzKPwHvCgQwaupFvFLGn7Q9LJ0nlaw +GN7Km13vJTG3rrT/UMKwLTk+IMEYQwUgBht6HTnBaM+UqVx/eB4PHobimt5Redz9 +CnT4DrlA0M6Oh3ePWBD69Nnhwo2AN42dX/W2KcnDe2iRNu/JEbOYsssj0e3VmHwE +mwa064TpQpw1fClyW7sf4aWOcQvcT12R0hNvRhTR1TV0pzjIMkbRPkRezhIY55AT +TIfcaZrw+Yubmmw/pp/1wIDRzHexOq9riEwEGBECAAwFAkFEjekFGwwACgkQ +b7IeiTPGAkN8ogCg4tHmgylXw4Y3ujF+J4cf2ollGa0AnRkyX8X+u/NrMi2g2xhE +vpsTbAGW +=r1gT +-END PGP PUBLIC KEY BLOCK- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r351976 - /tomcat/container/branches/tc4.1.x/KEYS
Author: markt Date: Sat Dec 3 08:21:35 2005 New Revision: 351976 URL: http://svn.apache.org/viewcvs?rev=351976&view=rev Log: Add my key. Modified: tomcat/container/branches/tc4.1.x/KEYS Modified: tomcat/container/branches/tc4.1.x/KEYS URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/KEYS?rev=351976&r1=351975&r2=351976&view=diff == --- tomcat/container/branches/tc4.1.x/KEYS (original) +++ tomcat/container/branches/tc4.1.x/KEYS Sat Dec 3 08:21:35 2005 @@ -235,3 +235,40 @@ c/z21YATczEUCU140ng+rG2hyw== =MJPg -END PGP PUBLIC KEY BLOCK- + +pub 1024D/33C60243 2004-09-12 Mark E D Thomas <[EMAIL PROTECTED]> + Key fingerprint = DCFD 35E0 BF8C A734 4752 DE8B 6FB2 1E89 33C6 0243 +sig 33C60243 2004-09-12 Mark E D Thomas <[EMAIL PROTECTED]> +sub 2048g/0BECE548 2004-09-12 +sig 33C60243 2004-09-12 Mark E D Thomas <[EMAIL PROTECTED]> + +-BEGIN PGP PUBLIC KEY BLOCK- +Version: GnuPG v1.2.1 (MingW32) + +mQGiBEFEjegRBADocGttfROvtLGrTOW3xRqZHmFWybmEaI6jmnRdN/1gGXmb3wQL +rHsS3fLFIIOYLPph0Kov9q4qNq36LekShIvjMBDFoj2/wRxaUtFq81asaRZg8Mcw +4kVeIoe8OIOuWmvYhU8SH2jJNUnVVrpTPAa6QWquTmseNi6UJMjLxuL7DwCg//9u +k2yj0vk6e4WSO6Fe5+EkQDED/AjQsy0kj9TpNHkKSSUR2evRlWPYA0YtxBSbsgON +tT0cYipAp5IcYt6Zq5QzHiZreyQXLAjItDS2oGCIXfNbTYJ3kxxJTCU/3wlefVdq +LBh4ttm7gmWaiTDTgG4axLF5oMpAb3m4v6s1KvXVVj2pqkhBknfuoRh1wPqbtwks +7HOIBADVezl1/vny5YzdoqsDx1ByXMLi7CuMexQPllhRbdN+an+ZiJ5YP8J9rPdl +NCELsCCcDKLGLjlp43XfMxsgYAPEZNG2ObjKTarhk3uGYN3aJrx7s+G+c2bu8o2n +SyAFQ1iDsjS87PgSPCONA2/36ZShmv1OjLWz5Vo7hGSPcW4ZdLQiTWFyayBFIEQg +VGhvbWFzIDxtYXJrdEBhcGFjaGUub3JnPohdBBARAgAdBQJBRI3oBwsJCAcDAgoC +GQEFGwMFHgEACgkQb7IeiTPGAkOkvgCg0AcTAfe8m2ZSWkbsoqplLDsM +0+oAoNl4EjXT+T2j2z8jdUYPaA8LztJguQINBEFEjekQCAD2Qle3CH8IF3Kiutap +QvMF6PlTETlPtvFuuUs4INoBp1ajFOmPQFXz0AfGy0OplK33TGSGSfgMg71l6RfU +odNQ+PVZX9x2Uk89PY3bzpnhV5JZzf24rnRPxfx2vIPFRzBhznzJZv8V+bv9kV7H +AarTW56NoKVyOtQa8L9GAFgr5fSI/VhOSdvNILSd5JEHNmszbDgNRR0PfIizHHxb +LY7288kjwEPwpVsYjY67VYy4XTjTNP18F1dDox0YbN4zISy1Kv884bEpQBgRjXyE +pwpy1obEAxnIByl6ypUM2Zafq9AKUJsCRtMIPWakXUGfnHy9iUsiGSa6q6Jew1Xp +Mgs7AAICCACuLSE3vBSOeTMM04ezuPt4zZUp0PFQGQL3bzuZp24f18S8P3BemGAk +2V3HZYJmzmNgd4L0vIC9xyFduICFgbiV9uyzKPwHvCgQwaupFvFLGn7Q9LJ0nlaw +GN7Km13vJTG3rrT/UMKwLTk+IMEYQwUgBht6HTnBaM+UqVx/eB4PHobimt5Redz9 +CnT4DrlA0M6Oh3ePWBD69Nnhwo2AN42dX/W2KcnDe2iRNu/JEbOYsssj0e3VmHwE +mwa064TpQpw1fClyW7sf4aWOcQvcT12R0hNvRhTR1TV0pzjIMkbRPkRezhIY55AT +TIfcaZrw+Yubmmw/pp/1wIDRzHexOq9riEwEGBECAAwFAkFEjekFGwwACgkQ +b7IeiTPGAkN8ogCg4tHmgylXw4Y3ujF+J4cf2ollGa0AnRkyX8X+u/NrMi2g2xhE +vpsTbAGW +=r1gT +-END PGP PUBLIC KEY BLOCK- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r351977 - /tomcat/build/tc5.5.x/KEYS
Author: markt Date: Sat Dec 3 08:21:59 2005 New Revision: 351977 URL: http://svn.apache.org/viewcvs?rev=351977&view=rev Log: Add my key. Modified: tomcat/build/tc5.5.x/KEYS Modified: tomcat/build/tc5.5.x/KEYS URL: http://svn.apache.org/viewcvs/tomcat/build/tc5.5.x/KEYS?rev=351977&r1=351976&r2=351977&view=diff == --- tomcat/build/tc5.5.x/KEYS (original) +++ tomcat/build/tc5.5.x/KEYS Sat Dec 3 08:21:59 2005 @@ -255,3 +255,40 @@ fUJh7ACdE7QuMkzSbxEzTXnbkS61AUPy06QAoI5b613vrWeqg5Gz9C7TzG+FEEoh =O17Z -END PGP PUBLIC KEY BLOCK- + +pub 1024D/33C60243 2004-09-12 Mark E D Thomas <[EMAIL PROTECTED]> + Key fingerprint = DCFD 35E0 BF8C A734 4752 DE8B 6FB2 1E89 33C6 0243 +sig 33C60243 2004-09-12 Mark E D Thomas <[EMAIL PROTECTED]> +sub 2048g/0BECE548 2004-09-12 +sig 33C60243 2004-09-12 Mark E D Thomas <[EMAIL PROTECTED]> + +-BEGIN PGP PUBLIC KEY BLOCK- +Version: GnuPG v1.2.1 (MingW32) + +mQGiBEFEjegRBADocGttfROvtLGrTOW3xRqZHmFWybmEaI6jmnRdN/1gGXmb3wQL +rHsS3fLFIIOYLPph0Kov9q4qNq36LekShIvjMBDFoj2/wRxaUtFq81asaRZg8Mcw +4kVeIoe8OIOuWmvYhU8SH2jJNUnVVrpTPAa6QWquTmseNi6UJMjLxuL7DwCg//9u +k2yj0vk6e4WSO6Fe5+EkQDED/AjQsy0kj9TpNHkKSSUR2evRlWPYA0YtxBSbsgON +tT0cYipAp5IcYt6Zq5QzHiZreyQXLAjItDS2oGCIXfNbTYJ3kxxJTCU/3wlefVdq +LBh4ttm7gmWaiTDTgG4axLF5oMpAb3m4v6s1KvXVVj2pqkhBknfuoRh1wPqbtwks +7HOIBADVezl1/vny5YzdoqsDx1ByXMLi7CuMexQPllhRbdN+an+ZiJ5YP8J9rPdl +NCELsCCcDKLGLjlp43XfMxsgYAPEZNG2ObjKTarhk3uGYN3aJrx7s+G+c2bu8o2n +SyAFQ1iDsjS87PgSPCONA2/36ZShmv1OjLWz5Vo7hGSPcW4ZdLQiTWFyayBFIEQg +VGhvbWFzIDxtYXJrdEBhcGFjaGUub3JnPohdBBARAgAdBQJBRI3oBwsJCAcDAgoC +GQEFGwMFHgEACgkQb7IeiTPGAkOkvgCg0AcTAfe8m2ZSWkbsoqplLDsM +0+oAoNl4EjXT+T2j2z8jdUYPaA8LztJguQINBEFEjekQCAD2Qle3CH8IF3Kiutap +QvMF6PlTETlPtvFuuUs4INoBp1ajFOmPQFXz0AfGy0OplK33TGSGSfgMg71l6RfU +odNQ+PVZX9x2Uk89PY3bzpnhV5JZzf24rnRPxfx2vIPFRzBhznzJZv8V+bv9kV7H +AarTW56NoKVyOtQa8L9GAFgr5fSI/VhOSdvNILSd5JEHNmszbDgNRR0PfIizHHxb +LY7288kjwEPwpVsYjY67VYy4XTjTNP18F1dDox0YbN4zISy1Kv884bEpQBgRjXyE +pwpy1obEAxnIByl6ypUM2Zafq9AKUJsCRtMIPWakXUGfnHy9iUsiGSa6q6Jew1Xp +Mgs7AAICCACuLSE3vBSOeTMM04ezuPt4zZUp0PFQGQL3bzuZp24f18S8P3BemGAk +2V3HZYJmzmNgd4L0vIC9xyFduICFgbiV9uyzKPwHvCgQwaupFvFLGn7Q9LJ0nlaw +GN7Km13vJTG3rrT/UMKwLTk+IMEYQwUgBht6HTnBaM+UqVx/eB4PHobimt5Redz9 +CnT4DrlA0M6Oh3ePWBD69Nnhwo2AN42dX/W2KcnDe2iRNu/JEbOYsssj0e3VmHwE +mwa064TpQpw1fClyW7sf4aWOcQvcT12R0hNvRhTR1TV0pzjIMkbRPkRezhIY55AT +TIfcaZrw+Yubmmw/pp/1wIDRzHexOq9riEwEGBECAAwFAkFEjekFGwwACgkQ +b7IeiTPGAkN8ogCg4tHmgylXw4Y3ujF+J4cf2ollGa0AnRkyX8X+u/NrMi2g2xhE +vpsTbAGW +=r1gT +-END PGP PUBLIC KEY BLOCK- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r353881 - /tomcat/container/branches/tc4.1.x/build.xml
Author: markt Date: Sun Dec 4 10:29:25 2005 New Revision: 353881 URL: http://svn.apache.org/viewcvs?rev=353881&view=rev Log: Update to remove all references to Jasper 1. Modified: tomcat/container/branches/tc4.1.x/build.xml Modified: tomcat/container/branches/tc4.1.x/build.xml URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/build.xml?rev=353881&r1=353880&r2=353881&view=diff == --- tomcat/container/branches/tc4.1.x/build.xml (original) +++ tomcat/container/branches/tc4.1.x/build.xml Sun Dec 4 10:29:25 2005 @@ -21,9 +21,13 @@ + + + + - + @@ -33,11 +37,6 @@ - - - - - @@ -224,13 +223,14 @@ - - + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r353883 - /tomcat/container/branches/tc4.1.x/jasper/
Author: markt Date: Sun Dec 4 10:30:45 2005 New Revision: 353883 URL: http://svn.apache.org/viewcvs?rev=353883&view=rev Log: Remove Jasper 1 source from TC4 HEAD Removed: tomcat/container/branches/tc4.1.x/jasper/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r353884 - /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
Author: markt Date: Sun Dec 4 10:34:35 2005 New Revision: 353884 URL: http://svn.apache.org/viewcvs?rev=353884&view=rev Log: Fix bug 13040. getContext() now allows retrieval of an external context that is a sub-context of the current context. Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java?rev=353884&r1=353883&r2=353884&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java Sun Dec 4 10:34:35 2005 @@ -404,8 +404,8 @@ * obtain RequestDispatcher objects or resources from the * context. The given path must be absolute (beginning with a "/"), * and is interpreted based on our virtual host's document root. - * - * @param uri Absolute URI of a resource on the server + * @param uri a String specifying the context path of a web + * application in the container. */ public ServletContext getContext(String uri) { @@ -413,26 +413,24 @@ if ((uri == null) || (!uri.startsWith("/"))) return (null); -// Return the current context if requested -String contextPath = context.getPath(); -if (!contextPath.endsWith("/")) -contextPath = contextPath + "/"; - -if (((contextPath.length() > 1) && (uri.startsWith(contextPath))) || -((contextPath.equals("/")) && (uri.equals("/" { -return (this); -} - -// Return other contexts only if allowed -if (!context.getCrossContext()) -return (null); +// Use the host mapper to match the uri to a context try { Host host = (Host) context.getParent(); Context child = host.map(uri); -if (child != null) -return (child.getServletContext()); -else -return (null); +if (child != null) { + // Without crossContext, can only return the current context +if (context.getCrossContext()) { + return child.getServletContext(); +} else { + if (context == child) { + return (this); + } else { + return (null); + } +} +} else { + return (null); +} } catch (Throwable t) { return (null); } @@ -1105,28 +1103,6 @@ } } parameters = results; - -} - - -/** - * List resource paths (recursively), and store all of them in the given - * Set. - */ -private static void listPaths(Set set, DirContext resources, String path) -throws NamingException { - -Enumeration childPaths = resources.listBindings(path); -while (childPaths.hasMoreElements()) { -Binding binding = (Binding) childPaths.nextElement(); -String name = binding.getName(); -String childPath = path + "/" + name; -set.add(childPath); -Object object = binding.getObject(); -if (object instanceof DirContext) { -listPaths(set, resources, childPath); -} -} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r353887 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/core/ApplicationContext.java webapps/docs/changelog.xml
Author: markt Date: Sun Dec 4 10:41:19 2005 New Revision: 353887 URL: http://svn.apache.org/viewcvs?rev=353887&view=rev Log: Fix bug 13040. getContext() now allows retrieval of an external context that is a sub-context of the current context. Ported from TC4. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java?rev=353887&r1=353886&r2=353887&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java Sun Dec 4 10:41:19 2005 @@ -208,22 +208,9 @@ if ((uri == null) || (!uri.startsWith("/"))) return (null); -// Return the current context if requested -String contextPath = context.getPath(); -if (!contextPath.endsWith("/")) -contextPath = contextPath + "/"; - -if (((contextPath.length() > 1) && (uri.startsWith(contextPath))) || -((contextPath.equals("/")) && (uri.equals("/" { -return (this); -} - -// Return other contexts only if allowed -if (!context.getCrossContext()) -return (null); +Context child = null; try { Host host = (Host) context.getParent(); -Context child = null; String mapuri = uri; while (true) { child = (Context) host.findChild(mapuri); @@ -234,17 +221,23 @@ break; mapuri = mapuri.substring(0, slash); } -if (child == null) { -child = (Context) host.findChild(""); -} -if (child != null) -return (child.getServletContext()); -else -return (null); } catch (Throwable t) { return (null); } +if (child == null) +return (null); + +if (context.getCrossContext()) { +// If crossContext is enabled, can always return the context +return child.getServletContext(); +} else if (child == context) { +// Can still return the current context +return context.getServletContext(); +} else { +// Nothing to return +return (null); +} } @@ -929,28 +922,6 @@ } } parameters = results; - -} - - -/** - * List resource paths (recursively), and store all of them in the given - * Set. - */ -private static void listPaths(Set set, DirContext resources, String path) -throws NamingException { - -Enumeration childPaths = resources.listBindings(path); -while (childPaths.hasMoreElements()) { -Binding binding = (Binding) childPaths.nextElement(); -String name = binding.getName(); -String childPath = path + "/" + name; -set.add(childPath); -Object object = binding.getObject(); -if (object instanceof DirContext) { -listPaths(set, resources, childPath); -} -} } Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=353887&r1=353886&r2=353887&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sun Dec 4 10:41:19 2005 @@ -22,6 +22,10 @@ + +13040Fix getContext() when used to obtain a context that is a sub-context +of the current context. Ported from TC4. (markt) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r353896 - in /tomcat/container/branches/tc4.1.x: build.properties.default catalina/build.xml lib/mx4j.license
Author: markt Date: Sun Dec 4 11:24:23 2005 New Revision: 353896 URL: http://svn.apache.org/viewcvs?rev=353896&view=rev Log: Use mx4j license from mx4j distribution rather than a copy in the asf repo Removed: tomcat/container/branches/tc4.1.x/lib/mx4j.license Modified: tomcat/container/branches/tc4.1.x/build.properties.default tomcat/container/branches/tc4.1.x/catalina/build.xml Modified: tomcat/container/branches/tc4.1.x/build.properties.default URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/build.properties.default?rev=353896&r1=353895&r2=353896&view=diff == --- tomcat/container/branches/tc4.1.x/build.properties.default (original) +++ tomcat/container/branches/tc4.1.x/build.properties.default Sun Dec 4 11:24:23 2005 @@ -189,6 +189,7 @@ jmx.home=${base.path}/mx4j-1.1.1 jmx.lib=${jmx.home}/lib jmx.jar=${jmx.lib}/mx4j-jmx.jar +jmx.license=${jmx.home}/LICENSE jmx.loc=http://telia.dl.sourceforge.net/sourceforge/mx4j/mx4j-1.1.1.tar.gz Modified: tomcat/container/branches/tc4.1.x/catalina/build.xml URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/build.xml?rev=353896&r1=353895&r2=353896&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/build.xml (original) +++ tomcat/container/branches/tc4.1.x/catalina/build.xml Sun Dec 4 11:24:23 2005 @@ -705,7 +705,7 @@ - + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r353899 - /tomcat/container/branches/tc4.1.x/lib/jakarta-regexp-1.2.jar
Author: markt Date: Sun Dec 4 11:33:10 2005 New Revision: 353899 URL: http://svn.apache.org/viewcvs?rev=353899&view=rev Log: Remove jakarta-regexp-1.2.jar from repo since the build scripts use a newer version from a different location Removed: tomcat/container/branches/tc4.1.x/lib/jakarta-regexp-1.2.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r353900 - /tomcat/container/branches/tc4.1.x/lib/
Author: markt Date: Sun Dec 4 12:03:12 2005 New Revision: 353900 URL: http://svn.apache.org/viewcvs?rev=353900&view=rev Log: Remove empty directory Removed: tomcat/container/branches/tc4.1.x/lib/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r353901 - /tomcat/container/branches/tc4.1.x/.cvsignore
Author: markt Date: Sun Dec 4 12:04:26 2005 New Revision: 353901 URL: http://svn.apache.org/viewcvs?rev=353901&view=rev Log: Remove cvs config file Removed: tomcat/container/branches/tc4.1.x/.cvsignore - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r353902 - in /tomcat/container/branches/tc4.1.x: catalina/.cvsignore tester/.cvsignore webapps/.cvsignore
Author: markt Date: Sun Dec 4 12:06:42 2005 New Revision: 353902 URL: http://svn.apache.org/viewcvs?rev=353902&view=rev Log: Remove cvs config files Removed: tomcat/container/branches/tc4.1.x/catalina/.cvsignore tomcat/container/branches/tc4.1.x/tester/.cvsignore tomcat/container/branches/tc4.1.x/webapps/.cvsignore - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354887 - /tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/runtime/ServletResponseWrapperInclude.java
Author: markt Date: Wed Dec 7 14:52:26 2005 New Revision: 354887 URL: http://svn.apache.org/viewcvs?rev=354887&view=rev Log: Commit partial fix for bug 21440 - when target performs a forward - This is a port of Jan's patch in 5.5.x Modified: tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/runtime/ServletResponseWrapperInclude.java Modified: tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/runtime/ServletResponseWrapperInclude.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/runtime/ServletResponseWrapperInclude.java?rev=354887&r1=354886&r2=354887&view=diff == --- tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/runtime/ServletResponseWrapperInclude.java (original) +++ tomcat/jasper/branches/tc4.1.x/jasper2/src/share/org/apache/jasper/runtime/ServletResponseWrapperInclude.java Wed Dec 7 14:52:26 2005 @@ -18,49 +18,58 @@ import java.lang.IllegalStateException; import java.io.PrintWriter; +import java.io.IOException; import javax.servlet.*; import javax.servlet.http.*; -import javax.servlet.jsp.*; +import javax.servlet.jsp.JspWriter; /** - * ServletResponseWrapper used for the JSP 'include' action. + * ServletResponseWrapper used by the JSP 'include' action. * - * This 'wrapped' response object is passed as the second argument - * to the internal RequestDispatcher.include(). It channels - * all output text into the current JspWriter. + * This wrapper response object is passed to RequestDispatcher.include(), so + * that the output of the included resource is appended to that of the + * including page. * * @author Pierre Delisle */ -public class ServletResponseWrapperInclude -extends HttpServletResponseWrapper -{ +public class ServletResponseWrapperInclude extends HttpServletResponseWrapper { + /** * The PrintWriter writes all output to the JspWriter of the * including page. */ -PrintWriter printWriter; +private PrintWriter printWriter; + +private JspWriter jspWriter; public ServletResponseWrapperInclude(ServletResponse response, - JspWriter jspWriter) -{ + JspWriter jspWriter) { super((HttpServletResponse)response); this.printWriter = new PrintWriter(jspWriter); +this.jspWriter = jspWriter; } /** * Returns a wrapper around the JspWriter of the including page. */ -public java.io.PrintWriter getWriter() -throws java.io.IOException -{ +public PrintWriter getWriter() throws java.io.IOException { return printWriter; } -public ServletOutputStream getOutputStream() -throws java.io.IOException -{ +public ServletOutputStream getOutputStream() throws java.io.IOException { throw new IllegalStateException(); +} + +/** + * Clears the output buffer of the JspWriter associated with the including + * page. + */ +public void resetBuffer() { + try { + jspWriter.clearBuffer(); + } catch (IOException ioe) { + } } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r357212 - in /tomcat/site/trunk: docs/faq/printer/tomcatuser.html docs/faq/tomcatuser.html docs/lists.html xdocs-faq/tomcatuser.xml xdocs/lists.xml
Author: markt Date: Fri Dec 16 11:35:31 2005 New Revision: 357212 URL: http://svn.apache.org/viewcvs?rev=357212&view=rev Log: Tidy up the mailing list documentation. Modified: tomcat/site/trunk/docs/faq/printer/tomcatuser.html tomcat/site/trunk/docs/faq/tomcatuser.html tomcat/site/trunk/docs/lists.html tomcat/site/trunk/xdocs-faq/tomcatuser.xml tomcat/site/trunk/xdocs/lists.xml Modified: tomcat/site/trunk/docs/faq/printer/tomcatuser.html URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/docs/faq/printer/tomcatuser.html?rev=357212&r1=357211&r2=357212&view=diff == --- tomcat/site/trunk/docs/faq/printer/tomcatuser.html (original) +++ tomcat/site/trunk/docs/faq/printer/tomcatuser.html Fri Dec 16 11:35:31 2005 @@ -5,24 +5,17 @@ Tomcat FAQ " align="right" src="../../images/tomcat.gif">Tomcat FAQAbout Tomcat UserPreface -This is about the Tomcat user list. -mailto:[EMAIL PROTECTED]">Subscribe -and -http://jakarta.apache.org/site/mail.html";>general information -can be found -http://jakarta.apache.org/site/mail2.html";>here. -It is a high volume list! For those who can't handle that kind of traffic, -you can also get it in - -digest form. - - - +The Tomcat user mailing list is for all your questions about how to use +Tomcat. It is a high volume list! For those who can't handle that kind +of traffic, + you can also get it in digest form. + + If you post to tomcat-user, use good etiquette, ask good questions, and use Best Practices, and also please read the docs, faqs, readme, and search the archives before asking a question. - - + + Here are some links about how to use mailing lists and standard etiquette in using mailing lists. These links are not Tomcat specific! Please do not contact the author of these documents with questions. @@ -43,30 +36,47 @@ - - Why won't people answer my question? - + + How do I subscribe? + How do I unsubscribe? - - + + + + Why won't people answer my question? + + - + Should I post to tomcat-user or tomcat-dev? - - - - + + Answers + + + How do I subscribe? + + + + See the mailing list page. + If you are unable to subscribe, it could be due to your e-mail system + mangling your e-mail addres. + + If you send an e-mail to the list owner to subscribe you to the list, + be prepared to wait until the owner has an opportunity to add you + to the list. + + Why won't people answer my question? @@ -121,12 +131,7 @@ - -To unsubscribe, e-mail: -[EMAIL PROTECTED] -For additional commands, e-mail: -[EMAIL PROTECTED] - + See the mailing list page. If you are unable to unsubscribe, it could be due to your e-mail system mangling your e-mail address or you have subscribed under an alias. In that case, maybe @@ -135,32 +140,34 @@ will help. - If you send an e-mail to the moderator to remove you from the list, + If you send an e-mail to the list owner to remove you from the list, be prepared to continue receiving more e-mails from the lists until - the moderator has an opportunity to remove you from the list. + the owner has an opportunity to remove you from the list. - Should I post to tomcat-user or tomcat-dev? + Should I post to users or dev? tomcat-user is for user based questions for tomcat. That means anyone who is developing any type of software to be used with tomcat. - -tomcat-dev is the forum to discuss changes to the Tomcat's source code. If your question -is not related to changing the source code as maintained by the tomcat committers, -then it does not belong here, it belongs in tomcat-user. +tomcat-dev is the forum to discuss changes to the Tomcat's source code. +If your question + is not related to changing the source code as maintained +by the tomcat committers, + then it does not belong here, it belongs on +the users list. -If you wish to extend tomcat using your own Valve, Realm, or anything else ... those -discussions belong in tomcat-user. You might be using Tomcat's internal API but unless -your changes are going back into the official source tree, the question belongs -in tomcat-user. +If you wish to extend tomcat using your own Valve, Realm, or anything +else ... those discussions belong i
svn commit: r357219 - in /tomcat/site/trunk: docs/faq/index.html docs/faq/printer/index.html xdocs-faq/index.xml
Author: markt Date: Fri Dec 16 11:55:57 2005 New Revision: 357219 URL: http://svn.apache.org/viewcvs?rev=357219&view=rev Log: More improvements. Modified: tomcat/site/trunk/docs/faq/index.html tomcat/site/trunk/docs/faq/printer/index.html tomcat/site/trunk/xdocs-faq/index.xml Modified: tomcat/site/trunk/docs/faq/index.html URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/docs/faq/index.html?rev=357219&r1=357218&r2=357219&view=diff == --- tomcat/site/trunk/docs/faq/index.html (original) +++ tomcat/site/trunk/docs/faq/index.html Fri Dec 16 11:55:57 2005 @@ -28,7 +28,7 @@ favorite search engine). - Browse the tomcat-user archives. + Browse or search our mailing lists. Modified: tomcat/site/trunk/docs/faq/printer/index.html URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/docs/faq/printer/index.html?rev=357219&r1=357218&r2=357219&view=diff == --- tomcat/site/trunk/docs/faq/printer/index.html (original) +++ tomcat/site/trunk/docs/faq/printer/index.html Fri Dec 16 11:55:57 2005 @@ -27,7 +27,7 @@ favorite search engine). - Browse the tomcat-user archives. + Browse or search our mailing lists. Modified: tomcat/site/trunk/xdocs-faq/index.xml URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/xdocs-faq/index.xml?rev=357219&r1=357218&r2=357219&view=diff == --- tomcat/site/trunk/xdocs-faq/index.xml (original) +++ tomcat/site/trunk/xdocs-faq/index.xml Fri Dec 16 11:55:57 2005 @@ -38,7 +38,7 @@ favorite search engine). - Browse the tomcat-user archives. + Browse or search our mailing lists. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r358402 - in /tomcat/connectors/trunk/jk: native/netscape/jk_nsapi_plugin.c xdocs/changelog.xml
Author: markt Date: Wed Dec 21 14:37:23 2005 New Revision: 358402 URL: http://svn.apache.org/viewcvs?rev=358402&view=rev Log: Fix bug 35862. NSAPI attempts to read freed memory and to dereference a null pointer. - Patch provided by Brian Kavanagh As far as my limited jk/C knowledge goes, the patch looks good. I would be grateful if someone with more jk/C knowledge than I could double check this commit. Modified: tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c tomcat/connectors/trunk/jk/xdocs/changelog.xml Modified: tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c?rev=358402&r1=358401&r2=358402&view=diff == --- tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c (original) +++ tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c Wed Dec 21 14:37:23 2005 @@ -53,6 +53,8 @@ static jk_logger_t *logger = NULL; static jk_worker_env_t worker_env; +static jk_map_t *init_map = NULL; +static jk_uri_worker_map_t *uw_map = NULL; #ifdef NETWARE int (*PR_IsSocketSecure) (SYS_NETFD * csd); /* pointer to PR_IsSocketSecure function */ @@ -84,11 +86,19 @@ static void init_workers_on_other_threads(void *init_d) { -jk_map_t *init_map = (jk_map_t *)init_d; +init_map = (jk_map_t *)init_d; /* we add the URI->WORKER MAP since workers using AJP14 will feed it */ /* but where are they here in Netscape ? */ if (wc_open(init_map, &worker_env, logger)) { -init_on_other_thread_is_ok = JK_TRUE; +if (uri_worker_map_alloc(&uw_map, NULL, logger)) { +uw_map->fname = ""; +worker_env.uri_to_worker = uw_map; +init_on_other_thread_is_ok = JK_TRUE; +} +else { +jk_log(logger, JK_LOG_EMERG, + "In init_workers_on_other_threads, failed"); +} } else { jk_log(logger, JK_LOG_EMERG, @@ -215,7 +225,6 @@ char *shm_file = pblock_findval(JK_SHM_FILE_TAG, pb); int rc = REQ_ABORTED; -jk_map_t *init_map; fprintf(stderr, "In jk_init.\n Worker file = %s.\n Log level = %s.\n Log File = %s\n", @@ -260,8 +269,6 @@ } */ } - -jk_map_free(&init_map); } #ifdef NETWARE @@ -279,10 +286,18 @@ PR_IsSocketSecure = NULL; } #endif +if (uw_map) { +uri_worker_map_free(&uw_map, logger); +} + wc_close(logger); if (logger) { jk_close_file_logger(&logger); } + + if (init_map) { +jk_map_free(&init_map); +} } NSAPI_PUBLIC int jk_service(pblock * pb, Session * sn, Request * rq) @@ -393,6 +408,7 @@ s->headers_names = NULL; s->headers_values = NULL; s->num_headers = 0; + s->uw_map = uw_map; #ifdef NETWARE /* on NetWare, we can have virtual servers that are secure. Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/xdocs/changelog.xml?rev=358402&r1=358401&r2=358402&view=diff == --- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Wed Dec 21 14:37:23 2005 @@ -21,6 +21,17 @@ new documentation project for JK was started. + + + + + + 35862: NSAPI plugin attempts to read freed memory and attempts to + dereference a null pointer. Patch provided by Brian Kavanagh. (markt) + + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r358404 - /tomcat/connectors/trunk/webapp/
Author: markt Date: Wed Dec 21 14:41:38 2005 New Revision: 358404 URL: http://svn.apache.org/viewcvs?rev=358404&view=rev Log: Repo clean up in connectors Removed: tomcat/connectors/trunk/webapp/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r358405 - /tomcat/connectors/trunk/naming/
Author: markt Date: Wed Dec 21 14:41:52 2005 New Revision: 358405 URL: http://svn.apache.org/viewcvs?rev=358405&view=rev Log: Repo clean up in connectors Removed: tomcat/connectors/trunk/naming/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r358406 - /tomcat/connectors/trunk/jk/native2/
Author: markt Date: Wed Dec 21 14:42:19 2005 New Revision: 358406 URL: http://svn.apache.org/viewcvs?rev=358406&view=rev Log: Repo clean up in connectors Removed: tomcat/connectors/trunk/jk/native2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r358834 - /tomcat/container/branches/tc4.1.x/catalina/build.xml
Author: markt Date: Fri Dec 23 09:10:42 2005 New Revision: 358834 URL: http://svn.apache.org/viewcvs?rev=358834&view=rev Log: Fix build. Remove references to WARP connector which has been removed. Modified: tomcat/container/branches/tc4.1.x/catalina/build.xml Modified: tomcat/container/branches/tc4.1.x/catalina/build.xml URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/build.xml?rev=358834&r1=358833&r2=358834&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/build.xml (original) +++ tomcat/container/branches/tc4.1.x/catalina/build.xml Fri Dec 23 09:10:42 2005 @@ -24,7 +24,6 @@ - @@ -45,8 +44,6 @@ value="${tomcat-jk.home}/build/conf/jk2.properties"/> - @@ -123,7 +120,6 @@ - @@ -917,20 +913,6 @@ - - - - - - - - - - - - - @@ -992,7 +974,6 @@ - @@ -1266,7 +1247,7 @@ - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r359797 - /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
Author: markt Date: Thu Dec 29 06:04:47 2005 New Revision: 359797 URL: http://svn.apache.org/viewcvs?rev=359797&view=rev Log: Fix for bug 38012. Allow CGI scripts to issue redirects. Actually a more general fix that allows CGI to set response status. Ported from TC5. Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java?rev=359797&r1=359796&r2=359797&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Thu Dec 29 06:04:47 2005 @@ -246,9 +246,6 @@ /* some vars below copied from Craig R. McClanahan's InvokerServlet */ -/** the Context container associated with our web application. */ -private ServletContext context = null; - /** the debugging detail level for this servlet. */ private int debug = 0; @@ -318,6 +315,7 @@ } catch (IOException ioe) { ServletException e = new ServletException( "Unable to read shell environment variables", ioe); +throw e; } } @@ -326,9 +324,6 @@ cgiExecutable = value; } -// Identify the internal container resources we need -context = config.getServletContext(); - } @@ -1424,6 +1419,10 @@ * @version $Revision$, $Date$ */ +/** + * @author Mark + * + */ protected class CGIRunner { /** script/command to be executed */ @@ -1771,10 +1770,7 @@ log("runCGI: addHeader(\"" + line + "\")"); } if (line.startsWith("HTTP")) { -//TODO: should set status codes (NPH support) -/* - * response.setStatus(getStatusCode(line)); - */ +response.setStatus(getStatus(line)); } else if (line.indexOf(":") >= 0) { String header = line.substring(0, line.indexOf(":")).trim(); @@ -1841,6 +1837,36 @@ } } +/** + * Parses the status header and extracts the status code. + * + * @param line The HTTP Status-Line (RFC2616, section 6.1) + * @return The extracted status code or the code representing an + * internal error if a valid status code cannot be extracted. + */ +private int getStatus(String line) { +int statusStart = line.indexOf(' '); + +if (statusStart < 0 || line.length() < statusStart + 4) { +// Not a valid status line +log ("runCGI: invalid status line:" + line); +return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; +} + +String status = line.substring(statusStart + 1, statusStart + 4); + +int statusCode; +try { +statusCode = Integer.parseInt(status); +} catch (NumberFormatException nfe) { +// Not a valid status code +log ("runCGI: invalid status code:" + status); +return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; +} + +return statusCode; +} + private void sendToLog(BufferedReader rdr) { String line = null; int lineCount = 0 ; @@ -1873,7 +1899,6 @@ */ protected String getPostInput(ArrayList params) { -String lineSeparator = System.getProperty("line.separator"); StringBuffer qs = new StringBuffer(""); for (int i=0; i < params.size(); i++) { NameValuePair nvp = (NameValuePair) this.params.get(i); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r359798 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/servlets/CGIServlet.java webapps/docs/changelog.xml
Author: markt Date: Thu Dec 29 06:06:58 2005 New Revision: 359798 URL: http://svn.apache.org/viewcvs?rev=359798&view=rev Log: Fix for bug 38012. Allow CGI scripts to issue redirects. Actually a more general fix that allows CGI to set response status. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java?rev=359798&r1=359797&r2=359798&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Thu Dec 29 06:06:58 2005 @@ -1772,10 +1772,7 @@ log("runCGI: addHeader(\"" + line + "\")"); } if (line.startsWith("HTTP")) { -//TODO: should set status codes (NPH support) -/* - * response.setStatus(getStatusCode(line)); - */ +response.setStatus(getStatus(line)); } else if (line.indexOf(":") >= 0) { String header = line.substring(0, line.indexOf(":")).trim(); @@ -1851,6 +1848,36 @@ } } +/** + * Parses the status header and extracts the status code. + * + * @param line The HTTP Status-Line (RFC2616, section 6.1) + * @return The extracted status code or the code representing an + * internal error if a valid status code cannot be extracted. + */ +private int getStatus(String line) { +int statusStart = line.indexOf(' '); + +if (statusStart < 0 || line.length() < statusStart + 4) { +// Not a valid status line +log ("runCGI: invalid status line:" + line); +return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; +} + +String status = line.substring(statusStart + 1, statusStart + 4); + +int statusCode; +try { +statusCode = Integer.parseInt(status); +} catch (NumberFormatException nfe) { +// Not a valid status code +log ("runCGI: invalid status code:" + status); +return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; +} + +return statusCode; +} + private void sendToLog(BufferedReader rdr) { String line = null; int lineCount = 0 ; Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=359798&r1=359797&r2=359798&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Thu Dec 29 06:06:58 2005 @@ -34,6 +34,9 @@ Remove leftover static logger which was used to log application level messages in ApplicationContextFacade (remm) + +38012: Where a CGI script sets a response code, use it. (markt) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r359799 - /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
Author: markt Date: Thu Dec 29 06:09:34 2005 New Revision: 359799 URL: http://svn.apache.org/viewcvs?rev=359799&view=rev Log: Remove useless comment kindly added by my IDE Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java?rev=359799&r1=359798&r2=359799&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Thu Dec 29 06:09:34 2005 @@ -1419,10 +1419,6 @@ * @version $Revision$, $Date$ */ -/** - * @author Mark - * - */ protected class CGIRunner { /** script/command to be executed */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r359869 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
Author: markt Date: Thu Dec 29 10:42:08 2005 New Revision: 359869 URL: http://svn.apache.org/viewcvs?rev=359869&view=rev Log: Bug 38012. Add support for the CGI specific status header. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java?rev=359869&r1=359868&r2=359869&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Thu Dec 29 10:42:08 2005 @@ -1772,13 +1772,17 @@ log("runCGI: addHeader(\"" + line + "\")"); } if (line.startsWith("HTTP")) { -response.setStatus(getStatus(line)); +response.setStatus(getSCFromHttpStatusLine(line)); } else if (line.indexOf(":") >= 0) { String header = line.substring(0, line.indexOf(":")).trim(); String value = line.substring(line.indexOf(":") + 1).trim(); -response.addHeader(header , value); +if (header.equalsIgnoreCase("status")) { + response.setStatus(getSCFromCGIStatusHeader(value)); +} else { +response.addHeader(header , value); +} if ((header.toLowerCase().equals("content-type")) && (!value.toLowerCase().startsWith("text"))) { isBinaryContent = true; @@ -1849,22 +1853,51 @@ } /** - * Parses the status header and extracts the status code. + * Parses the Status-Line and extracts the status code. * * @param line The HTTP Status-Line (RFC2616, section 6.1) * @return The extracted status code or the code representing an * internal error if a valid status code cannot be extracted. */ -private int getStatus(String line) { -int statusStart = line.indexOf(' '); +private int getSCFromHttpStatusLine(String line) { +int statusStart = line.indexOf(' ') + 1; + +if (statusStart < 1 || line.length() < statusStart + 3) { +// Not a valid HTTP Status-Line +log ("runCGI: invalid HTTP Status-Line:" + line); +return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; +} + +String status = line.substring(statusStart, statusStart + 3); + +int statusCode; +try { +statusCode = Integer.parseInt(status); +} catch (NumberFormatException nfe) { +// Not a valid status code +log ("runCGI: invalid status code:" + status); +return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; +} -if (statusStart < 0 || line.length() < statusStart + 4) { -// Not a valid status line -log ("runCGI: invalid status line:" + line); +return statusCode; +} + +/** + * Parses the CGI Status Header value and extracts the status code. + * + * @param value The CGI Status value of the form + * digit digit digit SP reason-phrase + * @return The extracted status code or the code representing an + * internal error if a valid status code cannot be extracted. + */ +private int getSCFromCGIStatusHeader(String value) { +if (value.length() < 3) { +// Not a valid status value +log ("runCGI: invalid status value:" + value); return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; } -String status = line.substring(statusStart + 1, statusStart + 4); +String status = value.substring(0, 3); int statusCode; try { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r359870 - /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
Author: markt Date: Thu Dec 29 10:42:45 2005 New Revision: 359870 URL: http://svn.apache.org/viewcvs?rev=359870&view=rev Log: Bug 38012. Add support for the CGI specific status header. Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java?rev=359870&r1=359869&r2=359870&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Thu Dec 29 10:42:45 2005 @@ -1766,13 +1766,17 @@ log("runCGI: addHeader(\"" + line + "\")"); } if (line.startsWith("HTTP")) { -response.setStatus(getStatus(line)); +response.setStatus(getSCFromHttpStatusLine(line)); } else if (line.indexOf(":") >= 0) { String header = line.substring(0, line.indexOf(":")).trim(); String value = -line.substring(line.indexOf(":") + 1).trim(); -response.addHeader(header , value); +line.substring(line.indexOf(":") + 1).trim(); +if (header.equalsIgnoreCase("status")) { + response.setStatus(getSCFromCGIStatusHeader(value)); +} else { +response.addHeader(header , value); +} if ((header.toLowerCase().equals("content-type")) && (!value.toLowerCase().startsWith("text"))) { isBinaryContent = true; @@ -1834,22 +1838,22 @@ } /** - * Parses the status header and extracts the status code. + * Parses the Status-Line and extracts the status code. * * @param line The HTTP Status-Line (RFC2616, section 6.1) * @return The extracted status code or the code representing an * internal error if a valid status code cannot be extracted. */ -private int getStatus(String line) { -int statusStart = line.indexOf(' '); +private int getSCFromHttpStatusLine(String line) { +int statusStart = line.indexOf(' ') + 1; -if (statusStart < 0 || line.length() < statusStart + 4) { -// Not a valid status line -log ("runCGI: invalid status line:" + line); +if (statusStart < 1 || line.length() < statusStart + 3) { +// Not a valid HTTP Status-Line +log ("runCGI: invalid HTTP Status-Line:" + line); return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; } -String status = line.substring(statusStart + 1, statusStart + 4); +String status = line.substring(statusStart, statusStart + 3); int statusCode; try { @@ -1862,7 +1866,36 @@ return statusCode; } - + +/** + * Parses the CGI Status Header value and extracts the status code. + * + * @param value The CGI Status value of the form + * digit digit digit SP reason-phrase + * @return The extracted status code or the code representing an + * internal error if a valid status code cannot be extracted. + */ +private int getSCFromCGIStatusHeader(String value) { +if (value.length() < 3) { +// Not a valid status value +log ("runCGI: invalid status value:" + value); +return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; +} + +String status = value.substring(0, 3); + +int statusCode; +try { +statusCode = Integer.parseInt(status); +} catch (NumberFormatException nfe) { +// Not a valid status code +log ("runCGI: invalid status code:" + status); +return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; +} + +return statusCode; +} +
svn commit: r359923 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/ExtensionValidator.java
Author: markt Date: Thu Dec 29 15:16:07 2005 New Revision: 359923 URL: http://svn.apache.org/viewcvs?rev=359923&view=rev Log: Remove unused code Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/ExtensionValidator.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/ExtensionValidator.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/ExtensionValidator.java?rev=359923&r1=359922&r2=359923&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/ExtensionValidator.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/ExtensionValidator.java Thu Dec 29 15:16:07 2005 @@ -24,7 +24,6 @@ import java.util.HashMap; import java.util.Iterator; import java.util.NoSuchElementException; -import java.util.ResourceBundle; import java.util.StringTokenizer; import java.util.jar.JarInputStream; import java.util.jar.Manifest; @@ -64,7 +63,6 @@ private static HashMap containerAvailableExtensions = null; private static ArrayList containerManifestResources = new ArrayList(); -private static ResourceBundle messages = null; // - Static Initializer @@ -136,7 +134,6 @@ String appName = context.getPath(); ArrayList appManifestResources = new ArrayList(); -ManifestResource appManifestResource = null; // If the application context is null it does not exist and // therefore is not valid if (dirContext == null) return false; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r360276 - in /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader: StandardClassLoader.java WebappLoader.java
Author: markt Date: Sat Dec 31 05:09:39 2005 New Revision: 360276 URL: http://svn.apache.org/viewcvs?rev=360276&view=rev Log: Code clean up Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappLoader.java Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java?rev=360276&r1=360275&r2=360276&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java Sat Dec 31 05:09:39 2005 @@ -38,7 +38,6 @@ import java.util.HashMap; import java.util.Iterator; import java.util.jar.JarFile; -import java.util.jar.JarEntry; import java.util.jar.JarInputStream; import java.util.jar.Manifest; import org.apache.naming.JndiPermission; Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappLoader.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappLoader.java?rev=360276&r1=360275&r2=360276&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappLoader.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappLoader.java Sat Dec 31 05:09:39 2005 @@ -996,10 +996,10 @@ // Looking up directory /WEB-INF/lib in the context try { -NamingEnumeration enum = resources.listBindings(libPath); -while (enum.hasMoreElements()) { +NamingEnumeration enumeration = resources.listBindings(libPath); +while (enumeration.hasMoreElements()) { -Binding binding = (Binding) enum.nextElement(); +Binding binding = (Binding) enumeration.nextElement(); String filename = libPath + "/" + binding.getName(); if (!filename.endsWith(".jar")) continue; @@ -1096,10 +1096,10 @@ try { -NamingEnumeration enum = srcDir.list(""); -while (enum.hasMoreElements()) { +NamingEnumeration enumeration = srcDir.list(""); +while (enumeration.hasMoreElements()) { NameClassPair ncPair = -(NameClassPair) enum.nextElement(); +(NameClassPair) enumeration.nextElement(); String name = ncPair.getName(); Object object = srcDir.lookup(name); File currentFile = new File(destDir, name); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r360277 - in /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader: Extension.java WebappClassLoader.java
Author: markt Date: Sat Dec 31 05:14:14 2005 New Revision: 360277 URL: http://svn.apache.org/viewcvs?rev=360277&view=rev Log: Fix bug 37854. Extension compatibility checking was too strict. Also fixes the following issues found whilst testing: - only the webapp class loader was used to search for compatible extensions - JDK/JRE installed extensions where ignored Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/Extension.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/Extension.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/Extension.java?rev=360277&r1=360276&r2=360277&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/Extension.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/Extension.java Sat Dec 31 05:14:14 2005 @@ -177,19 +177,28 @@ if (!extensionName.equals(required.getExtensionName())) return (false); -// Available specification version must be >= required -if (!isNewer(specificationVersion, required.getSpecificationVersion())) -return (false); +// If specified, available specification version must be >= required +if (required.getSpecificationVersion() != null) { +if (!isNewer(specificationVersion, + required.getSpecificationVersion())) +return (false); +} -// Implementation Vendor ID must match -if (implementationVendorId == null) -return (false); -if (!implementationVendorId.equals(required.getImplementationVendorId())) -return (false); +// If specified, Implementation Vendor ID must match +if (required.getImplementationVendorId() != null) { +if (implementationVendorId == null) +return (false); +if (!implementationVendorId.equals(required +.getImplementationVendorId())) +return (false); +} -// Implementation version must be >= required -if (!isNewer(implementationVersion, required.getImplementationVersion())) -return (false); +// If specified, Implementation version must be >= required +if (required.getImplementationVersion() != null) { +if (!isNewer(implementationVersion, + required.getImplementationVersion())) +return (false); +} // This available optional package satisfies the requirements return (true); Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java?rev=360277&r1=360276&r2=360277&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java Sat Dec 31 05:14:14 2005 @@ -18,6 +18,7 @@ package org.apache.catalina.loader; import java.io.File; +import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FilePermission; import java.io.InputStream; @@ -37,9 +38,12 @@ import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; +import java.util.List; +import java.util.StringTokenizer; import java.util.Vector; import java.util.jar.JarFile; import java.util.jar.JarEntry; +import java.util.jar.JarInputStream; import java.util.jar.Manifest; import java.util.jar.Attributes; import java.util.jar.Attributes.Name; @@ -724,14 +728,21 @@ loader = loader.getParent(); if (loader == null) break; -if (!(loader instanceof WebappClassLoader)) +Extension[] extensions; +if (loader instanceof WebappClassLoader) { +extensions = ((WebappClassLoader) loader).findAvailable(); +} else if (loader instanceof StandardClassLoader) { +extensions = ((StandardClassLoader) loader).findAvailable(); +} else { continue; -Extension extensions[] = -((WebappClassLoader) loader).findAvailable(); +} for (int i = 0; i < extensions.length; i++) results.add(extensions[i]); } +// Add the JDK/JRE exten
svn commit: r360278 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util: Extension.java ExtensionValidator.java ManifestResource.java
Author: markt Date: Sat Dec 31 05:26:41 2005 New Revision: 360278 URL: http://svn.apache.org/viewcvs?rev=360278&view=rev Log: Port fix for bug 37854 (extension compatibility checking too strict) from TC4. Also fixes following issues discovered during testing: - The unique ID used for an extension is not unique and since a vendor is not required to specify all the manifest attributes for an extension (the spec says should rather than must) a unique ID cannot be easily generated - Even if a unique ID could be generated for an installed extension you can not generate one for a required extension since some attributes are optional. This makes it impossible to search the installed extensions for a match to a required extension using a key. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/Extension.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/ExtensionValidator.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/ManifestResource.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/Extension.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/Extension.java?rev=360278&r1=360277&r2=360278&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/Extension.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/Extension.java Sat Dec 31 05:26:41 2005 @@ -64,14 +64,6 @@ } /** - * UniqueId created by combining the extension name and implementation - * version. - */ -public String getUniqueId() { -return this.extensionName + this.implementationVersion; -} - -/** * The URL from which the most recent version of this optional package * can be obtained if it is not already installed. */ @@ -194,19 +186,28 @@ if (!extensionName.equals(required.getExtensionName())) return (false); -// Available specification version must be >= required -if (!isNewer(specificationVersion, required.getSpecificationVersion())) -return (false); - -// Implementation Vendor ID must match -if (implementationVendorId == null) -return (false); -if (!implementationVendorId.equals(required.getImplementationVendorId())) -return (false); - -// Implementation version must be >= required -if (!isNewer(implementationVersion, required.getImplementationVersion())) -return (false); +// If specified, available specification version must be >= required +if (required.getSpecificationVersion() != null) { +if (!isNewer(specificationVersion, + required.getSpecificationVersion())) +return (false); +} + +// If specified, Implementation Vendor ID must match +if (required.getImplementationVendorId() != null) { +if (implementationVendorId == null) +return (false); +if (!implementationVendorId.equals(required +.getImplementationVendorId())) +return (false); +} + +// If specified, Implementation version must be >= required +if (required.getImplementationVersion() != null) { +if (!isNewer(implementationVersion, + required.getImplementationVersion())) +return (false); +} // This available optional package satisfies the requirements return (true); Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/ExtensionValidator.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/ExtensionValidator.java?rev=360278&r1=360277&r2=360278&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/ExtensionValidator.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/ExtensionValidator.java Sat Dec 31 05:26:41 2005 @@ -21,7 +21,6 @@ import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; -import java.util.HashMap; import java.util.Iterator; import java.util.NoSuchElementException; import java.util.StringTokenizer; @@ -61,7 +60,7 @@ private static StringManager sm = StringManager.getManager("org.apache.catalina.util"); -private static HashMap containerAvailableExtensions = null; +private static ArrayList containerAvailableExtensions = null; private static ArrayList containerManifestResources = new ArrayList(); @@ -243,7 +242,7 @@
svn commit: r360283 - in /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming: ./ resources/
Author: markt Date: Sat Dec 31 06:32:01 2005 New Revision: 360283 URL: http://svn.apache.org/viewcvs?rev=360283&view=rev Log: Code clean up. Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContextBindingsEnumeration.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContextEnumeration.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/resources/RecyclableNamingEnumeration.java Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContextBindingsEnumeration.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContextBindingsEnumeration.java?rev=360283&r1=360282&r2=360283&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContextBindingsEnumeration.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContextBindingsEnumeration.java Sat Dec 31 06:32:01 2005 @@ -38,12 +38,12 @@ public NamingContextBindingsEnumeration(Vector entries) { -enum = entries.elements(); +enumeration = entries.elements(); } -public NamingContextBindingsEnumeration(Enumeration enum) { -this.enum = enum; +public NamingContextBindingsEnumeration(Enumeration enumeration) { +this.enumeration = enumeration; } @@ -53,7 +53,7 @@ /** * Underlying enumeration. */ -protected Enumeration enum; +protected Enumeration enumeration; // - Public Methods @@ -73,7 +73,7 @@ */ public boolean hasMore() throws NamingException { -return enum.hasMoreElements(); +return enumeration.hasMoreElements(); } @@ -86,12 +86,12 @@ public boolean hasMoreElements() { -return enum.hasMoreElements(); +return enumeration.hasMoreElements(); } public Object nextElement() { -NamingEntry entry = (NamingEntry) enum.nextElement(); +NamingEntry entry = (NamingEntry) enumeration.nextElement(); return new Binding(entry.name, entry.value.getClass().getName(), entry.value, true); } Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContextEnumeration.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContextEnumeration.java?rev=360283&r1=360282&r2=360283&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContextEnumeration.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContextEnumeration.java Sat Dec 31 06:32:01 2005 @@ -38,12 +38,12 @@ public NamingContextEnumeration(Vector entries) { -enum = entries.elements(); +enumeration = entries.elements(); } -public NamingContextEnumeration(Enumeration enum) { -this.enum = enum; +public NamingContextEnumeration(Enumeration enumeration) { +this.enumeration = enumeration; } @@ -53,7 +53,7 @@ /** * Underlying enumeration. */ -protected Enumeration enum; +protected Enumeration enumeration; // - Public Methods @@ -73,7 +73,7 @@ */ public boolean hasMore() throws NamingException { -return enum.hasMoreElements(); +return enumeration.hasMoreElements(); } @@ -86,12 +86,12 @@ public boolean hasMoreElements() { -return enum.hasMoreElements(); +return enumeration.hasMoreElements(); } public Object nextElement() { -NamingEntry entry = (NamingEntry) enum.nextElement(); +NamingEntry entry = (NamingEntry) enumeration.nextElement(); return new NameClassPair(entry.name, entry.value.getClass().getName()); } Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java?rev=360283&r1=360282&r2=360283&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/resources/DirContextURLConnectio
svn commit: r360371 - /tomcat/container/tc5.5.x/webapps/docs/config/globalresources.xml
Author: markt Date: Sat Dec 31 10:04:19 2005 New Revision: 360371 URL: http://svn.apache.org/viewcvs?rev=360371&view=rev Log: Fix typo Modified: tomcat/container/tc5.5.x/webapps/docs/config/globalresources.xml Modified: tomcat/container/tc5.5.x/webapps/docs/config/globalresources.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/config/globalresources.xml?rev=360371&r1=360370&r2=360371&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/config/globalresources.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/config/globalresources.xml Sat Dec 31 10:04:19 2005 @@ -65,7 +65,7 @@ <env-entry> - <env-entry-name>maxExemptions</param-name> + <env-entry-name>maxExemptions</env-entry-name> <env-entry-value>10</env-entry-value> <env-entry-type>java.lang.Integer</env-entry-type> </env-entry> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r360372 - /tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/config/globalresources.xml
Author: markt Date: Sat Dec 31 10:04:40 2005 New Revision: 360372 URL: http://svn.apache.org/viewcvs?rev=360372&view=rev Log: Fix typo Modified: tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/config/globalresources.xml Modified: tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/config/globalresources.xml URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/config/globalresources.xml?rev=360372&r1=360371&r2=360372&view=diff == --- tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/config/globalresources.xml (original) +++ tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/config/globalresources.xml Sat Dec 31 10:04:40 2005 @@ -64,7 +64,7 @@ <env-entry> - <env-entry-name>maxExemptions</param-name> + <env-entry-name>maxExemptions</env-entry-name> <env-entry-value>10</env-entry-value> <env-entry-type>java.lang.Integer</env-entry-type> </env-entry> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r365362 - /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/authenticator/AuthenticatorBase.java
Author: markt Date: Mon Jan 2 07:40:09 2006 New Revision: 365362 URL: http://svn.apache.org/viewcvs?rev=365362&view=rev Log: Fix bug 15570. Magic role of * was interpreted as all authenticated users rather than as all roles defined in web.xml Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/authenticator/AuthenticatorBase.java Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/authenticator/AuthenticatorBase.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/authenticator/AuthenticatorBase.java?rev=365362&r1=365361&r2=365362&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/authenticator/AuthenticatorBase.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/authenticator/AuthenticatorBase.java Mon Jan 2 07:40:09 2006 @@ -566,10 +566,14 @@ } // Check each role included in this constraint -if (constraint.getAllRoles()) -return (true); +String roles[]; +if (constraint.getAllRoles()) { +// * means all roles defined in web.xml +roles = context.findSecurityRoles(); +} else { +roles = constraint.findAuthRoles(); +} -String roles[] = constraint.findAuthRoles(); if (roles == null) roles = new String[0]; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r365363 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/realm/RealmBase.java webapps/docs/changelog.xml
Author: markt Date: Mon Jan 2 07:46:04 2006 New Revision: 365363 URL: http://svn.apache.org/viewcvs?rev=365363&view=rev Log: Fix bug 15570. Magic role of * was interpreted as all authenticated users rather than as all roles defined in web.xml Ported from TC4. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java?rev=365363&r1=365362&r2=365363&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java Mon Jan 2 07:46:04 2006 @@ -728,12 +728,17 @@ boolean denyfromall = false; for(int i=0; i < constraints.length; i++) { SecurityConstraint constraint = constraints[i]; -String roles[] = constraint.findAuthRoles(); + +String roles[]; +if (constraint.getAllRoles()) { +// * means all roles defined in web.xml +roles = request.getContext().findSecurityRoles(); +} else { +roles = constraint.findAuthRoles(); +} + if (roles == null) roles = new String[0]; - -if (constraint.getAllRoles() && !denyfromall) -status = true; if (log.isDebugEnabled()) log.debug(" Checking roles " + principal); Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=365363&r1=365362&r2=365363&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Mon Jan 2 07:46:04 2006 @@ -31,11 +31,18 @@ 37934: Don't ask for authentication if deny-from-all is in effect. (billbarker) +15570: auth-constraint of * was interpretted as all +authenticated users rather than as all roles defined in web.xml. (markt) + + Remove leftover static logger which was used to log application level messages in ApplicationContextFacade (remm) 38012: Where a CGI script sets a response code, use it. (markt) + + + 37854: Extension-List checking was too strict. (markt) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r365735 - in /tomcat/container/branches/tc4.1.x: catalina/src/share/org/apache/catalina/mbeans/ catalina/src/share/org/apache/catalina/realm/ webapps/admin/WEB-INF/ webapps/admin/WEB-INF/c
Author: markt Date: Tue Jan 3 12:24:27 2006 New Revision: 365735 URL: http://svn.apache.org/viewcvs?rev=365735&view=rev Log: Fix bug 16185 by porting support for localDataSource attribute from TC5 Added: tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/DataSourceRealmForm.java (with props) tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/SaveDataSourceRealmAction.java (with props) tomcat/container/branches/tc4.1.x/webapps/admin/realm/dataSourceRealm.jsp (with props) Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/AddRealmAction.java tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/EditRealmAction.java tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/struts-config.xml tomcat/container/branches/tc4.1.x/webapps/admin/resources/dataSources.jspf tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/config/realm.xml tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/realm-howto.xml Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml?rev=365735&r1=365734&r2=365735&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml Tue Jan 3 12:24:27 2006 @@ -353,6 +353,11 @@ group="Realm" type="org.apache.catalina.realm.DataSourceRealm"> + + @@ -365,6 +370,10 @@ description="Digest algorithm used in storing passwords in a non-plaintext format" type="java.lang.String"/> + + http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java?rev=365735&r1=365734&r2=365735&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java Tue Jan 3 12:24:27 2006 @@ -32,6 +32,7 @@ import org.apache.catalina.ServerFactory; import org.apache.catalina.core.StandardServer; import org.apache.catalina.util.StringManager; +import org.apache.naming.ContextBindings; /** * @@ -79,6 +80,12 @@ /** + * Does this realm use a context local datasource. + */ +protected boolean localDataSource = false; + + +/** * Descriptive information about this Realm implementation. */ protected static final String name = "DataSourceRealm"; @@ -142,6 +149,23 @@ } /** + * Return if the datasource will be looked up in the webapp JNDI Context. + */ +public boolean getLocalDataSource() { +return localDataSource; +} + +/** + * Set to true to cause the datasource to be looked up in the webapp JNDI + * Context. + * + * @param localDataSource the new flag value + */ +public void setLocalDataSource(boolean localDataSource) { +this.localDataSource = localDataSource; +} + +/** * Return the column in the user role table that names a role. * */ @@ -360,8 +384,15 @@ private Connection open() { try { -StandardServer server = (StandardServer) ServerFactory.getServer(); -Context context = server.getGlobalNamingContext(); +Context context = null; +if (localDataSource) { +context = ContextBindings.getClassLoader(); +context = (Context) context.lookup("comp/env"); +} else { +StandardServer server = +(StandardServer) ServerFactory.getServer(); +context = server.getGlobalNamingContext(); +} DataSource dataSource = (DataSource)context.lookup(dataSourceName); return dataSource.getConnection(); } catch (Exception e) { Modified: tomcat/container/branches/tc4.1.x/webap
svn commit: r366303 - in /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming: NamingContext.java NamingContextBindingsEnumeration.java resources/FileDirContext.java resources/WARDi
Author: markt Date: Thu Jan 5 13:41:08 2006 New Revision: 366303 URL: http://svn.apache.org/viewcvs?rev=366303&view=rev Log: Fix for bug 23950. Context.listBindings() should return Objects not References. Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContext.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContextBindingsEnumeration.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/resources/FileDirContext.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/resources/WARDirContext.java Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContext.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContext.java?rev=366303&r1=366302&r2=366303&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContext.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContext.java Thu Jan 5 13:41:08 2006 @@ -382,7 +382,8 @@ while ((!name.isEmpty()) && (name.get(0).length() == 0)) name = name.getSuffix(1); if (name.isEmpty()) { -return new NamingContextBindingsEnumeration(bindings.elements()); +return new NamingContextBindingsEnumeration(bindings.elements(), +this); } NamingEntry entry = (NamingEntry) bindings.get(name.get(0)); Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContextBindingsEnumeration.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContextBindingsEnumeration.java?rev=366303&r1=366302&r2=366303&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContextBindingsEnumeration.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/NamingContextBindingsEnumeration.java Thu Jan 5 13:41:08 2006 @@ -19,6 +19,9 @@ import java.util.Vector; import java.util.Enumeration; + +import javax.naming.CompositeName; +import javax.naming.Context; import javax.naming.NamingException; import javax.naming.NamingEnumeration; import javax.naming.Binding; @@ -37,13 +40,16 @@ // --- Constructors -public NamingContextBindingsEnumeration(Vector entries) { +public NamingContextBindingsEnumeration(Vector entries, Context ctx) { enumeration = entries.elements(); +this.ctx = ctx; } -public NamingContextBindingsEnumeration(Enumeration enumeration) { +public NamingContextBindingsEnumeration(Enumeration enumeration, +Context ctx) { this.enumeration = enumeration; +this.ctx = ctx; } @@ -54,6 +60,12 @@ * Underlying enumeration. */ protected Enumeration enumeration; + +/** + * The context for which this enumeration is being generated. + */ +private Context ctx; + // - Public Methods @@ -64,7 +76,7 @@ */ public Object next() throws NamingException { -return nextElement(); +return nextElementInternal(); } @@ -89,13 +101,33 @@ return enumeration.hasMoreElements(); } - public Object nextElement() { +try { +return nextElementInternal(); +} catch (NamingException e) { +throw new RuntimeException(e.getMessage()); +} +} + +private Object nextElementInternal() throws NamingException { NamingEntry entry = (NamingEntry) enumeration.nextElement(); + +// If the entry is a reference, resolve it +if (entry.type == NamingEntry.REFERENCE +|| entry.type == NamingEntry.LINK_REF) { +try { +// A lookup will resolve the entry +ctx.lookup(new CompositeName(entry.name)); +} catch (NamingException e) { +throw e; +} catch (Exception e) { +throw new NamingException(e.getMessage()); +} +} + return new Binding(entry.name, entry.value.getClass().getName(), entry.value, true); } - } Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/resources/FileDirContext.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/naming/resources/FileDirContext.java?rev=
svn commit: r366304 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/naming/ catalina/src/share/org/apache/naming/resources/ webapps/docs/
Author: markt Date: Thu Jan 5 13:42:29 2006 New Revision: 366304 URL: http://svn.apache.org/viewcvs?rev=366304&view=rev Log: Fix for bug 23950. Context.listBindings() should return Objects not References. Ported from TC4. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/NamingContext.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/NamingContextBindingsEnumeration.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/resources/FileDirContext.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/resources/WARDirContext.java tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/NamingContext.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/NamingContext.java?rev=366304&r1=366303&r2=366304&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/NamingContext.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/NamingContext.java Thu Jan 5 13:42:29 2006 @@ -387,7 +387,7 @@ while ((!name.isEmpty()) && (name.get(0).length() == 0)) name = name.getSuffix(1); if (name.isEmpty()) { -return new NamingContextBindingsEnumeration(bindings.values().iterator()); +return new NamingContextBindingsEnumeration(bindings.values().iterator(), this); } NamingEntry entry = (NamingEntry) bindings.get(name.get(0)); Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/NamingContextBindingsEnumeration.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/NamingContextBindingsEnumeration.java?rev=366304&r1=366303&r2=366304&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/NamingContextBindingsEnumeration.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/NamingContextBindingsEnumeration.java Thu Jan 5 13:42:29 2006 @@ -20,6 +20,8 @@ import java.util.Iterator; import javax.naming.Binding; +import javax.naming.CompositeName; +import javax.naming.Context; import javax.naming.NamingEnumeration; import javax.naming.NamingException; @@ -37,11 +39,11 @@ // --- Constructors -public NamingContextBindingsEnumeration(Iterator entries) { +public NamingContextBindingsEnumeration(Iterator entries, Context ctx) { iterator = entries; +this.ctx = ctx; } - // -- Variables @@ -50,6 +52,12 @@ */ protected Iterator iterator; + +/** + * The context for which this enumeration is being generated. + */ +private Context ctx; + // - Public Methods @@ -59,7 +67,7 @@ */ public Object next() throws NamingException { -return nextElement(); +return nextElementInternal(); } @@ -86,7 +94,31 @@ public Object nextElement() { +try { +return nextElementInternal(); +} catch (NamingException e) { +throw new RuntimeException(e.getMessage(), e); +} +} + +private Object nextElementInternal() throws NamingException { NamingEntry entry = (NamingEntry) iterator.next(); + +// If the entry is a reference, resolve it +if (entry.type == NamingEntry.REFERENCE +|| entry.type == NamingEntry.LINK_REF) { +try { +// A lookup will resolve the entry +ctx.lookup(new CompositeName(entry.name)); +} catch (NamingException e) { +throw e; +} catch (Exception e) { +NamingException ne = new NamingException(e.getMessage()); +ne.initCause(e); +throw ne; +} +} + return new Binding(entry.name, entry.value.getClass().getName(), entry.value, true); } Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/resources/FileDirContext.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/resources/FileDirContext.java?rev=366304&r1=366303&r2=366304&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/resources/FileDirContext.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/resources/FileDirContext
svn commit: r366305 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/servlets/CGIServlet.java webapps/docs/changelog.xml
Author: markt Date: Thu Jan 5 13:51:10 2006 New Revision: 366305 URL: http://svn.apache.org/viewcvs?rev=366305&view=rev Log: Fix CGIServlet so reading environment variables works in Windows 2003 Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java?rev=366305&r1=366304&r2=366305&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Thu Jan 5 13:51:10 2006 @@ -670,7 +670,7 @@ p = r.exec( "command.com /c set" ); ignoreCase = true; } else if ( (OS.indexOf("nt") > -1) -|| (OS.indexOf("windows 2000") > -1) +|| (OS.indexOf("windows 20") > -1) || (OS.indexOf("windows xp") > -1) ) { // thanks to JuanFran for the xp fix! p = r.exec( "cmd.exe /c set" ); Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=366305&r1=366304&r2=366305&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Thu Jan 5 13:51:10 2006 @@ -20,6 +20,10 @@ 23950: Context.listBindings() should return objects not references. (markt) + +38124: Add support for Windows 20xx when reading environment +variables in CGIServlet. (markt) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r366306 - /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
Author: markt Date: Thu Jan 5 13:51:39 2006 New Revision: 366306 URL: http://svn.apache.org/viewcvs?rev=366306&view=rev Log: Fix CGIServlet so reading environment variables works in Windows 2003 Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java?rev=366306&r1=366305&r2=366306&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Thu Jan 5 13:51:39 2006 @@ -661,7 +661,7 @@ p = r.exec( "command.com /c set" ); ignoreCase = true; } else if ( (OS.indexOf("nt") > -1) -|| (OS.indexOf("windows 2000") > -1) +|| (OS.indexOf("windows 20") > -1) || (OS.indexOf("windows xp") > -1) ) { // thanks to JuanFran for the xp fix! p = r.exec( "cmd.exe /c set" ); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r367054 - /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/
Author: markt Date: Sun Jan 8 09:49:20 2006 New Revision: 367054 URL: http://svn.apache.org/viewcvs?rev=367054&view=rev Log: Code clean up in o.a.c.mbeans Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ContextEnvironmentMBean.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ContextResourceLinkMBean.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ContextResourceMBean.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/DefaultContextMBean.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/GroupMBean.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/NamingResourcesMBean.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/RoleMBean.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/StandardContextMBean.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/StandardEngineMBean.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/StandardHostMBean.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/StandardServiceMBean.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/UserMBean.java Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java?rev=367054&r1=367053&r2=367054&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java Sun Jan 8 09:49:20 2006 @@ -19,9 +19,6 @@ import java.lang.reflect.Method; import javax.management.MBeanException; import javax.management.RuntimeOperationsException; -import org.apache.catalina.Connector; -import org.apache.catalina.Service; -import org.apache.commons.modeler.BaseModelMBean; /** Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ContextEnvironmentMBean.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ContextEnvironmentMBean.java?rev=367054&r1=367053&r2=367054&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ContextEnvironmentMBean.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ContextEnvironmentMBean.java Sun Jan 8 09:49:20 2006 @@ -17,13 +17,10 @@ package org.apache.catalina.mbeans; -import java.util.ArrayList; import javax.management.Attribute; import javax.management.AttributeNotFoundException; import javax.management.InstanceNotFoundException; -import javax.management.MalformedObjectNameException; import javax.management.MBeanException; -import javax.management.ObjectName; import javax.management.ReflectionException; import javax.management.RuntimeOperationsException; import javax.management.modelmbean.InvalidTargetObjectTypeException; Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ContextResourceLinkMBean.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ContextResourceLinkMBean.java?rev=367054&r1=367053&r2=367054&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ContextResourceLinkMBean.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/ContextResourceLinkMBean.java Sun Jan 8 09:49:20 2006 @@ -17,19 +17,15 @@ package org.apache.catalina.mbeans; -import java.util.ArrayList; im
svn commit: r367115 - /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java
Author: markt Date: Sun Jan 8 14:48:43 2006 New Revision: 367115 URL: http://svn.apache.org/viewcvs?rev=367115&view=rev Log: Fix bug 29214. containsHeader() not working for Content-Length and Content-Type Modified: tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java Modified: tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java?rev=367115&r1=367114&r2=367115&view=diff == --- tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java (original) +++ tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java Sun Jan 8 14:48:43 2006 @@ -117,6 +117,16 @@ protected boolean charsetSet = false; /** + * Has the content length been explicitly set. + */ +protected boolean contentLengthSet = false; + +/** + * Has the content type been explicitly set. + */ +protected boolean contentTypeSet = false; + +/** * Request error URI. */ protected String errorURI = null; @@ -276,12 +286,15 @@ // Reset the headers only if this is the main request, // not for included -contentType = null;; +contentType = null; locale = DEFAULT_LOCALE; contentLanguage = null; characterEncoding = Constants.DEFAULT_CHARACTER_ENCODING; contentLength = -1; charsetSet = false; +contentTypeSet = false; +contentLengthSet = false; + status = 200; message = null; @@ -312,6 +325,14 @@ // Headers public boolean containsHeader(String name) { +char cc=name.charAt(0); +if(cc=='C' || cc=='c') { +if(name.equalsIgnoreCase("Content-Type")) { +return contentTypeSet; +} else if(name.equalsIgnoreCase("Content-Length")) { +return contentLengthSet; +} +} return headers.getHeader(name) != null; } @@ -361,6 +382,7 @@ } if( name.equalsIgnoreCase( "Content-Language" ) ) { // XXX XXX Need to construct Locale or something else +// Needs special handling in containsHeader() as well } return false; } @@ -454,9 +476,12 @@ if (type == null) { this.contentType = null; +contentTypeSet = false; return; } +contentTypeSet = true; + /* * Remove the charset param (if any) from the Content-Type, and use it * to set the response encoding. @@ -469,7 +494,7 @@ while (index != -1) { semicolonIndex = index; index++; -while (index < len && Character.isSpace(type.charAt(index))) { +while (index < len && Character.isWhitespace(type.charAt(index))) { index++; } if (index+8 < len @@ -526,10 +551,12 @@ public void setContentLength(int contentLength) { this.contentLength = contentLength; +contentLengthSet = true; } public void setContentLength(long contentLength) { this.contentLength = contentLength; +contentLengthSet = true; } public int getContentLength() { @@ -565,6 +592,8 @@ locale = DEFAULT_LOCALE; characterEncoding = Constants.DEFAULT_CHARACTER_ENCODING; charsetSet = false; +contentLengthSet = false; +contentTypeSet = false; contentLength = -1; status = 200; message = null; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r367818 - in /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote: Response.java tomcat4/CoyoteResponse.java
Author: markt Date: Tue Jan 10 14:37:51 2006 New Revision: 367818 URL: http://svn.apache.org/viewcvs?rev=367818&view=rev Log: Alternative patch for bug 29214 based on Remy's comments Modified: tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java Modified: tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java?rev=367818&r1=367817&r2=367818&view=diff == --- tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java (original) +++ tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java Tue Jan 10 14:37:51 2006 @@ -117,16 +117,6 @@ protected boolean charsetSet = false; /** - * Has the content length been explicitly set. - */ -protected boolean contentLengthSet = false; - -/** - * Has the content type been explicitly set. - */ -protected boolean contentTypeSet = false; - -/** * Request error URI. */ protected String errorURI = null; @@ -292,9 +282,6 @@ characterEncoding = Constants.DEFAULT_CHARACTER_ENCODING; contentLength = -1; charsetSet = false; -contentTypeSet = false; -contentLengthSet = false; - status = 200; message = null; @@ -324,15 +311,11 @@ // Headers +/** + * Warning: This method always returns false for Content-Type + * and Content-Length. + */ public boolean containsHeader(String name) { -char cc=name.charAt(0); -if(cc=='C' || cc=='c') { -if(name.equalsIgnoreCase("Content-Type")) { -return contentTypeSet; -} else if(name.equalsIgnoreCase("Content-Length")) { -return contentLengthSet; -} -} return headers.getHeader(name) != null; } @@ -382,7 +365,6 @@ } if( name.equalsIgnoreCase( "Content-Language" ) ) { // XXX XXX Need to construct Locale or something else -// Needs special handling in containsHeader() as well } return false; } @@ -476,12 +458,9 @@ if (type == null) { this.contentType = null; -contentTypeSet = false; return; } -contentTypeSet = true; - /* * Remove the charset param (if any) from the Content-Type, and use it * to set the response encoding. @@ -551,12 +530,10 @@ public void setContentLength(int contentLength) { this.contentLength = contentLength; -contentLengthSet = true; } public void setContentLength(long contentLength) { this.contentLength = contentLength; -contentLengthSet = true; } public int getContentLength() { @@ -592,8 +569,6 @@ locale = DEFAULT_LOCALE; characterEncoding = Constants.DEFAULT_CHARACTER_ENCODING; charsetSet = false; -contentLengthSet = false; -contentTypeSet = false; contentLength = -1; status = 200; message = null; Modified: tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java?rev=367818&r1=367817&r2=367818&view=diff == --- tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java (original) +++ tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java Tue Jan 10 14:37:51 2006 @@ -235,6 +235,12 @@ */ protected CharChunk redirectURLCC = new CharChunk(); + +/** + * Has the Content-Length header been explicitly set. + */ +protected boolean contentLengthSet = false; + // - Public Methods @@ -260,6 +266,7 @@ writer.recycle(); +contentLengthSet = false; } @@ -579,6 +586,7 @@ coyoteResponse.reset(); outputBuffer.reset(); +contentLengthSet = false; } @@ -635,6 +643,8 @@ coyoteResponse.setContentLength(length); +contentLengthSet = true; + } @@ -848,6 +858,13 @@ coyoteResponse.addHeader(name, value); +char cc=name.charAt(0); +if(cc=='C' || cc=='c') { +if(name.equalsIgnoreCase("Content-Length")) { +contentLengthSet = true; +} +} + }
svn commit: r367826 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/connector/Response.java webapps/docs/changelog.xml
Author: markt Date: Tue Jan 10 15:06:22 2006 New Revision: 367826 URL: http://svn.apache.org/viewcvs?rev=367826&view=rev Log: Alternative patch for bug 29214 based on Remy's comments Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java?rev=367826&r1=367825&r2=367826&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java Tue Jan 10 15:06:22 2006 @@ -219,9 +219,9 @@ private boolean isCharacterEncodingSet = false; /** - * The contextType flag + * The contentLength flag */ -private boolean isContentTypeSet = false; +private boolean isContentLengthSet = false; /** @@ -275,7 +275,7 @@ appCommitted = false; included = false; error = false; -isContentTypeSet = false; +isContentLengthSet = false; isCharacterEncodingSet = false; cookies.clear(); @@ -651,6 +651,7 @@ coyoteResponse.reset(); outputBuffer.reset(); +isContentLengthSet = false; } @@ -708,6 +709,8 @@ return; coyoteResponse.setContentLength(length); + +isContentLengthSet = true; } @@ -744,7 +747,8 @@ if (index != -1) { int len = type.length(); index++; -while (index < len && Character.isSpace(type.charAt(index))) { +while (index < len +&& Character.isWhitespace(type.charAt(index))) { index++; } if (index+7 < len @@ -760,8 +764,6 @@ } } } - -isContentTypeSet = true; } @@ -1011,6 +1013,12 @@ coyoteResponse.addHeader(name, value); +char cc=name.charAt(0); +if(cc=='C' || cc=='c') { +if(name.equalsIgnoreCase("Content-Length")) { +isContentLengthSet = true; +} +} } @@ -1040,6 +1048,20 @@ * @param name Name of the header to check */ public boolean containsHeader(String name) { +// Need special handling for Content-Type and Content-Length due to +// special handling of these in coyoteResponse +char cc=name.charAt(0); +if(cc=='C' || cc=='c') { +if(name.equalsIgnoreCase("Content-Type")) { +// Will return null if this has not been set +return (coyoteResponse.getContentType() != null); +} +if(name.equalsIgnoreCase("Content-Length")) { +// Can't use null test since this header is an int +return isContentLengthSet; +} +} + return coyoteResponse.containsHeader(name); } @@ -1268,6 +1290,13 @@ return; coyoteResponse.setHeader(name, value); + +char cc=name.charAt(0); +if(cc=='C' || cc=='c') { +if(name.equalsIgnoreCase("Content-Length")) { +isContentLengthSet = true; +} +} } Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=367826&r1=367825&r2=367826&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Tue Jan 10 15:06:22 2006 @@ -25,11 +25,16 @@ -23950: Context.listBindings() should return objects not references. (markt) +23950: Context.listBindings() should return objects not +references. (markt) 38124: Add support for Windows 20xx when reading environment variables in CGIServlet. (markt) + + +29214: response.containsHeader() now returns the correct +value for Content-Type and Content-Length headers. (markt) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r368124 - /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java
Author: markt Date: Wed Jan 11 12:45:30 2006 New Revision: 368124 URL: http://svn.apache.org/viewcvs?rev=368124&view=rev Log: Further improvements to patch for bug 29214. Modified: tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java Modified: tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java?rev=368124&r1=368123&r2=368124&view=diff == --- tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java (original) +++ tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java Wed Jan 11 12:45:30 2006 @@ -236,12 +236,6 @@ protected CharChunk redirectURLCC = new CharChunk(); -/** - * Has the Content-Length header been explicitly set. - */ -protected boolean contentLengthSet = false; - - // - Public Methods @@ -265,8 +259,6 @@ } writer.recycle(); - -contentLengthSet = false; } @@ -586,7 +578,6 @@ coyoteResponse.reset(); outputBuffer.reset(); -contentLengthSet = false; } @@ -643,8 +634,6 @@ coyoteResponse.setContentLength(length); -contentLengthSet = true; - } @@ -858,13 +847,6 @@ coyoteResponse.addHeader(name, value); -char cc=name.charAt(0); -if(cc=='C' || cc=='c') { -if(name.equalsIgnoreCase("Content-Length")) { -contentLengthSet = true; -} -} - } @@ -904,7 +886,7 @@ } if(name.equalsIgnoreCase("Content-Length")) { // Can't use null test since this header is an int -return contentLengthSet; +return (coyoteResponse.getContentLengthLong() != -1); } } @@ -1129,13 +,6 @@ return; coyoteResponse.setHeader(name, value); - -char cc=name.charAt(0); -if(cc=='C' || cc=='c') { -if(name.equalsIgnoreCase("Content-Length")) { -contentLengthSet = true; -} -} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r368125 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java
Author: markt Date: Wed Jan 11 12:45:57 2006 New Revision: 368125 URL: http://svn.apache.org/viewcvs?rev=368125&view=rev Log: Further improvements to patch for bug 29214. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java?rev=368125&r1=368124&r2=368125&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java Wed Jan 11 12:45:57 2006 @@ -219,12 +219,6 @@ private boolean isCharacterEncodingSet = false; /** - * The contentLength flag - */ -private boolean isContentLengthSet = false; - - -/** * The error flag. */ protected boolean error = false; @@ -275,7 +269,6 @@ appCommitted = false; included = false; error = false; -isContentLengthSet = false; isCharacterEncodingSet = false; cookies.clear(); @@ -651,7 +644,6 @@ coyoteResponse.reset(); outputBuffer.reset(); -isContentLengthSet = false; } @@ -709,8 +701,6 @@ return; coyoteResponse.setContentLength(length); - -isContentLengthSet = true; } @@ -1013,12 +1003,6 @@ coyoteResponse.addHeader(name, value); -char cc=name.charAt(0); -if(cc=='C' || cc=='c') { -if(name.equalsIgnoreCase("Content-Length")) { -isContentLengthSet = true; -} -} } @@ -1057,8 +1041,8 @@ return (coyoteResponse.getContentType() != null); } if(name.equalsIgnoreCase("Content-Length")) { -// Can't use null test since this header is an int -return isContentLengthSet; +// -1 means not known and is not sent to client +return (coyoteResponse.getContentLengthLong() != -1); } } @@ -1290,13 +1274,6 @@ return; coyoteResponse.setHeader(name, value); - -char cc=name.charAt(0); -if(cc=='C' || cc=='c') { -if(name.equalsIgnoreCase("Content-Length")) { -isContentLengthSet = true; -} -} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r368491 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java
Author: markt Date: Thu Jan 12 14:06:06 2006 New Revision: 368491 URL: http://svn.apache.org/viewcvs?rev=368491&view=rev Log: Revert code cleanup as replacement for deprecated method actually does something different. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java?rev=368491&r1=368490&r2=368491&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java Thu Jan 12 14:06:06 2006 @@ -737,8 +737,7 @@ if (index != -1) { int len = type.length(); index++; -while (index < len -&& Character.isWhitespace(type.charAt(index))) { +while (index < len && Character.isSpace(type.charAt(index))) { index++; } if (index+7 < len - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r368493 - /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java
Author: markt Date: Thu Jan 12 14:10:51 2006 New Revision: 368493 URL: http://svn.apache.org/viewcvs?rev=368493&view=rev Log: Revert code cleanup as replacement for deprecated method actually does something different. Modified: tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java Modified: tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java?rev=368493&r1=368492&r2=368493&view=diff == --- tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java (original) +++ tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java Thu Jan 12 14:10:51 2006 @@ -473,7 +473,7 @@ while (index != -1) { semicolonIndex = index; index++; -while (index < len && Character.isWhitespace(type.charAt(index))) { +while (index < len && Character.isSpace(type.charAt(index))) { index++; } if (index+8 < len - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r368829 - /tomcat/container/tc5.5.x/webapps/docs/changelog.xml
Author: markt Date: Fri Jan 13 11:26:44 2006 New Revision: 368829 URL: http://svn.apache.org/viewcvs?rev=368829&view=rev Log: Fix build. Stop Gump complaining. Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=368829&r1=368828&r2=368829&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Fri Jan 13 11:26:44 2006 @@ -54,6 +54,7 @@ Add some useful hints to jasper-howto. (pero). + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r369286 - /tomcat/jasper/tc6.0.x/
Author: markt Date: Sun Jan 15 16:08:16 2006 New Revision: 369286 URL: http://svn.apache.org/viewcvs?rev=369286&view=rev Log: Create 6.0.x branch for Jasper 2. Take opportunity to remove useless jasper2 directory from top of tree (should do this for 4 & 5 as well) Added: tomcat/jasper/tc6.0.x/ - copied from r369284, tomcat/jasper/tc5.5.x/jasper2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r369287 - /tomcat/jasper/tc6.0.x/LICENSE
Author: markt Date: Sun Jan 15 16:09:55 2006 New Revision: 369287 URL: http://svn.apache.org/viewcvs?rev=369287&view=rev Log: Copy LICENSE file for tc6.0.x branch Added: tomcat/jasper/tc6.0.x/LICENSE - copied unchanged from r369286, tomcat/jasper/tc5.5.x/LICENSE - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r369288 - /tomcat/jasper/tags/tc6.0.x/
Author: markt Date: Sun Jan 15 16:11:33 2006 New Revision: 369288 URL: http://svn.apache.org/viewcvs?rev=369288&view=rev Log: Add directory for tc6.0.x tags Added: tomcat/jasper/tags/tc6.0.x/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r369577 - /tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/jndi-datasource-examples-howto.xml
Author: markt Date: Mon Jan 16 13:54:48 2006 New Revision: 369577 URL: http://svn.apache.org/viewcvs?rev=369577&view=rev Log: Fix bug 15946. Update Oracle examples. Modified: tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/jndi-datasource-examples-howto.xml Modified: tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/jndi-datasource-examples-howto.xml URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/jndi-datasource-examples-howto.xml?rev=369577&r1=369576&r2=369577&view=diff == --- tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/jndi-datasource-examples-howto.xml (original) +++ tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/jndi-datasource-examples-howto.xml Mon Jan 16 13:54:48 2006 @@ -379,21 +379,37 @@ - + 0.Introduction -We would appreciate comments on this section as I'm not an Oracle DBA :-) -Oracle requires minimal changes from the MySQL configuration except for the usual gotchas :-) Firstly -by default, Tomcat will only use *.jar files installed in $CATALINA_HOME/common/lib - therefore classes111.zip or classes12.zip will need to be renamed with a .jar -extension. Since jarfiles are zipfiles, there is no need to unzip and jar these files - a simple rename will suffice. -Also, you should be aware that some (early) versions of Tomcat 4.0 when used with JDK 1.4 will not load classes12.zip unless -you unzip the file, remove the javax.sql.* class heirarchy and rejar. + +Oracle requires minimal changes from the MySQL configuration except for the +usual gotchas :-) +Drivers for older Oracle versions may be distributed as *.zip files rather +than *.jar files. Tomcat will only use *.jar files installed in +$CATALINA_HOME/common/lib. Therefore classes111.zip +or classes12.zip will need to be renamed with a .jar +extension. Since jarfiles are zipfiles, there is no need to unzip and jar these +files - a simple rename will suffice. + +Some early versions of Tomcat 4.0 when used with JDK 1.4 will not load +classes12.zip unless you unzip the file, remove the javax.sql.* +class heirarchy and rejar. + +For Oracle 9i onwards you should use oracle.jdbc.OracleDriver +rather than oracle.jdbc.driver.OracleDriver as Oracle have stated +that oracle.jdbc.driver.OracleDriver is deprecated and support +for this driver class will be discontinued in the next major release. + + 1.server.xml configuration -In a similar manner to the mysql config above, you will need to define your Datasource in your server.xml -file. Here we define a Datasource called myoracle using the thin driver to connect as user scott, password tiger -to the schema called myschema in the sid called mysid. (Note: with the thin driver this sid is not the same as the tnsname) +In a similar manner to the mysql config above, you will need to define your +Datasource in your server.xml file. Here we define a Datasource called myoracle +using the thin driver to connect as user scott, password tiger to the sid +called mysid. (Note: with the thin driver this sid is not the same as the +tnsname). The schema used will be the default schema for the user scott. -Use of the OCI driver should simply involve a changing thin to oci in the URL string. +Use of the OCI driver should simply involve a changing thin to oci in the URL +string. <Resource name="jdbc/myoracle" auth="Container" type="javax.sql.DataSource"/> @@ -405,11 +421,11 @@ </parameter> <parameter> <name>driverClassName</name> -<value>oracle.jdbc.driver.OracleDriver</value> +<value>oracle.jdbc.OracleDriver</value> </parameter> <parameter> <name>url</name> -<value>jdbc:oracle:thin:[EMAIL PROTECTED]:1521:mysid</value> +<value>jdbc:oracle:thin:@127.0.0.1:1521:mysid</value> </parameter> <parameter> <name>username</name> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r369578 - /tomcat/container/tc5.5.x/webapps/docs/jndi-datasource-examples-howto.xml
Author: markt Date: Mon Jan 16 13:55:26 2006 New Revision: 369578 URL: http://svn.apache.org/viewcvs?rev=369578&view=rev Log: Port fix for bug 15946. Update Oracle examples. Modified: tomcat/container/tc5.5.x/webapps/docs/jndi-datasource-examples-howto.xml Modified: tomcat/container/tc5.5.x/webapps/docs/jndi-datasource-examples-howto.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/jndi-datasource-examples-howto.xml?rev=369578&r1=369577&r2=369578&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/jndi-datasource-examples-howto.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/jndi-datasource-examples-howto.xml Mon Jan 16 13:55:26 2006 @@ -304,25 +304,40 @@ - + 0.Introduction -We would appreciate comments on this section as I'm not an Oracle DBA :-) -Oracle requires minimal changes from the MySQL configuration except for the usual gotchas :-) Firstly -by default, Tomcat will only use *.jar files installed in $CATALINA_HOME/common/lib - therefore classes111.zip or classes12.zip will need to be renamed with a .jar -extension. Since jarfiles are zipfiles, there is no need to unzip and jar these files - a simple rename will suffice. -Also, you should be aware that some (early) versions of Tomcat 4.0 when used with JDK 1.4 will not load classes12.zip unless -you unzip the file, remove the javax.sql.* class heirarchy and rejar. + +Oracle requires minimal changes from the MySQL configuration except for the +usual gotchas :-) +Drivers for older Oracle versions may be distributed as *.zip files rather +than *.jar files. Tomcat will only use *.jar files installed in +$CATALINA_HOME/common/lib. Therefore classes111.zip +or classes12.zip will need to be renamed with a .jar +extension. Since jarfiles are zipfiles, there is no need to unzip and jar these +files - a simple rename will suffice. + +Some early versions of Tomcat 4.0 when used with JDK 1.4 will not load +classes12.zip unless you unzip the file, remove the javax.sql.* +class heirarchy and rejar. + +For Oracle 9i onwards you should use oracle.jdbc.OracleDriver +rather than oracle.jdbc.driver.OracleDriver as Oracle have stated +that oracle.jdbc.driver.OracleDriver is deprecated and support +for this driver class will be discontinued in the next major release. + + 1.server.xml configuration -In a similar manner to the mysql config above, you will need to define your Datasource in your server.xml -file. Here we define a Datasource called myoracle using the thin driver to connect as user scott, password tiger -to the schema called myschema in the sid called mysid. (Note: with the thin driver this sid is not the same as the tnsname) +In a similar manner to the mysql config above, you will need to define your +Datasource in your server.xml file. Here we define a Datasource called myoracle +using the thin driver to connect as user scott, password tiger to the sid +called mysid. (Note: with the thin driver this sid is not the same as the +tnsname). The schema used will be the default schema for the user scott. Use of the OCI driver should simply involve a changing thin to oci in the URL string. <Resource name="jdbc/myoracle" auth="Container" - type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" - url="jdbc:oracle:thin:[EMAIL PROTECTED]:1521:mysid" + type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" + url="jdbc:oracle:thin:@127.0.0.1:1521:mysid" username="scott" password="tiger" maxActive="20" maxIdle="10" maxWait="-1"/> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r369933 - in /tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples: cal/cal2.jsp security/protected/index.jsp
Author: markt Date: Tue Jan 17 13:52:02 2006 New Revision: 369933 URL: http://svn.apache.org/viewcvs?rev=369933&view=rev Log: Fix XSS issues in examples. Modified: tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/cal/cal2.jsp tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/security/protected/index.jsp Modified: tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/cal/cal2.jsp URL: http://svn.apache.org/viewcvs/tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/cal/cal2.jsp?rev=369933&r1=369932&r2=369933&view=diff == --- tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/cal/cal2.jsp (original) +++ tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/cal/cal2.jsp Tue Jan 17 13:52:02 2006 @@ -29,12 +29,12 @@ Please add the following event: Date <%= table.getDate() %> - Time <%= time %> + Time <%= util.HTMLFilter.filter(time) %> - + Description of the event Modified: tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/security/protected/index.jsp URL: http://svn.apache.org/viewcvs/tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/security/protected/index.jsp?rev=369933&r1=369932&r2=369933&view=diff == --- tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/security/protected/index.jsp (original) +++ tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/security/protected/index.jsp Tue Jan 17 13:52:02 2006 @@ -49,11 +49,13 @@ if (role.length() > 0) { if (request.isUserInRole(role)) { %> - You have been granted role <%= role %> + You have been granted role + <%= util.HTMLFilter.filter(role) %> <% } else { %> - You have not been granted role <%= role %> + You have not been granted role + <%= util.HTMLFilter.filter(role) %> <% } } @@ -62,7 +64,7 @@ To check whether your username has been granted a particular role, enter it here: - + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r369934 - /tomcat/container/tc5.5.x/webapps/docs/changelog.xml
Author: markt Date: Tue Jan 17 13:53:01 2006 New Revision: 369934 URL: http://svn.apache.org/viewcvs?rev=369934&view=rev Log: Update changelog. Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=369934&r1=369933&r2=369934&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Tue Jan 17 13:53:01 2006 @@ -76,6 +76,13 @@ + + + +Fix some XSS issues in the JSP examples. (markt) + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r369935 - in /tomcat/container/branches/tc4.1.x/webapps/examples/jsp: cal/cal2.jsp security/protected/index.jsp
Author: markt Date: Tue Jan 17 13:53:49 2006 New Revision: 369935 URL: http://svn.apache.org/viewcvs?rev=369935&view=rev Log: Fix XSS issues in examples. Modified: tomcat/container/branches/tc4.1.x/webapps/examples/jsp/cal/cal2.jsp tomcat/container/branches/tc4.1.x/webapps/examples/jsp/security/protected/index.jsp Modified: tomcat/container/branches/tc4.1.x/webapps/examples/jsp/cal/cal2.jsp URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/webapps/examples/jsp/cal/cal2.jsp?rev=369935&r1=369934&r2=369935&view=diff == --- tomcat/container/branches/tc4.1.x/webapps/examples/jsp/cal/cal2.jsp (original) +++ tomcat/container/branches/tc4.1.x/webapps/examples/jsp/cal/cal2.jsp Tue Jan 17 13:53:49 2006 @@ -18,12 +18,12 @@ Please add the following event: Date <%= table.getDate() %> - Time <%= time %> + Time <%= util.HTMLFilter.filter(time) %> - + Description of the event Modified: tomcat/container/branches/tc4.1.x/webapps/examples/jsp/security/protected/index.jsp URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/webapps/examples/jsp/security/protected/index.jsp?rev=369935&r1=369934&r2=369935&view=diff == --- tomcat/container/branches/tc4.1.x/webapps/examples/jsp/security/protected/index.jsp (original) +++ tomcat/container/branches/tc4.1.x/webapps/examples/jsp/security/protected/index.jsp Tue Jan 17 13:53:49 2006 @@ -34,11 +34,13 @@ if (role.length() > 0) { if (request.isUserInRole(role)) { %> - You have been granted role <%= role %> + You have been granted role + <%= util.HTMLFilter.filter(role) %> <% } else { %> - You have not been granted role <%= role %> + You have not been granted role + <%= util.HTMLFilter.filter(role) %> <% } } @@ -47,7 +49,7 @@ To check whether your username has been granted a particular role, enter it here: - + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r370301 - /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java
Author: markt Date: Wed Jan 18 15:15:11 2006 New Revision: 370301 URL: http://svn.apache.org/viewcvs?rev=370301&view=rev Log: Remove unused private method Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java?rev=370301&r1=370300&r2=370301&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java Wed Jan 18 15:15:11 2006 @@ -2024,42 +2024,6 @@ /** - * Return true if the specified client and server addresses - * are the same. This method works around a bug in the IBM 1.1.8 JVM on - * Linux, where the address bytes are returned reversed in some - * circumstances. - * - * @param server The server's InetAddress - * @param client The client's InetAddress - */ -private boolean isSameAddress(InetAddress server, InetAddress client) { - -// Compare the byte array versions of the two addresses -byte serverAddr[] = server.getAddress(); -byte clientAddr[] = client.getAddress(); -if (serverAddr.length != clientAddr.length) -return (false); -boolean match = true; -for (int i = 0; i < serverAddr.length; i++) { -if (serverAddr[i] != clientAddr[i]) { -match = false; -break; -} -} -if (match) -return (true); - -// Compare the reversed form of the two addresses -for (int i = 0; i < serverAddr.length; i++) { -if (serverAddr[i] != clientAddr[(serverAddr.length-1)-i]) -return (false); -} -return (true); - -} - - -/** * Return true if naming should be used. */ private boolean isUseNaming() { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r370306 - in /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina: core/StandardServer.java mbeans/mbeans-descriptors.xml
Author: markt Date: Wed Jan 18 15:52:38 2006 New Revision: 370306 URL: http://svn.apache.org/viewcvs?rev=370306&view=rev Log: Port Peter's patch to add jmx serverInfo attribute to Server mbean Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java?rev=370306&r1=370305&r2=370306&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java Wed Jan 18 15:52:38 2006 @@ -75,6 +75,7 @@ import org.apache.catalina.session.PersistentManager; import org.apache.catalina.session.StandardManager; import org.apache.catalina.util.LifecycleSupport; +import org.apache.catalina.util.ServerInfo; import org.apache.catalina.util.StringManager; @@ -387,6 +388,17 @@ } +/** + * Report the current Tomcat Server Release number + * @return Tomcat release identifier + */ +public String getServerInfo() { + +return ServerInfo.getServerInfo(); + +} + + /** * Return the shutdown command string we are waiting for. */ Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml?rev=370306&r1=370305&r2=370306&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml Wed Jan 18 15:52:38 2006 @@ -2614,6 +2614,11 @@ description="TCP port for shutdown messages" type="int"/> + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r370664 - /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java
Author: markt Date: Thu Jan 19 15:01:07 2006 New Revision: 370664 URL: http://svn.apache.org/viewcvs?rev=370664&view=rev Log: Code clean up. Remove unused code. Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java?rev=370664&r1=370663&r2=370664&view=diff == --- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java (original) +++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java Thu Jan 19 15:01:07 2006 @@ -22,7 +22,6 @@ import java.io.File; import java.util.ArrayList; import java.util.HashMap; -import org.apache.catalina.Container; import org.apache.catalina.LifecycleException; import org.apache.catalina.util.StringManager; import org.apache.commons.digester.Digester; @@ -50,12 +49,6 @@ /** - * The Container with which this Realm is associated. - */ -private Container container = null; - - -/** * The Digester we will use to process in-memory database files. */ private static Digester digester = null; @@ -93,12 +86,6 @@ */ private static StringManager sm = StringManager.getManager(Constants.Package); - - -/** - * Has this component been started? - */ -private boolean started = false; // - Properties - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r371686 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java
Author: markt Date: Mon Jan 23 14:12:00 2006 New Revision: 371686 URL: http://svn.apache.org/viewcvs?rev=371686&view=rev Log: Make it easier to customise the mapping between certificate DN and username when authenticating using CLIENT-CERT. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java?rev=371686&r1=371685&r2=371686&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java Mon Jan 23 14:12:00 2006 @@ -409,7 +409,7 @@ } // Check the existence of the client Principal in our database -return (getPrincipal(certs[0].getSubjectDN().getName())); +return (getPrincipal(certs[0])); } @@ -1132,6 +1132,14 @@ */ protected abstract String getPassword(String username); + +/** + * Return the Principal associated with the given certificate. + */ +protected Principal getPrincipal(X509Certificate usercert) { +return(getPrincipal(usercert.getSubjectDN().getName())); +} + /** * Return the Principal associated with the given user name. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r372290 [3/3] - in /tomcat/site/trunk: docs/faq/ docs/faq/printer/ xdocs-faq/
Modified: tomcat/site/trunk/docs/faq/printer/unix.html URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/docs/faq/printer/unix.html?rev=372290&r1=372289&r2=372290&view=diff == --- tomcat/site/trunk/docs/faq/printer/unix.html (original) +++ tomcat/site/trunk/docs/faq/printer/unix.html Wed Jan 25 11:00:50 2006 @@ -1,9 +1,7 @@ Tomcat FAQ - Unix / Linux Questions dt { font-size : larger; font-weight : bold } dd {padding-bottom : 10px;} -http://jakarta.apache.org/";>http://jakarta.apache.org//images/jakarta-logo.gif";>http://tomcat.apache.org/faq/";>Tomcat FAQUnix / Linux QuestionsPreface +http://tomcat.apache.org/";>Apache Tomcathttp://www.apache.org/";>http://www.apache.org/images/asf-logo.gif";>Tomcat FAQUnix / Linux QuestionsPreface I wish there was more to say right here or to link to something. On to the questions... Modified: tomcat/site/trunk/docs/faq/printer/version.html URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/docs/faq/printer/version.html?rev=372290&r1=372289&r2=372290&view=diff == --- tomcat/site/trunk/docs/faq/printer/version.html (original) +++ tomcat/site/trunk/docs/faq/printer/version.html Wed Jan 25 11:00:50 2006 @@ -1,9 +1,7 @@ Tomcat FAQ - Which Version dt { font-size : larger; font-weight : bold } dd {padding-bottom : 10px;} -http://jakarta.apache.org/";>http://jakarta.apache.org//images/jakarta-logo.gif";>http://tomcat.apache.org/faq/";>Tomcat FAQWhich VersionPreface +http://tomcat.apache.org/";>Apache Tomcathttp://www.apache.org/";>http://www.apache.org/images/asf-logo.gif";>Tomcat FAQWhich VersionPreface This page discusses the differences between the different Tomcat versions. If you Modified: tomcat/site/trunk/docs/faq/printer/windows.html URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/docs/faq/printer/windows.html?rev=372290&r1=372289&r2=372290&view=diff == --- tomcat/site/trunk/docs/faq/printer/windows.html (original) +++ tomcat/site/trunk/docs/faq/printer/windows.html Wed Jan 25 11:00:50 2006 @@ -1,9 +1,7 @@ Tomcat FAQ - Windows Questions dt { font-size : larger; font-weight : bold } dd {padding-bottom : 10px;} -http://jakarta.apache.org/";>http://jakarta.apache.org//images/jakarta-logo.gif";>http://tomcat.apache.org/faq/";>Tomcat FAQWindows QuestionsPreface +http://tomcat.apache.org/";>Apache Tomcathttp://www.apache.org/";>http://www.apache.org/images/asf-logo.gif";>Tomcat FAQWindows QuestionsPreface The will address various windows issues. Please see the http://wiki.apache.org/tomcat/UsefulLinks";> Modified: tomcat/site/trunk/docs/faq/security.html URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/docs/faq/security.html?rev=372290&r1=372289&r2=372290&view=diff == --- tomcat/site/trunk/docs/faq/security.html (original) +++ tomcat/site/trunk/docs/faq/security.html Wed Jan 25 11:00:50 2006 @@ -1,9 +1,7 @@ Tomcat FAQ - Security dt { font-size : larger; font-weight : bold } dd {padding-bottom : 10px;} -http://jakarta.apache.org/";>http://jakarta.apache.org//images/jakarta-logo.gif";>http://tomcat.apache.org/faq/";>LinksTomcat HomeFAQ HomeContentsBugsClass Not FoundClusteringConnectorsDatabaseDeploymentDevelopmentFDA Validationhttp://wiki.apache.org/tomcat/HowTo";>How do ILinux / UnixOther Operating SystemsLogging< a href="memory.html">MemoryMetaMiscellaneousMonitoring / Performancehttp://wiki.apache.org/tomcat/UsefulLinks";>Other ResourcesSecurityWhich VersionTomcat User Listhttp://wiki.apache.org/tomcat/";>WikiWindowsTomcat FAQSecurityprint-friendlyversion +http://tomcat.apache.org/";>Apache Tomcathttp://www.apache.org/";>http://www.apache.org/images/asf-logo.gif";>LinksTomcat HomeFAQ HomeContentsBugsClass Not FoundClusteringConnectorsDatabaseDeploymentDevelopmentFDA Validationhttp://wiki.apache.org/tomcat/HowTo";>How do ILinux / UnixOther Operating SystemsLoggingMemoryMetaMiscellaneousMonitoring / Performancehttp://wiki.apache.org/tomcat/UsefulLinks";>Other ResourcesSecurityWhich VersionTomcat User Listhttp://wiki.apa che.org/tomcat/">WikiWindowsTomcat FAQSecurityprint-friendlyversion Preface This FAQ section provides help with some security-related issues. Modified: tomcat/site/trunk/docs/faq/tomcatuser.html URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/docs/faq/tomcatuser.html?rev=372290&r1=372289&r2=372290&view=diff == --- tomcat/site/trunk/docs/faq/tomcatuser.html (original) +++ tomcat/site/trunk/docs/faq/tomcatuser.html Wed Jan 25 11:00:50 2006 @@ -1,9 +1,7 @@ Tomcat FAQ - About Tomcat User
svn commit: r373023 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm: DataSourceRealm.java JDBCRealm.java JNDIRealm.java MemoryRealm.java UserDatabaseRealm.java
Author: markt Date: Fri Jan 27 15:17:43 2006 New Revision: 373023 URL: http://svn.apache.org/viewcvs?rev=373023&view=rev Log: Fix NPEs and potential NPEs now containerLog is initialized in RealmBase.start() Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/UserDatabaseRealm.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java?rev=373023&r1=373022&r2=373023&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java Fri Jan 27 15:17:43 2006 @@ -620,6 +620,9 @@ */ public void start() throws LifecycleException { +// Perform normal superclass initialization +super.start(); + // Create the roles PreparedStatement string preparedRoles = new StringBuffer("SELECT "); preparedRoles.append(roleNameCol); @@ -637,9 +640,6 @@ preparedCredentials.append(" WHERE "); preparedCredentials.append(userNameCol); preparedCredentials.append(" = ?"); - -// Perform normal superclass initialization -super.start(); } Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java?rev=373023&r1=373022&r2=373023&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java Fri Jan 27 15:17:43 2006 @@ -757,6 +757,9 @@ */ public void start() throws LifecycleException { +// Perform normal superclass initialization +super.start(); + // Validate that we can open our connection - but let tomcat // startup in case the database is temporarily unavailable try { @@ -764,9 +767,6 @@ } catch (SQLException e) { containerLog.error(sm.getString("jdbcRealm.open"), e); } - -// Perform normal superclass initialization -super.start(); } Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java?rev=373023&r1=373022&r2=373023&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java Fri Jan 27 15:17:43 2006 @@ -1596,15 +1596,15 @@ */ public void start() throws LifecycleException { +// Perform normal superclass initialization +super.start(); + // Validate that we can open our connection try { open(); } catch (NamingException e) { throw new LifecycleException(sm.getString("jndiRealm.open"), e); } - -// Perform normal superclass initialization -super.start(); } Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java?rev=373023&r1=373022&r2=373023&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java Fri Jan 27 15:17:43 2006 @@ -290,6 +290,9 @@ */ public synchronized void start() throws LifecycleException { +// Perform normal superclass initialization +super.start(); + // Validate the existence of our database file File file = new File(pathname); if (!file.isAbsolute()) @@ -314,9 +317,6 @@ } finally { di
svn commit: r373029 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
Author: markt Date: Fri Jan 27 15:27:16 2006 New Revision: 373029 URL: http://svn.apache.org/viewcvs?rev=373029&view=rev Log: Bug 7831 Add basic support for CLIENT-CERT authentication in JNDIRealm It is likely that users will have to extend JNDIRealm and override getPrincipal(X509Certificate) for their particular configuration. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java?rev=373029&r1=373028&r2=373029&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java Fri Jan 27 15:27:16 2006 @@ -986,10 +986,6 @@ // Form the dn from the user pattern String dn = userPatternFormatArray[curUserPattern].format(new String[] { username }); -// Return if no attributes to retrieve -if (attrIds == null || attrIds.length == 0) -return new User(username, dn, null, null); - // Get required attributes from user entry Attributes attrs = null; try { @@ -1485,17 +1481,80 @@ } - /** * Return the Principal associated with the given user name. */ protected Principal getPrincipal(String username) { -return (null); +DirContext context = null; +Principal principal = null; + +try { + +// Ensure that we have a directory context available +context = open(); + +// Occassionally the directory context will timeout. Try one more +// time before giving up. +try { + +// Authenticate the specified username if possible +principal = getPrincipal(context, username); + +} catch (CommunicationException e) { + +// log the exception so we know it's there. +containerLog.warn(sm.getString("jndiRealm.exception"), e); + +// close the connection so we know it will be reopened. +if (context != null) +close(context); + +// open a new directory context. +context = open(); + +// Try the authentication again. +principal = getPrincipal(context, username); + +} + + +// Release this context +release(context); + +// Return the authenticated Principal (if any) +return (principal); + +} catch (NamingException e) { + +// Log the problem for posterity +containerLog.error(sm.getString("jndiRealm.exception"), e); + +// Close the connection so that it gets reopened next time +if (context != null) +close(context); + +// Return "not authenticated" for this request +return (null); + +} + } +/** + * Return the Principal associated with the given user name. + */ +protected synchronized Principal getPrincipal(DirContext context, + String username) +throws NamingException { + +User user = getUser(context, username); + +return new GenericPrincipal(this, user.username, user.password , +getRoles(context, user)); +} /** * Open (if necessary) and return a connection to the configured - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r373917 - in /tomcat/jasper/branches/tc4.1.x: BUILDING.txt README.txt build.xml doc/ jasper2/BUILDING.txt jasper2/README.txt jasper2/build.xml jasper2/doc/ jasper2/src/ src/
Author: markt Date: Tue Jan 31 13:57:16 2006 New Revision: 373917 URL: http://svn.apache.org/viewcvs?rev=373917&view=rev Log: Move files/directories up one level proir to removing jasper2 directory Added: tomcat/jasper/branches/tc4.1.x/BUILDING.txt - copied unchanged from r373915, tomcat/jasper/branches/tc4.1.x/jasper2/BUILDING.txt tomcat/jasper/branches/tc4.1.x/README.txt - copied unchanged from r373915, tomcat/jasper/branches/tc4.1.x/jasper2/README.txt tomcat/jasper/branches/tc4.1.x/build.xml - copied unchanged from r373915, tomcat/jasper/branches/tc4.1.x/jasper2/build.xml tomcat/jasper/branches/tc4.1.x/doc/ - copied from r373915, tomcat/jasper/branches/tc4.1.x/jasper2/doc/ tomcat/jasper/branches/tc4.1.x/src/ - copied from r373915, tomcat/jasper/branches/tc4.1.x/jasper2/src/ Removed: tomcat/jasper/branches/tc4.1.x/jasper2/BUILDING.txt tomcat/jasper/branches/tc4.1.x/jasper2/README.txt tomcat/jasper/branches/tc4.1.x/jasper2/build.xml tomcat/jasper/branches/tc4.1.x/jasper2/doc/ tomcat/jasper/branches/tc4.1.x/jasper2/src/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r373918 - /tomcat/jasper/branches/tc4.1.x/jasper2/
Author: markt Date: Tue Jan 31 14:00:04 2006 New Revision: 373918 URL: http://svn.apache.org/viewcvs?rev=373918&view=rev Log: Remove jasper2 directory Removed: tomcat/jasper/branches/tc4.1.x/jasper2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r373919 - /tomcat/container/branches/tc4.1.x/build.xml
Author: markt Date: Tue Jan 31 14:00:55 2006 New Revision: 373919 URL: http://svn.apache.org/viewcvs?rev=373919&view=rev Log: Update build to reflect removal of jasper2 directory Modified: tomcat/container/branches/tc4.1.x/build.xml Modified: tomcat/container/branches/tc4.1.x/build.xml URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/build.xml?rev=373919&r1=373918&r2=373919&view=diff == --- tomcat/container/branches/tc4.1.x/build.xml (original) +++ tomcat/container/branches/tc4.1.x/build.xml Tue Jan 31 14:00:55 2006 @@ -22,7 +22,7 @@ - + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r373927 - /tomcat/jasper/tc5.5.x/.classpath
Author: markt Date: Tue Jan 31 14:15:12 2006 New Revision: 373927 URL: http://svn.apache.org/viewcvs?rev=373927&view=rev Log: Remove old eclipse file no longer used Removed: tomcat/jasper/tc5.5.x/.classpath - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r373928 - in /tomcat/jasper/tc5.5.x: ./ doc/ jasper2/ jasper2/doc/ jasper2/src/ src/ src/bin/ src/share/
Author: markt Date: Tue Jan 31 14:19:27 2006 New Revision: 373928 URL: http://svn.apache.org/viewcvs?rev=373928&view=rev Log: Move files/directories up one level proir to removing jasper2 directory Added: tomcat/jasper/tc5.5.x/.classpath - copied unchanged from r373921, tomcat/jasper/tc5.5.x/jasper2/.classpath tomcat/jasper/tc5.5.x/.project - copied unchanged from r373921, tomcat/jasper/tc5.5.x/jasper2/.project tomcat/jasper/tc5.5.x/BUILDING.txt - copied unchanged from r373921, tomcat/jasper/tc5.5.x/jasper2/BUILDING.txt tomcat/jasper/tc5.5.x/README.txt - copied unchanged from r373921, tomcat/jasper/tc5.5.x/jasper2/README.txt tomcat/jasper/tc5.5.x/build.properties.sample - copied unchanged from r373921, tomcat/jasper/tc5.5.x/jasper2/build.properties.sample tomcat/jasper/tc5.5.x/build.xml - copied unchanged from r373921, tomcat/jasper/tc5.5.x/jasper2/build.xml tomcat/jasper/tc5.5.x/doc/ - copied from r373921, tomcat/jasper/tc5.5.x/jasper2/doc/ tomcat/jasper/tc5.5.x/doc/jspc.html - copied unchanged from r373927, tomcat/jasper/tc5.5.x/jasper2/doc/jspc.html tomcat/jasper/tc5.5.x/src/ - copied from r373921, tomcat/jasper/tc5.5.x/jasper2/src/ tomcat/jasper/tc5.5.x/src/bin/ - copied from r373927, tomcat/jasper/tc5.5.x/jasper2/src/bin/ tomcat/jasper/tc5.5.x/src/share/ - copied from r373927, tomcat/jasper/tc5.5.x/jasper2/src/share/ Removed: tomcat/jasper/tc5.5.x/jasper2/.classpath tomcat/jasper/tc5.5.x/jasper2/.cvsignore tomcat/jasper/tc5.5.x/jasper2/.project tomcat/jasper/tc5.5.x/jasper2/BUILDING.txt tomcat/jasper/tc5.5.x/jasper2/README.txt tomcat/jasper/tc5.5.x/jasper2/build.properties.sample tomcat/jasper/tc5.5.x/jasper2/build.xml tomcat/jasper/tc5.5.x/jasper2/doc/ tomcat/jasper/tc5.5.x/jasper2/src/ Modified: tomcat/jasper/tc5.5.x/ (props changed) Propchange: tomcat/jasper/tc5.5.x/ -- --- svn:ignore (added) +++ svn:ignore Tue Jan 31 14:19:27 2006 @@ -0,0 +1,3 @@ +build +dist +bin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r373929 - /tomcat/current/tc5.5.x/
Author: markt Date: Tue Jan 31 14:20:24 2006 New Revision: 373929 URL: http://svn.apache.org/viewcvs?rev=373929&view=rev Log: Update externals definition now jasper2 directory is no more Modified: tomcat/current/tc5.5.x/ (props changed) Propchange: tomcat/current/tc5.5.x/ -- --- svn:externals (original) +++ svn:externals Tue Jan 31 14:20:24 2006 @@ -1,5 +1,5 @@ build https://svn.apache.org/repos/asf/tomcat/build/tc5.5.x container https://svn.apache.org/repos/asf/tomcat/container/tc5.5.x connectors https://svn.apache.org/repos/asf/tomcat/connectors/trunk -jasper https://svn.apache.org/repos/asf/tomcat/jasper/tc5.5.x/jasper2 +jasper https://svn.apache.org/repos/asf/tomcat/jasper/tc5.5.x servletapi https://svn.apache.org/repos/asf/tomcat/servletapi/servlet2.4-jsp2.0-tc5.x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r373930 - /tomcat/jasper/tc5.5.x/jasper2/
Author: markt Date: Tue Jan 31 14:21:09 2006 New Revision: 373930 URL: http://svn.apache.org/viewcvs?rev=373930&view=rev Log: Remove jasper2 directory Removed: tomcat/jasper/tc5.5.x/jasper2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]