Home  >  Article  >  Operation and Maintenance  >  How to handle the error when Tomcat is started for the first time (startup exception: FileNotFoundException)

How to handle the error when Tomcat is started for the first time (startup exception: FileNotFoundException)

坏嘻嘻
坏嘻嘻Original
2018-09-17 09:37:554861browse

The content of this article is about how to deal with the error when Tomcat is started for the first time (startup exception: FileNotFoundException). It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

· Abnormal situation

I just reinstalled the system. After installing Tomcat and configuring the environment and wanted to test it, this exception was reported: java .util.logging.ErrorManager:4 java.io.FileNotFoundException: C:\Program Files\apache-tomcat-7.0.56\logs\catalina.2018-06-23.log (Access Denied.)

When testing http://localhost:8080/ in the browser, a 500 error will be reported. I thought it was a version problem before, so I changed the version, but later found out (access denied).

·Solution

Find the Tomcat directory and modify the control permissions, as shown below:

How to handle the error when Tomcat is started for the first time (startup exception: FileNotFoundException)

At this time, Restart Tomcat and it's OK.

· More tips

· Modify the port

Usually the default port number of Tomcat is 8080, if We installed it using an .exe file, and we can change our port number directly during installation and boot. There is also a .zip compressed package, which requires us to modify it manually.

We enter the conf folder in the directory where Tomcat lives (this folder stores some configuration files of Tomcat)

How to handle the error when Tomcat is started for the first time (startup exception: FileNotFoundException)

Selected in the picture The server.xml file is the file where the port number we need to modify is stored, so we open it.

How to handle the error when Tomcat is started for the first time (startup exception: FileNotFoundException)

The blue part selected above is our port number. 8080 is the default port number, we can change it to 8089 and so on.

The above is the detailed content of How to handle the error when Tomcat is started for the first time (startup exception: FileNotFoundException). For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn