Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Tomcat policy file, advice and clarification please

Hugues Ferland

2007-02-06

Replies:

Hi,

I have a Tomcat 5.5 installation on Debian Linux with Java 1.6.

I have a web application that create its own connection to an Oracle database. The ojdbc14.jar is included in the WEB-INF/lib directory of the web application.

Now with the default configuration with security enabled, a SecurityException "java.lang.RuntimePermission getClassLoader" is thrown.

I tried to apply a security policy to ojdbc14.jar with grant AllPermission, but without success. This is what I added to /etc/tomcat5.5/policy.d/50user.policy:

grant codeBase "file:/<the path to the web application>/WEB-INF/lib/ojdbc.jar" {
 permission java.security.AllPermission;
}

This did not work. One particularity of the web application is that I do not deploy it with a war file. I created it using a context xml file in ${catalina.home}/conf/Catalina/localhost/<context name>.xml.

Also the docBase point outside the ${catalina.home}.

Of course, I'd like to know what I'm doing wrong... I looked on google, tomcat-docs, and other places without any luck... Maybe somebody could point me in the right direction? Or better yet tell me what is wrong :)

Thanks,

Hugues

   
---------------------------------
All new Yahoo! Mail
---------------------------------
Get news delivered. Enjoy RSS feeds right on your Mail page.
©2008 junlu.com - Jax Systems, LLC, U.S.A.