"Riley, Cameron" wrote:
> I would like an directory under the webapp/myapp directory to have
> read,write,delete file permissions. Currently I am getting an Exception;
>
> java.lang.SecurityException: sealing violation
>
The first thing to understand is that security manager support in Tomcat 4.0 is
not complete yet. This should be fixed within the next couple weeks. By
default, it is not enabled -- the exception above has a different cause.
>
> when I try to create a File Object from the file in my application. I cant
> get the catalina.policy to open it up;
>
> grant codeBase "file:${catalina.home}/webapps/myapp/-"
> {
> permission java.io.FilePermission
> "${catalina.home}/webapps/myapp/myopendirectory/-", "read,write,delete";
> };
>
> Does the "/-" mean 'and all sub-directories'? I am totally confused on all
> this and couldnt find any documentation on it.
>
Yes. The docs about Java2's security model are in the JDK 1.2 or 1.3
documentation bundle, under the "Security" heading.
However, a sealing violation error occurs under the following circumstances:
* Classes are packaged into JAR files (assume your classes
are in package com.mycompany.mypackage).
* JAR files are marked as "sealed" in the JAR manifest entry.
* You attempt to load a class in the "com.mycompany.mypackage"
class from some *other* JAR file.
The basic idea of sealing is that a Java package can say "all of the classes in
this package are in this JAR file -- any classes who claim they are part of this
package from elsewhere are imposters."
>
> Cameron Riley
>
Craig McClanahan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]