tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Qin <p...@shareowner.com>
Subject catalina.policy
Date Thu, 12 Jun 2003 21:51:13 GMT
If myapp is deployed as a war, how do I create a grant entry in
catalina.policy to allow writing to my log file? I tried

grant {
	permission java.io.FilePermission
"${catalina.home}/logs/myapp_debug.txt","write" ;
}

But it didn't work.

Caused by: java.security.AccessControlException: access denied
(java.io.FilePermission /logs/myapp_debug.txt write)
        at
java.security.AccessControlContext.checkPermission(AccessControlContext.java
:270)
        at
java.security.AccessController.checkPermission(AccessController.java:401)
        at
java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
        at java.lang.SecurityManager.checkWrite(SecurityManager.java:975)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
        at org.apache.log4j.FileAppender.setFile(FileAppender.java:272)
        at
org.apache.log4j.FileAppender.activateOptions(FileAppender.java:151)
        at
org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAp
pender.java:206)
        at
org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:247)
        at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:123
)
        at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)
        at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.jav
a:645)
        at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.jav
a:603)
        at
org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigur
ator.java:500)
        at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:
406)
        at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:
432)
        at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.
java:460)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)



Regards,

 
 
PQ

"The difference between 'involvement' and 'commitment'
is like an eggs-and-ham breakfast: the chicken was
'involved' - the pig was 'committed'."


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message