You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2004/04/01 22:09:21 UTC
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core ApplicationContext.java
markt 2004/04/01 12:09:21
Modified: catalina/src/share/org/apache/catalina/core
ApplicationContext.java
Log:
- Fix getContext("/") so current context is returned if called whilst in the root context
- Port from TC5
Revision Changes Path
1.25 +4 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
Index: ApplicationContext.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- ApplicationContext.java 5 Mar 2004 23:52:55 -0000 1.24
+++ ApplicationContext.java 1 Apr 2004 20:09:21 -0000 1.25
@@ -213,9 +213,9 @@
String contextPath = context.getPath();
if (!contextPath.endsWith("/"))
contextPath = contextPath + "/";
- if ((contextPath.length() > 1) &&
- ((uri.equals(context.getPath()))
- || (uri.startsWith(contextPath)))) {
+
+ if (((contextPath.length() > 1) && (uri.startsWith(contextPath))) ||
+ ((contextPath.equals("/")) && (uri.equals("/")))) {
return (this);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core ApplicationContext.java
Posted by Mark Thomas <ma...@apache.org>.
Remy,
Looking at bug 13040 I did a bugzilla search and came across bug 11411. I am
still thinking about bug 13040 but saw that bug 11411 could be fixed (I had
previously closed it without looking at the source closely enough) without
getting into the equals()/startsWith() debate that is part of bug 13040.
In the circumstances where crossContext is false and getContext("/") is called
from within the root web application getContext() was returning null rather than
the root context.
I am guessing I have done something stupid but I cant for the life of me see
what it is ;)
Mark
> -----Original Message-----
> From: Remy Maucherat [mailto:remm@apache.org]
> Sent: Thursday, April 01, 2004 9:47 PM
> To: Tomcat Developers List
> Subject: Re: cvs commit:
> jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina
> /core ApplicationContext.java
>
> markt@apache.org wrote:
> > markt 2004/04/01 12:09:21
> >
> > Modified: catalina/src/share/org/apache/catalina/core
> > ApplicationContext.java
> > Log:
> > - Fix getContext("/") so current context is returned if
> called whilst in the root context
> > - Port from TC5
>
> I disagree with this patch. Please explain.
>
> Rémy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core
ApplicationContext.java
Posted by Remy Maucherat <re...@apache.org>.
markt@apache.org wrote:
> markt 2004/04/01 12:09:21
>
> Modified: catalina/src/share/org/apache/catalina/core
> ApplicationContext.java
> Log:
> - Fix getContext("/") so current context is returned if called whilst in the root context
> - Port from TC5
I disagree with this patch. Please explain.
Rémy
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org