glenn 01/04/24 21:14:27
Modified: catalina/src/share/org/apache/catalina/core
ApplicationContext.java
Log:
Java SecurityManager implementation changes
-------------------------------------------
Changed the naming convention for JNDI DirContextURL to
"jndi:/hostname/webappname/" and "jar:jndi:/hostname/webappname/...".
This works better with java.io.FilePermission.
Modified how permissions are granted to the codeBase for a
web application so that different permissions can be granted.
Permissions assigned to the root of a web application apply
to JSP pages. Different permissions can be assigned to the
/WEB-INF/classes/ directory, the /WEB-INF/lib/ directory,
or even to individual jar files in /WEB-INF/lib/. This allows
much finer control of permissions granted within a web
application.
Fixed Jasper so that it uses the correct codeBase for a
web application, it had been using the work dir instead
of the context dir for getting permissions from the
policy file.
Added more default read FilePermissions for classes
loaded from within a web application so that getResources()
works. Added:
"jndi:/hostname/webappname/-"
"jar:jndi:/hostname/webappname/WEB-INF/lib/-"
"file:/realcontextpath/-"
Revision Changes Path
1.20 +6 -6
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
Index: ApplicationContext.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ApplicationContext.java 2001/04/06 19:31:17 1.19
+++ ApplicationContext.java 2001/04/25 04:14:26 1.20
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
1.19 2001/04/06 19:31:17 remm Exp $
- * $Revision: 1.19 $
- * $Date: 2001/04/06 19:31:17 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
1.20 2001/04/25 04:14:26 glenn Exp $
+ * $Revision: 1.20 $
+ * $Date: 2001/04/25 04:14:26 $
*
* ====================================================================
*
@@ -111,7 +111,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
- * @version $Revision: 1.19 $ $Date: 2001/04/06 19:31:17 $
+ * @version $Revision: 1.20 $ $Date: 2001/04/25 04:14:26 $
*/
public final class ApplicationContext
@@ -170,7 +170,7 @@
}
public Object run() throws Exception {
- return new URL("jndi", host, 0, path,
+ return new URL("jndi", null, 0, "/" + host + path,
new DirContextURLStreamHandler(resources));
}
@@ -536,7 +536,7 @@
throw pe.getException();
}
} else {
- return new URL("jndi", hostName, 0, fullPath,
+ return new URL("jndi", null, 0, "/" + hostName + fullPath,
new DirContextURLStreamHandler(resources));
}
} catch (Exception e) {