Nikola Milutinovic wrote:

Hi all.

I'm faced with a situation where I need to deploy an application on a server that is running TC 4.1 with "-security" option enabled. I have figured out that I need to edit "catalina.policy" file and grant my application permissions. I'm testing config on my home machine running 5.5.7. Now I'm slightly baffled.

The application needs to connect to a DB, send mail and write/read files from the file system. All is well except mail sending. This is my catalina policy file:

grant codeBase "file:/home/test/webapps/test/-" {
permission java.net.SocketPermission "localhost:5432", "resolve,connect";
permission java.net.SocketPermission "localhost:3306", "resolve,connect";
permission java.net.SocketPermission "localhost:25", "resolve,connect";
// permission java.net.SocketPermission "localhost:*", "resolve,connect";
permission java.io.FilePermission "/", "read";
permission java.io.FilePermission "/-", "read";
permission java.io.FilePermission "/tmp/-", "read,write";
};


Heh, found one cause, the mail jars were not in my WEB-INF/lib, but in the ${catalina.home}/common/lib. Now, I have modified the catalina.policy file:

grant {
permission java.net.SocketPermission "localhost:25", "resolve,connect";
permission java.net.SocketPermission "localhost:3306", "resolve,connect";
permission java.net.SocketPermission "localhost:5432", "resolve,connect";
};


Now sending starts, but I get the following exception:

javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain

Am I missing something? When security is turned off, mail gets sent.

Nix.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to