Home > Article > Operation and Maintenance > How to handle the error when Tomcat is started for the first time (startup exception: FileNotFoundException)
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.
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).
Find the Tomcat directory and modify the control permissions, as shown below:
At this time, Restart Tomcat and it's OK.
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)
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.
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!