tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r377994 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core: ApplicationContext.java ApplicationContextFacade.java
Date Wed, 15 Feb 2006 12:37:30 GMT
Author: remm
Date: Wed Feb 15 04:37:28 2006
New Revision: 377994

URL: http://svn.apache.org/viewcvs?rev=377994&view=rev
Log:
- Add getContextPath to the implementation classes.

Modified:
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java

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=377994&r1=377993&r2=377994&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
Wed Feb 15 04:37:28 2006
@@ -240,6 +240,14 @@
         }
     }
 
+    
+    /**
+     * Return the main path associated with this context.
+     */
+    public String getContextPath() {
+        return context.getPath();
+    }
+    
 
     /**
      * Return the value of the specified initialization parameter, or

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java?rev=377994&r1=377993&r2=377994&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java
(original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java
Wed Feb 15 04:37:28 2006
@@ -353,6 +353,15 @@
     }
 
        
+    public String getContextPath() {
+        if (SecurityUtil.isPackageProtectionEnabled()) {
+            return (String) doPrivileged("getContextPath", null);
+        } else {
+            return context.getContextPath();
+        }
+    }
+
+       
     /**
      * Use reflection to invoke the requested method. Cache the method object 
      * to speed up the process



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message