DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=13040. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=13040 --- Additional Comments From [EMAIL PROTECTED] 2005-02-04 09:39 --- Can you give us a short status about this bug ? the last entry is April '04 ? -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=13040. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=13040 --- Additional Comments From [EMAIL PROTECTED] 2005-02-04 21:30 --- No change. What is needed to move this forward is input from the servlet spec team on the proposal in http://marc.theaimsgroup.com/?l=tomcat-devm=108109687130165w=2 This is still on my todo list - just not going anywhere at the moment. If you want to try and get some spec team input that would be great. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=13040. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=13040 can't retrieve external context who's uri is a sub-dir of current context --- Additional Comments From [EMAIL PROTECTED] 2004-05-24 12:26 --- Is this bug solved? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=13040. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=13040 can't retrieve external context who's uri is a sub-dir of current context --- Additional Comments From [EMAIL PROTECTED] 2004-05-24 18:18 --- Not completely no. The most recent debate on this is here: http://marc.theaimsgroup.com/?l=tomcat-devm=108109687130165w=2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
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=13040. 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=13040 can't retrieve external context who's uri is a sub-dir of current context [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2003-01-20 15:05 --- *** Bug 16258 has been marked as a duplicate of this bug. *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
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=13040. 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=13040 can't retrieve external context who's uri is a sub-dir of current context [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2003-01-16 13:57 --- *** Bug 10544 has been marked as a duplicate of this bug. *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
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=13040. 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=13040 can't retrieve external context who's uri is a sub-dir of current context --- Additional Comments From [EMAIL PROTECTED] 2002-12-04 12:29 --- This is a serious bug that needs to be fixed. I agree that the last patch submited by Martin Algesten lookes nice. Please add it yo the CVS tree. Thanks! Christer Grimsæth -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
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=13040. 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=13040 can't retrieve external context who's uri is a sub-dir of current context --- Additional Comments From [EMAIL PROTECTED] 2002-10-30 16:41 --- That System.out should of course not be there. --- ApplicationContext.java-2002-10-21 Mon Sep 23 11:23:16 2002 +++ ApplicationContext.java Wed Oct 30 16:40:08 2002 @@ -439,12 +439,11 @@ return (null); // Return the current context if requested -String contextPath = context.getPath(); -if (!contextPath.endsWith(/)) -contextPath = contextPath + /; -if ((contextPath.length() 0) (uri.startsWith(contextPath))) { -return (this); -} + String contextPath = context.getPath(); + if ( contextPath.equals( ) uri.equals( / ) || +!contextPath.equals( ) uri.equals( contextPath ) ) { + return (this); + } // Return other contexts only if allowed if (!context.getCrossContext()) -- To unsubscribe, e-mail: mailto:tomcat-dev-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org
DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
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=13040. 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=13040 can't retrieve external context who's uri is a sub-dir of current context --- Additional Comments From [EMAIL PROTECTED] 2002-10-24 09:33 --- That doesn't fix it properly. To trigger the optimisation you would need to send in the uri /store/ to get a match. Agreed that if we can ditch handling the /store/common uri, we could make this work much easier. --- ApplicationContext.java-2002-10-21 Mon Sep 23 11:23:16 2002 +++ ApplicationContext.java Thu Oct 24 10:30:56 2002 @@ -439,12 +439,13 @@ return (null); // Return the current context if requested -String contextPath = context.getPath(); -if (!contextPath.endsWith(/)) -contextPath = contextPath + /; -if ((contextPath.length() 0) (uri.startsWith(contextPath))) { -return (this); -} + String contextPath = context.getPath(); + if ( contextPath.equals( ) uri.equals( / ) || +!contextPath.equals( ) uri.equals( contextPath ) ) { + return (this); + } + + System.out.println( context.getCrossContext() ); // Return other contexts only if allowed if (!context.getCrossContext()) Martin Algesten -- To unsubscribe, e-mail: mailto:tomcat-dev-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org
DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
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=13040. 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=13040 can't retrieve external context who's uri is a sub-dir of current context [EMAIL PROTECTED] changed: What|Removed |Added Component|Catalina|Servlet JSP API --- Additional Comments From [EMAIL PROTECTED] 2002-10-23 12:41 --- The / is added to avoid matching stuff like: Context name: /foo Uri: /foobar I still think the spec is bad, and should modify to specify that the desired context path should be matched exactly. BTW, there's a Watchdog test about this (unfortunately). I wonder why, since the API Javadocs are quite unclear. -- To unsubscribe, e-mail: mailto:tomcat-dev-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org
DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
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=13040. 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=13040 can't retrieve external context who's uri is a sub-dir of current context --- Additional Comments From [EMAIL PROTECTED] 2002-10-23 13:18 --- Agreed, we need to add / to the end, but that goes for the incoming URI as well. We also need to treat the ROOT context differently. I agree the specs are bad, but we need to solve this with what we got, since the getContext() method as it currently stands isn't useful. --- --- ApplicationContext.java-2002-10-21 Mon Sep 23 11:23:16 2002 +++ ApplicationContext.java Wed Oct 23 14:08:41 2002 @@ -439,12 +439,25 @@ return (null); // Return the current context if requested -String contextPath = context.getPath(); -if (!contextPath.endsWith(/)) -contextPath = contextPath + /; -if ((contextPath.length() 0) (uri.startsWith(contextPath))) { -return (this); -} + String contextPath = context.getPath(); + if ( contextPath.equals( ) ) { + if ( uri.equals( / ) ) { + return (this); + } + } else { + String compareUri = uri; + if ( !uri.endsWith( / ) ) { + compareUri = compareUri+/; + } + if ( !contextPath.endsWith( / ) ) { + contextPath = contextPath+/; + } + if ( compareUri.startsWith( contextPath ) ) { + return (this); + } + } + + System.out.println( context.getCrossContext() ); // Return other contexts only if allowed if (!context.getCrossContext()) --- Martin Algesten -- To unsubscribe, e-mail: mailto:tomcat-dev-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org
DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
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=13040. 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=13040 can't retrieve external context who's uri is a sub-dir of current context --- Additional Comments From [EMAIL PROTECTED] 2002-10-23 21:07 --- ok, from the servlet 2.3 spec: - getContext(String) public ServletContext getContext(java.lang.String uripath) Returns a ServletContext object that corresponds to a specified URL on the server. This method allows servlets to gain access to the context for various parts of the server, and as needed obtain RequestDispatcher objects from the context. The given path must be begin with /, is interpreted relative to the servers document root and is matched against the context roots of other web applications hosted on this container. In a security conscious environment, the servlet container may return null for a given URL. Parameters: uripath - a String specifying the context path of another web application in the container. Returns: the ServletContext object that corresponds to the named URL, or null if either none exists or the container wishes to restrict this access. - There doesn't appear to be anything in here at all suggesting that when you call getContext(String) with a parameter specifying a uri which is a sub-dir of the current context's uri, it should ignore your request and simply return the current context. I also beleive that the following assumption is incorrect: In the general case, '/store/common' is supposed to return context '/store' if it exists.. The spec states that the given path is matched against the context roots of other web apps. That implies to me that it must match exactly. The solutions provided here do not address this bug: can't retrieve external context who's uri is a sub-dir of current context. Each of them actually still has the same problem (except for the initial postings attachment). Here's a solution, with minimal changes, that fixes this bug: - 445c445 if ((contextPath.length() 0) (uri.startsWith(contextPath))) { --- if ((contextPath.length() 1) (uri.equals(contextPath))) { - Ryan Smith -- To unsubscribe, e-mail: mailto:tomcat-dev-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org
DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
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=13040. 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=13040 can't retrieve external context who's uri is a sub-dir of current context --- Additional Comments From [EMAIL PROTECTED] 2002-10-22 16:57 --- The problem is much more trivial. We will always have a contextPath with a length 0 since we always append / if there isn't one already. $ diff -u ApplicationContext.java-2002-10-21 ApplicationContext.java --- ApplicationContext.java-2002-10-21 Mon Sep 23 11:23:16 2002 +++ ApplicationContext.java Tue Oct 22 17:55:08 2002 @@ -442,7 +442,7 @@ String contextPath = context.getPath(); if (!contextPath.endsWith(/)) contextPath = contextPath + /; -if ((contextPath.length() 0) (uri.startsWith(contextPath))) { +if ((contextPath.length() 1) (uri.startsWith(contextPath))) { return (this); } Martin Algesten -- To unsubscribe, e-mail: mailto:tomcat-dev-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org
DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
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=13040. 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=13040 can't retrieve external context who's uri is a sub-dir of current context [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2002-09-26 18:21 --- *** Bug 11865 has been marked as a duplicate of this bug. *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
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=13040. 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=13040 can't retrieve external context who's uri is a sub-dir of current context [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2002-09-26 18:21 --- *** Bug 11652 has been marked as a duplicate of this bug. *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
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=13040. 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=13040 can't retrieve external context who's uri is a sub-dir of current context --- Additional Comments From [EMAIL PROTECTED] 2002-09-26 18:24 --- Created an attachment (id=3247) proposed fix (diff) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]