Security problem in Tomcat 5.5

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top