Re: FW: tomcat binary page links not up
Pier Fumagalli wrote: FYI There is really something wrong. I have clicked in the page http://jakarta.apache.org/site/binindex.html and the links are giving something like: +++ Not Found The requested URL /site/[preferred]/jakarta/taglibs/ was not found on this server. Apache/2.0.48-dev (Unix) Server at jakarta.apache.org Port 80 +++ That is not a Tomcat specfic problem. Cheers Jean-Frederic -- Forwarded Message From: Michael Kidd [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Tue, 23 Sep 2003 14:46:52 -0700 To: [EMAIL PROTECTED] Subject: tomcat binary page links not up Webmaster, I'm trying to download a tomcat file on the following page: http://jakarta.apache.org/site/binindex.html I keep getting a 404 error message, so I am unable to download the current version of Tomcat. It looks like all the links on this page for downloading are not correct either -- Michael Kidd Line Support Technician - SBBT/FBBT (510) 714-0123 (cell) X32787 -- End of Forwarded Message - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FW: tomcat binary page links not up
jean-frederic clere wrote: Pier Fumagalli wrote: FYI There is really something wrong. I have clicked in the page http://jakarta.apache.org/site/binindex.html and the links are giving something like: +++ Not Found The requested URL /site/[preferred]/jakarta/taglibs/ was not found on this server. Apache/2.0.48-dev (Unix) Server at jakarta.apache.org Port 80 +++ That is not a Tomcat specfic problem. The links are only valid if they are processed by a CGI. So the right URL is http://jakarta.apache.org/site/binindex.cgi. The old URL was what was used before switching to mirrors. Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[PATCH] Bug 23267
Resending. I have been having email problems recently. Apologies if this is received twice. The attached patches address a couple of issue highlighted by bug 23267 - zero length contexts caused a NPE on contextFile.getParentFile() - another exception on contextPath.substring(1) for zero length contexts I also removed the filename.equals(ROOT) test as I couldn't see anywhere in the docs where this is specified as mandatory. Patches for TC5 and TC4 both attached (untested on TC5) Mark Index: catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java === RCS file: /home/cvspublic/jakarta-tomcat-catalina/catalina/src/share/org/apache/catali na/core/StandardHostDeployer.java,v retrieving revision 1.15 diff -u -r1.15 StandardHostDeployer.java --- catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java 2 Sep 2003 21:22:04 - 1.15 +++ catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java 26 Sep 2003 23:13:58 - @@ -661,6 +661,10 @@ appBase = new File(System.getProperty(catalina.base), host.getAppBase()); File contextFile = new File(context.getDocBase()); +// If doc base is relative, it is relative to appBase +if (!contextFile.isAbsolute()) +contextFile = new File(appBase,context.getDocBase()); + File baseDir = contextFile.getParentFile(); if ((baseDir == null) || (appBase.getCanonicalPath().equals @@ -679,8 +683,16 @@ if (isWAR) { filename = filename.substring(0,filename.length()-4); } -if (contextPath.length() == 0 filename.equals(ROOT) || -filename.equals(contextPath.substring(1))) { + +boolean toDelete = false; +if (contextPath.length() == 0) { +toDelete = true; +} else { +if (filename.equals(contextPath.substring(1))) +toDelete = true; +} + +if (toDelete) { if (!isWAR) { long contextLastModified = contextFile.lastModified(); Index: catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java === RCS file: /home/cvspublic/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/co re/StandardHostDeployer.java,v retrieving revision 1.13 diff -u -r1.13 StandardHostDeployer.java --- catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java 13 Jan 2003 23:23:28 - 1.13 +++ catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java 26 Sep 2003 22:55:12 - @@ -65,13 +65,10 @@ package org.apache.catalina.core; -import java.io.BufferedOutputStream; import java.io.File; -import java.io.FileOutputStream; import java.io.InputStream; import java.io.IOException; import java.net.URL; -import java.util.Enumeration; import org.apache.catalina.Container; import org.apache.catalina.Context; import org.apache.catalina.Deployer; @@ -85,7 +82,6 @@ import org.apache.catalina.startup.NamingRuleSet; import org.apache.catalina.util.StringManager; import org.apache.commons.digester.Digester; -import org.xml.sax.SAXParseException; /** @@ -530,6 +526,9 @@ appBase = new File(System.getProperty(catalina.base), host.getAppBase()); File contextFile = new File(context.getDocBase()); +// If doc base is relative, it is relative to appBase +if (!contextFile.isAbsolute()) + contextFile = new File(appBase,context.getDocBase()); File baseDir = contextFile.getParentFile(); if (appBase.getCanonicalPath().equals(baseDir.getCanonicalPath())) { isAppBase = true; @@ -546,8 +545,16 @@ if (isWAR) { filename = filename.substring(0,filename.length()-4); } -if (contextPath.length() == 0 filename.equals(ROOT) || -filename.equals(contextPath.substring(1))) { + +boolean toDelete = false; +if (contextPath.length() == 0) { +toDelete = true; +} else { +if (filename.equals(contextPath.substring(1))) +toDelete = true; +} + +if (toDelete) { if (!isWAR) { if (contextFile.isDirectory()) {
Re: tomcat binary page links not up
I fixed .htaccess @ jakarta-site2. I think you all won't jump to http://jakarta.apache.org/site/binindex.html http://jakarta.apache.org/site/sourceindex.html anymore. - (redirect to) (http://jakarta.apache.org/site/binindex.cgi http://jakarta.apache.org/site/sourceindex.cgi) It is *HIGHLY* recommended for users using mirror site when downloading the ASF products. (Of course, this goes for the linking and announcing for committers, too ...) Sincerely, -- Tetsuya. ([EMAIL PROTECTED]) -- On Sat, 27 Sep 2003 09:41:23 +0200 (Subject: Re: FW: tomcat binary page links not up) Remy Maucherat [EMAIL PROTECTED] wrote: jean-frederic clere wrote: Pier Fumagalli wrote: FYI There is really something wrong. I have clicked in the page http://jakarta.apache.org/site/binindex.html and the links are giving something like: +++ Not Found The requested URL /site/[preferred]/jakarta/taglibs/ was not found on this server. Apache/2.0.48-dev (Unix) Server at jakarta.apache.org Port 80 +++ That is not a Tomcat specfic problem. The links are only valid if they are processed by a CGI. So the right URL is http://jakarta.apache.org/site/binindex.cgi. The old URL was what was used before switching to mirrors. Remy --- Tetsuya Kitahata -- Terra-International, Inc. E-mail: [EMAIL PROTECTED] http://www.terra-intl.com/ (Accredited Herrmann Brain Dominance Instrument Facilitator) http://www.hbdi.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FW: tomcat binary page links not up
Remy Maucherat wrote: jean-frederic clere wrote: Pier Fumagalli wrote: FYI There is really something wrong. I have clicked in the page http://jakarta.apache.org/site/binindex.html and the links are giving something like: +++ Not Found The requested URL /site/[preferred]/jakarta/taglibs/ was not found on this server. Apache/2.0.48-dev (Unix) Server at jakarta.apache.org Port 80 +++ That is not a Tomcat specfic problem. The links are only valid if they are processed by a CGI. So the right URL is http://jakarta.apache.org/site/binindex.cgi. The old URL was what was used before switching to mirrors. What have you done? Fix the .htaccess? +++ RedirectMatch ^/site/binindex.htmlhttp://jakarta.apache. org/site/binindex.cgi +++ Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat binary page links not up
This page says 4.1.17. Also is it a good idea to link to the the binaries directly when a hotfix is required? On Sat, 2003-09-27 at 10:59, Tetsuya Kitahata wrote: I fixed .htaccess @ jakarta-site2. I think you all won't jump to http://jakarta.apache.org/site/binindex.html http://jakarta.apache.org/site/sourceindex.html anymore. - (redirect to) (http://jakarta.apache.org/site/binindex.cgi http://jakarta.apache.org/site/sourceindex.cgi) It is *HIGHLY* recommended for users using mirror site when downloading the ASF products. (Of course, this goes for the linking and announcing for committers, too ...) Sincerely, -- Tetsuya. ([EMAIL PROTECTED]) -- On Sat, 27 Sep 2003 09:41:23 +0200 (Subject: Re: FW: tomcat binary page links not up) Remy Maucherat [EMAIL PROTECTED] wrote: jean-frederic clere wrote: Pier Fumagalli wrote: FYI There is really something wrong. I have clicked in the page http://jakarta.apache.org/site/binindex.html and the links are giving something like: +++ Not Found The requested URL /site/[preferred]/jakarta/taglibs/ was not found on this server. Apache/2.0.48-dev (Unix) Server at jakarta.apache.org Port 80 +++ That is not a Tomcat specfic problem. The links are only valid if they are processed by a CGI. So the right URL is http://jakarta.apache.org/site/binindex.cgi. The old URL was what was used before switching to mirrors. Remy --- Tetsuya Kitahata -- Terra-International, Inc. E-mail: [EMAIL PROTECTED] http://www.terra-intl.com/ (Accredited Herrmann Brain Dominance Instrument Facilitator) http://www.hbdi.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Yuri Schimke Aqris Software +372 53 415 579
[PATCH] Bug 3098 - Port to tc4
Going back through my list of things to do, the port of this patch hasn't yet been committed. Please could one of the committers do this so I can close bug 3098. Thanks, Mark Port of my previous patch to tomcat 4. As previously, I took the opportunity to remove some unused imports. Mark Index: coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java === RCS file: /home/cvspublic/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ tomcat4/CoyoteRequest.java,v retrieving revision 1.29 diff -u -r1.29 CoyoteRequest.java --- coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java5 Apr 2003 08:18:04 - 1.29 +++ coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java1 Sep 2003 17:32:38 - @@ -88,7 +88,6 @@ import javax.servlet.RequestDispatcher; import javax.servlet.ServletContext; -import javax.servlet.ServletException; import javax.servlet.ServletInputStream; import javax.servlet.ServletRequest; import javax.servlet.http.Cookie; @@ -116,8 +115,6 @@ import org.apache.catalina.util.StringManager; import org.apache.catalina.util.StringParser; -import org.apache.tomcat.util.net.SSLSupport; - /** * Wrapper object for the Coyote request. * @@ -1097,13 +1094,23 @@ if (servletPath == null) servletPath = getServletPath(); -int pos = servletPath.lastIndexOf('/'); +// Add the path info, if there is any +String pathInfo = getPathInfo(); +String requestPath = null; + +if (pathInfo == null) { +requestPath = servletPath; +} else { +requestPath = servletPath + pathInfo; +} + +int pos = requestPath.lastIndexOf('/'); String relative = null; if (pos = 0) { relative = RequestUtil.normalize -(servletPath.substring(0, pos + 1) + path); +(requestPath.substring(0, pos + 1) + path); } else { -relative = RequestUtil.normalize(servletPath + path); +relative = RequestUtil.normalize(requestPath + path); } return (context.getServletContext().getRequestDispatcher(relative)); Index: catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java === RCS file: /home/cvspublic/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/co nnector/HttpRequestBase.java,v retrieving revision 1.39 diff -u -r1.39 HttpRequestBase.java --- catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java 22 Apr 2002 00:00:50 - 1.39 +++ catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java 1 Sep 2003 17:26:24 - @@ -76,7 +76,6 @@ import java.util.Date; import java.util.Enumeration; import java.util.HashMap; -import java.util.Hashtable; import java.util.Locale; import java.util.Map; import javax.servlet.RequestDispatcher; @@ -94,7 +93,6 @@ import org.apache.catalina.util.Enumerator; import org.apache.catalina.util.ParameterMap; import org.apache.catalina.util.RequestUtil; -import org.apache.catalina.util.StringParser; /** @@ -793,13 +791,24 @@ if (servletPath == null) servletPath = getServletPath(); -int pos = servletPath.lastIndexOf('/'); +// Add the path info, if there is any +String pathInfo = getPathInfo(); +String requestPath = null; + +if (pathInfo == null) { +requestPath = servletPath; +} else { +requestPath = servletPath + pathInfo; +} + +int pos = requestPath.lastIndexOf('/'); + String relative = null; if (pos = 0) { relative = RequestUtil.normalize -(servletPath.substring(0, pos + 1) + path); +(requestPath.substring(0, pos + 1) + path); } else { -relative = RequestUtil.normalize(servletPath + path); +relative = RequestUtil.normalize(requestPath + path); } return (context.getServletContext().getRequestDispatcher(relative)); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat binary page links not up
On Sat, 27 Sep 2003 11:01:21 +0300 (Subject: Re: tomcat binary page links not up) Yuri Schimke [EMAIL PROTECTED] wrote: This page says 4.1.17. You are right. fixed to 4.1.27 Thank you Also is it a good idea to link to the the binaries directly when a hotfix is required? Agreed, In such a situation, please use http://www.apache.org/dyn/closer.cgi/jakarta/tomcat-3/ http://www.apache.org/dyn/closer.cgi/jakarta/tomcat-4/ http://www.apache.org/dyn/closer.cgi/jakarta/tomcat-5/ (For Tomcat-committers/mirror-site-maintainers: When Annoucing the News Release, etc.) for reference. Cheers, -- Tetsuya. ([EMAIL PROTECTED]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat binary page links not up
Yuri Schimke wrote: This page says 4.1.17. That is wrong it should say 4.1.27. Also is it a good idea to link to the the binaries directly when a hotfix is required? On Sat, 2003-09-27 at 10:59, Tetsuya Kitahata wrote: I fixed .htaccess @ jakarta-site2. I think you all won't jump to http://jakarta.apache.org/site/binindex.html http://jakarta.apache.org/site/sourceindex.html anymore. - (redirect to) (http://jakarta.apache.org/site/binindex.cgi http://jakarta.apache.org/site/sourceindex.cgi) It is *HIGHLY* recommended for users using mirror site when downloading the ASF products. (Of course, this goes for the linking and announcing for committers, too ...) Sincerely, -- Tetsuya. ([EMAIL PROTECTED]) -- On Sat, 27 Sep 2003 09:41:23 +0200 (Subject: Re: FW: tomcat binary page links not up) Remy Maucherat [EMAIL PROTECTED] wrote: jean-frederic clere wrote: Pier Fumagalli wrote: FYI There is really something wrong. I have clicked in the page http://jakarta.apache.org/site/binindex.html and the links are giving something like: +++ Not Found The requested URL /site/[preferred]/jakarta/taglibs/ was not found on this server. Apache/2.0.48-dev (Unix) Server at jakarta.apache.org Port 80 +++ That is not a Tomcat specfic problem. The links are only valid if they are processed by a CGI. So the right URL is http://jakarta.apache.org/site/binindex.cgi. The old URL was what was used before switching to mirrors. Remy --- Tetsuya Kitahata -- Terra-International, Inc. E-mail: [EMAIL PROTECTED] http://www.terra-intl.com/ (Accredited Herrmann Brain Dominance Instrument Facilitator) http://www.hbdi.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Yuri Schimke Aqris Software +372 53 415 579 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [PATCH] Bug 23267
Mark Thomas wrote: Resending. I have been having email problems recently. Apologies if this is received twice. The attached patches address a couple of issue highlighted by bug 23267 - zero length contexts caused a NPE on contextFile.getParentFile() - another exception on contextPath.substring(1) for zero length contexts I also removed the filename.equals(ROOT) test as I couldn't see anywhere in the docs where this is specified as mandatory. Patches for TC5 and TC4 both attached (untested on TC5) I don't like the patch so far. I will look into the issue. Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup SetDocBaseRule.java
remm2003/09/27 05:06:32 Modified:catalina/src/share/org/apache/catalina/startup SetDocBaseRule.java Log: - Fix handling of root context when upacking a WAR. Note that obviously using a context path with a WAR which doesn't match the name will result in the webapp being deployed twice. Revision ChangesPath 1.9 +8 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/SetDocBaseRule.java Index: SetDocBaseRule.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/SetDocBaseRule.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- SetDocBaseRule.java 8 Sep 2003 13:43:40 - 1.8 +++ SetDocBaseRule.java 27 Sep 2003 12:06:32 - 1.9 @@ -172,7 +172,11 @@ if (docBase.toLowerCase().endsWith(.war)) { URL war = new URL(jar: + (new File(docBase)).toURL() + !/); -docBase = ExpandWar.expand(host, war, child.getPath()); +String contextPath = child.getPath(); +if (contextPath.equals()) { +contextPath = ROOT; +} +docBase = ExpandWar.expand(host, war, contextPath); file = new File(docBase); docBase = file.getCanonicalPath(); } else { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [PATCH] Bug 23267
Mark Thomas wrote: Resending. I have been having email problems recently. Apologies if this is received twice. The attached patches address a couple of issue highlighted by bug 23267 - zero length contexts caused a NPE on contextFile.getParentFile() - another exception on contextPath.substring(1) for zero length contexts I also removed the filename.equals(ROOT) test as I couldn't see anywhere in the docs where this is specified as mandatory. Patches for TC5 and TC4 both attached (untested on TC5) I can confirm I think the patch is bad. For TC 4, this shouldn't be fixed (or likely all the changes to the deployer should also be ported). For TC 5, the problem was that the docbase was incorrectly set when unpacking a WAR in the case of the ROOT webapp. For the deployer to do everything automatically, the resources names must match: context file, context path, exploded dir, WAR name. Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [PATCH] Bug 22666
The original bug was reported against TC4 so I have ported the patch in order to close the bug report. TC4 does not include the uRLEncoding parameter on the connector so I have implemented the queryStringEncoding parameter as Remy previously suggested. To make TC5 consistent with TC4, I have added the queryStringEncoding parameter to TC5 and modified CoyoteAdapter to use this new parameter. All the patches can be found below. Please could someone (Remy?) commit them. Thanks, Mark PS I also removed some unused imports - thanks Eclipse :) On Sunday, September 07, 2003 3:40 PM, Remy Maucherat [SMTP:[EMAIL PROTECTED] wrote: Mark Thomas wrote: On Sunday, September 07, 2003 8:47 AM, Remy Maucherat [SMTP:[EMAIL PROTECTED] wrote: Remy Maucherat wrote: I've just committed a very simple implementation of this (without the extra queryStringEncoding field, although this is not hard to add). Comments ? Remy TC4 patches Index: util/java/org/apache/tomcat/util/buf/MessageBytes.java === RCS file: /home/cvspublic/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/b uf/MessageBytes.java,v retrieving revision 1.7 diff -u -r1.7 MessageBytes.java --- util/java/org/apache/tomcat/util/buf/MessageBytes.java 12 Jul 2002 18:00:14 - 1.7 +++ util/java/org/apache/tomcat/util/buf/MessageBytes.java 27 Sep 2003 11:54:38 - @@ -285,6 +285,7 @@ toString(); char cc[]=strValue.toCharArray(); charC.setChars(cc, 0, cc.length); + type=T_CHARS; } Index: util/java/org/apache/tomcat/util/http/Parameters.java === RCS file: /home/cvspublic/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/h ttp/Parameters.java,v retrieving revision 1.8.2.1 diff -u -r1.8.2.1 Parameters.java --- util/java/org/apache/tomcat/util/http/Parameters.java 5 Apr 2003 08:19:28 - 1.8.2.1 +++ util/java/org/apache/tomcat/util/http/Parameters.java 27 Sep 2003 11:55:31 - @@ -63,7 +63,6 @@ import org.apache.tomcat.util.collections.MultiMap; import java.io.*; import java.util.*; -import java.text.*; /** * @@ -97,7 +96,8 @@ private Parameters currentChild=null; String encoding=null; - +String queryStringEncoding=null; + /** * */ @@ -118,6 +118,11 @@ if(debug0) log( Set encoding to + s ); } +public void setQueryStringEncoding( String s ) { +queryStringEncoding=s; +if(debug0) log( Set query string encoding to + s ); +} + public void recycle() { super.recycle(); paramHashStringArray.clear(); @@ -278,22 +283,33 @@ public void handleQueryParameters() { if( didQueryParameters ) return; -if( queryMB != null) -queryMB.setEncoding( encoding ); didQueryParameters=true; - if( debug 0 ) - log( Decoding query + queryMB + + encoding); if( queryMB==null || queryMB.isNull() ) return; try { - decodedQuery.duplicate( queryMB ); - decodedQuery.setEncoding(encoding); +decodedQuery.duplicate( queryMB ); +if (queryStringEncoding == null) { +ByteChunk bc = decodedQuery.getByteChunk(); +CharChunk cc = decodedQuery.getCharChunk(); +cc.allocate(bc.getLength(), -1); +// Default encoding: fast conversion +byte[] bbuf = bc.getBuffer(); +char[] cbuf = cc.getBuffer(); +int start = bc.getStart(); +for (int i = 0; i bc.getLength(); i++) { +cbuf[i] = (char) (bbuf[i + start] 0xff); +} +decodedQuery.setChars(cbuf, 0, bc.getLength()); +} else { +decodedQuery.setEncoding(queryStringEncoding); +decodedQuery.toChars(); + } } catch( IOException ex ) { } if( debug 0 ) - log( Decoding query + decodedQuery + + encoding); + log( Decoding query + decodedQuery + + queryStringEncoding); processParameters( decodedQuery ); } Index: coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java === RCS file: /home/cvspublic/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ tomcat4/CoyoteConnector.java,v retrieving revision 1.20.2.2 diff -u -r1.20.2.2 CoyoteConnector.java --- coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java 28 Apr 2003 17:21:16 - 1.20.2.2 +++ coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java 27 Sep 2003 11:56:34 - @@ -343,6 +343,11 @@ private Adapter adapter = null; +/** + * Query encoding. + */ +private String queryStringEncoding = null; + // - Properties @@ -932,6
Re: [PATCH] Bug 22666
Mark Thomas wrote: The original bug was reported against TC4 so I have ported the patch in order to close the bug report. TC4 does not include the uRLEncoding parameter on the connector so I have implemented the queryStringEncoding parameter as Remy previously suggested. To make TC5 consistent with TC4, I have added the queryStringEncoding parameter to TC5 and modified CoyoteAdapter to use this new parameter. All the patches can be found below. Please could someone (Remy?) commit them. I coldn't find a good reason why the queryString would have a different encoding from the rest of the URL. That's why I didn't add the flag at that time, and used the configured URI encoding for everything. As for TC 4.1, I think its core components (connectors, deployer, main pipeline) should be frozen for non critical fixes. If there's interest, the big patches from TC 5 (ex: deployer, Coyote, etc) could be ported to a new 4.2 branch. But this may well be a dead end and a waste of resources, given the already close similarities between 4.1 and 5. Glenn wanted to do that a while ago, but he was a bit alone at that time. Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [PATCH] Bug 23267
Thanks for looking at this. I'll look into porting the necessary deployer changes to get this working on TC4. Mark On Saturday, September 27, 2003 1:26 PM, Remy Maucherat [SMTP:[EMAIL PROTECTED] wrote: Mark Thomas wrote: Resending. I have been having email problems recently. Apologies if this is received twice. The attached patches address a couple of issue highlighted by bug 23267 - zero length contexts caused a NPE on contextFile.getParentFile() - another exception on contextPath.substring(1) for zero length contexts I also removed the filename.equals(ROOT) test as I couldn't see anywhere in the docs where this is specified as mandatory. Patches for TC5 and TC4 both attached (untested on TC5) I can confirm I think the patch is bad. For TC 4, this shouldn't be fixed (or likely all the changes to the deployer should also be ported). For TC 5, the problem was that the docbase was incorrectly set when unpacking a WAR in the case of the ROOT webapp. For the deployer to do everything automatically, the resources names must match: context file, context path, exploded dir, WAR name. Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [PATCH] Bug 23267
Mark Thomas wrote: Thanks for looking at this. I'll look into porting the necessary deployer changes to get this working on TC4. I didn't test with TC 4. Maybe the patch can stand alone by itself, and is relevant. But I know the deployer doesn't handle well similar situations. Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 23458] New: - findAncestorWithClass implementation error
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23458. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23458 findAncestorWithClass implementation error Summary: findAncestorWithClass implementation error Product: Tomcat 4 Version: 4.1.27 Platform: PC OS/Version: Linux Status: NEW Severity: Blocker Priority: Other Component: Servlet JSP API AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The 'javax.servlet.jsp.tagext.TagSupport.findAncestorWithClass' method does not return the immediate Ancestor. In my case it returned the 'grandfather' rather than the 'father' tag. The following code illustrates: -CODE-- tags:grandfather att=valONE tags:father att=valTWO tags:son/ !-- 'son' gets valONE not valTWO when it checks the 'att' value of the parent using 'findAncestorWithClass' method -- /tags:father /tags:grandfather -CODE-- I found this bug is in 4.1.24 and 4.1.27. 4.0.1 works fine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs introduction.xml
remm2003/09/27 11:35:05 Modified:webapps/docs introduction.xml Log: - Remove dead link. Revision ChangesPath 1.5 +0 -3 jakarta-tomcat-catalina/webapps/docs/introduction.xml Index: introduction.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/introduction.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- introduction.xml 24 Jul 2003 12:03:57 - 1.4 +++ introduction.xml 27 Sep 2003 18:35:05 - 1.5 @@ -103,9 +103,6 @@ the answer was right in front of you all along!/li lia href=http://jakarta.apache.org/tomcat/faq/;Tomcat FAQ/a as maintained by the developers./li lia href=http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat;Tomcat WIKI/a/li -liJakarta a href=http://jakarta.apache.org:8080/jyve-faq/Turbine/screen/MainMenu/action/SetAll/screen/DisplayTopics/faq_id/12/project_id/2;jsessionid=36lqy9k9x1;FAQ-o-matic/a -- a repository of FAQs for the various Jakarta subprojects, including -Tomcat of course./li liTomcat FAQ at a href=http://www.jguru.com/faq/home.jsp?topic=Tomcat;jGuru/a/li liTomcat mailing list archives - numerous sites archive the Tomcat mailing lists. Since the links change over time, clicking here will search - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 23349] - Jakarta FAQ-o-matic link is dead.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23349. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23349 Jakarta FAQ-o-matic link is dead. [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-09-27 18:53 --- Fixed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jk2 causes segfault with more than 42 channels
My workers2.properties setting up connections to Apache2 works great for up to 42 constructs like: [channel.un:somename] info=AF_UNIX socket connecting to host file=/home/somename/jakarta-tomcat/work/jk2.socket debug=0 but as soon as I add the 43rd, Apache segfaults on the restart. Is there some hard coded array or something somewhere? I'm using the Jk2 that came with Tomcat 4.1.27 Keith Bjorndahl [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[PATCH] Bug 23267
The attached patches address a couple of issue highlighted by bug 23267 - zero length contexts caused a NPE on contextFile.getParentFile() - another exception on contextPath.substring(1) for zero length contexts I also removed the filename.equals(ROOT) test as I couldn't see anywhere in the docs where this is specified as mandatory. Patches for TC5 and TC4 both attached (untested on TC5) Mark Index: catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java === RCS file: /home/cvspublic/jakarta-tomcat-catalina/catalina/src/share/org/apache/catali na/core/StandardHostDeployer.java,v retrieving revision 1.15 diff -u -r1.15 StandardHostDeployer.java --- catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java 2 Sep 2003 21:22:04 - 1.15 +++ catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java 26 Sep 2003 23:13:58 - @@ -661,6 +661,10 @@ appBase = new File(System.getProperty(catalina.base), host.getAppBase()); File contextFile = new File(context.getDocBase()); +// If doc base is relative, it is relative to appBase +if (!contextFile.isAbsolute()) +contextFile = new File(appBase,context.getDocBase()); + File baseDir = contextFile.getParentFile(); if ((baseDir == null) || (appBase.getCanonicalPath().equals @@ -679,8 +683,16 @@ if (isWAR) { filename = filename.substring(0,filename.length()-4); } -if (contextPath.length() == 0 filename.equals(ROOT) || -filename.equals(contextPath.substring(1))) { + +boolean toDelete = false; +if (contextPath.length() == 0) { +toDelete = true; +} else { +if (filename.equals(contextPath.substring(1))) +toDelete = true; +} + +if (toDelete) { if (!isWAR) { long contextLastModified = contextFile.lastModified(); Index: catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java === RCS file: /home/cvspublic/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/co re/StandardHostDeployer.java,v retrieving revision 1.13 diff -u -r1.13 StandardHostDeployer.java --- catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java 13 Jan 2003 23:23:28 - 1.13 +++ catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java 26 Sep 2003 22:55:12 - @@ -65,13 +65,10 @@ package org.apache.catalina.core; -import java.io.BufferedOutputStream; import java.io.File; -import java.io.FileOutputStream; import java.io.InputStream; import java.io.IOException; import java.net.URL; -import java.util.Enumeration; import org.apache.catalina.Container; import org.apache.catalina.Context; import org.apache.catalina.Deployer; @@ -85,7 +82,6 @@ import org.apache.catalina.startup.NamingRuleSet; import org.apache.catalina.util.StringManager; import org.apache.commons.digester.Digester; -import org.xml.sax.SAXParseException; /** @@ -530,6 +526,9 @@ appBase = new File(System.getProperty(catalina.base), host.getAppBase()); File contextFile = new File(context.getDocBase()); +// If doc base is relative, it is relative to appBase +if (!contextFile.isAbsolute()) + contextFile = new File(appBase,context.getDocBase()); File baseDir = contextFile.getParentFile(); if (appBase.getCanonicalPath().equals(baseDir.getCanonicalPath())) { isAppBase = true; @@ -546,8 +545,16 @@ if (isWAR) { filename = filename.substring(0,filename.length()-4); } -if (contextPath.length() == 0 filename.equals(ROOT) || -filename.equals(contextPath.substring(1))) { + +boolean toDelete = false; +if (contextPath.length() == 0) { +toDelete = true; +} else { +if (filename.equals(contextPath.substring(1))) +toDelete = true; +} + +if (toDelete) { if (!isWAR) { if (contextFile.isDirectory()) { deleteDir(contextFile); - To
RE: [PATCH] Bug 22666
The usefulness of porting the big patches from TC 5 to a new 4.2 branch depends on the release schedule for TC5. Are we still expecting the final version of JSR152 this month? If this is the case then I agree that the core of 4.1 should be frozen for non-critical fixes. However, if a stable release of TC 5 is still some way off I would be uncomfortable with any freeze of TC 4.1 as this would leave users with non-critical issues in limbo until a stable TC 5 is released. Comments? Mark On Saturday, September 27, 2003 1:42 PM, Remy Maucherat [SMTP:[EMAIL PROTECTED] wrote: Mark Thomas wrote: The original bug was reported against TC4 so I have ported the patch in order to close the bug report. TC4 does not include the uRLEncoding parameter on the connector so I have implemented the queryStringEncoding parameter as Remy previously suggested. To make TC5 consistent with TC4, I have added the queryStringEncoding parameter to TC5 and modified CoyoteAdapter to use this new parameter. All the patches can be found below. Please could someone (Remy?) commit them. I coldn't find a good reason why the queryString would have a different encoding from the rest of the URL. That's why I didn't add the flag at that time, and used the configured URI encoding for everything. As for TC 4.1, I think its core components (connectors, deployer, main pipeline) should be frozen for non critical fixes. If there's interest, the big patches from TC 5 (ex: deployer, Coyote, etc) could be ported to a new 4.2 branch. But this may well be a dead end and a waste of resources, given the already close similarities between 4.1 and 5. Glenn wanted to do that a while ago, but he was a bit alone at that time. Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [PATCH] Bug 22666
Mark Thomas wrote: The usefulness of porting the big patches from TC 5 to a new 4.2 branch depends on the release schedule for TC5. Are we still expecting the final version of JSR152 this month? I don't know. We'll know in a few days :-D If this is the case then I agree that the core of 4.1 should be frozen for non-critical fixes. However, if a stable release of TC 5 is still some way off I would be uncomfortable with any freeze of TC 4.1 as this would leave users with non-critical issues in limbo until a stable TC 5 is released. Comments? I don't think TC 5 is far off. The release plan mentions doing a RC beta once the specifications are released, followed shortly after (let's say two weeks) by a stable release. Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Prevent directory browsing on tomcat 4
Hello, I hope to be good..:)? I am facing aproblem with tomcat server, version 4 with jdk 1.4: Let us suppose that we have tomcat server running on localhost port 80, and have a .war file called testWar contains a web page named home.jsp how can I prevent directory browsing when writing http://localhost:80/testWar;, but display any thing else.? note: my Email address may looks strange if you do not want to replay on it you can use [EMAIL PROTECTED] Thnaks for time best regards, Mhd. Raghid Sandouq Syriatel Mobile Telecom SA Technical Department/Technical Support Senior Technical Support Technician Mobile : +963-93-228807 Phone : +963-11-2373900 Ext. 9192 : +963-11-23739192 Fax : +963-93-219198 Web: HTTP://WWW.SYRIATEL.COM/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/logger LoggerBase.java
amyroh 2003/09/27 17:43:28 Modified:catalina/src/share/org/apache/catalina/logger LoggerBase.java Log: Remove debugging logs. Revision ChangesPath 1.6 +4 -6 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/logger/LoggerBase.java Index: LoggerBase.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/logger/LoggerBase.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- LoggerBase.java 2 Sep 2003 21:22:06 - 1.5 +++ LoggerBase.java 28 Sep 2003 00:43:28 - 1.6 @@ -406,7 +406,6 @@ domain=name.getDomain(); host=name.getKeyProperty(host); path=name.getKeyProperty(path); -log(preRegister with +name); if( container== null ) { // Register with the parent try { @@ -450,7 +449,6 @@ } public ObjectName createObjectName() { -log(createObjectName with +container); // register try { StandardEngine engine=null; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]