得到 apache tomcat 错误,此文件的访问被拒绝 localhost_access_log.2014-08-30.txt?

2022-09-02 11:54:38

我在Windows 7 OS上安装了Apache tomcate。我刚刚安装了apache,并在eclipse中提供了它。当我在服务器上运行任何简单的应用程序时,它会说404:找不到页面,在控制台中,它将打印这样的错误消息。

SEVERE: Failed to open access log file [C:\Program Files\Apache Software           Foundation\Tomcat 7.0\logs\localhost_access_log.2014-08-30.txt]
java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Tomcat      7.0\logs\localhost_access_log.2014-08-30.txt (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.catalina.valves.AccessLogValve.open(AccessLogValve.java:1117)
at org.apache.catalina.valves.AccessLogValve.startInternal(AccessLogValve.java:1224)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardPipeline.startInternal(StandardPipeline.java:185)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1137)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

我不明白发生了什么事是这样的???请帮帮我。


答案 1

似乎您的当前用户对tomcat文件夹没有权限。

我也遇到了同样的问题,并通过向tomcat文件夹上的登录用户授予权限来解决它。

对于您的情况:

转到>>“C:\Program Files\Apache Software Foundation\Tomcat 7.0”文件夹 右键单击>>属性>>安全选项卡

为当前登录的用户提供所需的权限。


答案 2

1]Open Tomcat C:\Program Files\Apache Software Foundation <br>(Right Click on Tomcat 8.5 ( as per Your Version)<br> →Properties <br> →Select Security Tab <br> →Edit <br> →Select Your System <br> →Check or Allow all the Boxes <br> →Click on Apply <br> →Restart Program


推荐