This is what I'm trying to do.

I already wrote a very simple class that overrides the default SecurityManager. Here is a piece of the code:

....

public void checkRead(String fileName) {
if (!fileName.equals("") && fileName.endsWith(".txt")) {
throw new SecurityException("Fail to read: " + fileName);
}
super.checkRead(fileName);
}
....

Now, what I want to do is to determine what is the URL/jsp/servlet that is trying to read this file.

I want to customize the security settings based on the location of the script in my web server. ( Does java.policy can do this using codeBase ? )

Does Java have some API to do this ?

Thanks in advance
Renato - Brazil.



Do You Yahoo!?
Yahoo! Auctions $2 Million Sweepstakes - Got something to sell?

Reply via email to