Remove unused method
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 5 Nov 2010 17:59:51 +0000 (17:59 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 5 Nov 2010 17:59:51 +0000 (17:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1031683 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/Host.java
java/org/apache/catalina/core/StandardHost.java

index 0f4242a..b2e7879 100644 (file)
@@ -167,15 +167,6 @@ public interface Host extends Container {
 
 
     /**
-     * Return the Context that would be used to process the specified
-     * host-relative request URI, if any; otherwise return <code>null</code>.
-     *
-     * @param uri Request URI to be mapped
-     */
-    public Context map(String uri);
-
-
-    /**
      * Remove the specified alias name from the aliases for this Host.
      *
      * @param alias Alias name to be removed
index d79890b..fc442e8 100644 (file)
@@ -643,56 +643,6 @@ public class StandardHost extends ContainerBase implements Host {
 
 
     /**
-     * Return the Context that would be used to process the specified
-     * host-relative request URI, if any; otherwise return <code>null</code>.
-     *
-     * @param uri Request URI to be mapped
-     */
-    @Override
-    public Context map(String uri) {
-
-        if (log.isDebugEnabled())
-            log.debug("Mapping request URI '" + uri + "'");
-        if (uri == null)
-            return (null);
-
-        // Match on the longest possible context path prefix
-        if (log.isTraceEnabled())
-            log.trace("  Trying the longest context path prefix");
-        Context context = null;
-        String mapuri = uri;
-        while (true) {
-            context = (Context) findChild(mapuri);
-            if (context != null)
-                break;
-            int slash = mapuri.lastIndexOf('/');
-            if (slash < 0)
-                break;
-            mapuri = mapuri.substring(0, slash);
-        }
-
-        // If no Context matches, select the default Context
-        if (context == null) {
-            if (log.isTraceEnabled())
-                log.trace("  Trying the default context");
-            context = (Context) findChild("");
-        }
-
-        // Complain if no Context has been selected
-        if (context == null) {
-            log.error(sm.getString("standardHost.mappingError", uri));
-            return (null);
-        }
-
-        // Return the mapped Context (if any)
-        if (log.isDebugEnabled())
-            log.debug(" Mapped to context '" + context.getPath() + "'");
-        return (context);
-
-    }
-
-
-    /**
      * Remove the specified alias name from the aliases for this Host.
      *
      * @param alias Alias name to be removed