B
Barbara
I'm trying to connect to an RMI server via a Tomcat Application.
I've already create a java.policy for RMI server and I run Tomcat by
using "-Djava.security.manager". I've modified the catalina.policy file
with the next lines:
grant codeBase
"file:${catalina.home}/webapps/cda/WEB-INF/classes/it/oneans/cdaweb/-"
{
permission java.io.FilePermission "<<ALL FILES>>", "read, write";
permission java.lang.SecurityManager.checkPermission;
permission java.util.PropertyPermission "catalina.home", "read,
write";
permission java.security.AllPermission;
permission java.net.SocketPermission "localhost:1099", "connect,
resolve";
permission java.net.SocketPermission "localhost:1024-", "connect,
resolve";
permission java.net.SocketPermission "localhost:1024-", "accept,
resolve";
// Precompiled JSPs need access to this package.
permission java.lang.RuntimePermission "usePolicy";
};
After this error:
java.security.AccessControlException: access denied
(java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
I've put this code in my client java file:
System.setSecurityManager (new RMISecurityManager() {
public void checkConnect (String host, int rmiPort)
{}
});
Now I've this Error:
java.security.AccessControlException: access denied
(java.lang.RuntimePermission createSecurityManager)
Can anybody Help me, please?
Thanks in advance
Barbara
I've already create a java.policy for RMI server and I run Tomcat by
using "-Djava.security.manager". I've modified the catalina.policy file
with the next lines:
grant codeBase
"file:${catalina.home}/webapps/cda/WEB-INF/classes/it/oneans/cdaweb/-"
{
permission java.io.FilePermission "<<ALL FILES>>", "read, write";
permission java.lang.SecurityManager.checkPermission;
permission java.util.PropertyPermission "catalina.home", "read,
write";
permission java.security.AllPermission;
permission java.net.SocketPermission "localhost:1099", "connect,
resolve";
permission java.net.SocketPermission "localhost:1024-", "connect,
resolve";
permission java.net.SocketPermission "localhost:1024-", "accept,
resolve";
// Precompiled JSPs need access to this package.
permission java.lang.RuntimePermission "usePolicy";
};
After this error:
java.security.AccessControlException: access denied
(java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
I've put this code in my client java file:
System.setSecurityManager (new RMISecurityManager() {
public void checkConnect (String host, int rmiPort)
{}
});
Now I've this Error:
java.security.AccessControlException: access denied
(java.lang.RuntimePermission createSecurityManager)
Can anybody Help me, please?
Thanks in advance
Barbara