----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
> Hello,
>
> We are trying to have a servlet talk to another java program using RMI.
> (using apache 1.3.1 & jserv 1.0)
> We are getting a security exception while doing this from the RMI
> security sand box, as follows,
>
> [12/01/2000 18:38:59:841] (ERROR) ajp11: Servlet Error:
> java.security.AccessCont
> rolException: access denied (java.net.SocketPermission localhost:1099
> connect,re
> solve): access denied (java.net.SocketPermission localhost:1099
> connect,resolve)
> [12/01/2000 18:38:59:842] (ERROR) an error returned handling request via
>
> protoco
> l "ajpv11"
>
> Looks like we need to define the appropriate security policies in the
> policy file
> and pass it to the JVM.
>
> But we are not too sure how to specify this(may be in the
> jserv.properties file).
Hello,
You have to create your own security manager.
For example, in my RMI server, I add in main :
if (System.getSecurityManager() == null)
System.setSecurityManager(new RMISecurityManager());
Then you have to write a java.policy file with
grant {
permission java.net.SocketPermission "*:1-65535", "connect, accept, resolve";
};
To pass it to the JVM just add -Djava.security.policy=/path/to/java.policy to
your command line if your are running your servlets in manual mode else
add wrapper.bin.parameters=-Djava.security.policy=/path/to/java.policy to
jserv.properties.
Ludo.
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]