How to define Win32 path names in a Tomcat Security Policy

Defining Win32 paths in the 'catalina.policy' file for Tomcat security can be a bit tricky. Here are some examples:

grant codeBase "file:/C:/APP/appServer/-"{
  permission java.io.FilePermission "C:\\\\APP\\\\appServer\\\\tomcat\\\\common\\\\classes\\\\carol.properties", "read";
};

grant codeBase "file:${catalina.home}/webapps/ufs/-" {
  permission java.security.SecurityPermission "insertProvider.SunJCE";
};

Last updated: 14/12/2005