我目前正試圖將Tomcat掛接到Netbeans並在其上運行Web項目。我已經設置了一個使用用戶名和密碼的服務器,但不斷收到此錯誤消息。我還添加了下面的服務器日誌以獲取更多詳細信息。 :Netbeans Tomcat服務器問題
Starting Tomcat process...
Waiting for Tomcat...
Tomcat server started.
In-place deployment at C:\Ryan Drive\Web Development\Java\NetBeans\Projects\WebApplication5\build\web
deploy?config=file%3A%2FC%3A%2FUsers%2Frmhaa%2FAppData%2FLocal%2FTemp%2Fcontext8651336917198990861.xml&path=/WebApplication5
FAIL - Failed to deploy application at context path /WebApplication5
C:\Ryan Drive\Web Development\Java\NetBeans\Projects\WebApplication5\nbproject\build-impl.xml:1045: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 4 seconds)
以下是以下服務器日誌。它看起來像訪問被拒絕可能?但我不知道爲什麼會發生這種情況。每次運行服務器時,都會收到相同的服務器日誌錯誤,而與項目無關。
13-Jun-2016 18:14:22.419 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
13-Jun-2016 18:14:22.422 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT has finished in 124 ms
13-Jun-2016 18:14:22.424 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
13-Jun-2016 18:14:22.431 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
13-Jun-2016 18:14:22.432 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 773 ms
java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf\Catalina\localhost\ch07_ex2_download.xml (Access is denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at org.apache.catalina.manager.ManagerServlet.copyInternal(ManagerServlet.java:1626)
at org.apache.catalina.manager.ManagerServlet.copy(ManagerServlet.java:1589)
at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:880)
at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:335)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
「請參閱服務器日誌以瞭解詳細信息。」服務器日誌中的詳細信息是什麼? –
@JoachimRohde,我在上面添加了服務器日誌。謝謝。 – john23
「訪問被拒絕」的哪部分你不明白嗎? – EJP