Problem Description
After the Tomcat installation is complete, the following error is tested in the browser: not Found (HTTP error 404. The requested Resource is not found), as shown in the following figure:
Figure 1
resolution Process
See this, I first think it must be installed when the choice of JDK path selection is wrong, because the installation tutorial said JDK path is not manually selected, the software will automatically find the path. So there is no change to the path, as shown in the figure below;
Figure 2
Since the installation of the Java environment, the software is installed in the D-disk with the directory. So uninstall the reinstallation again, the result is still not good. Check the online did not directly say why, and find the installation of Tomcat, a tutorial said the input URL is "http://localhost/", another said "http://localhost:8080", this just came round, the original is less port, Prior to publishing the site, contacted the port.
When the port is added, it is ok (at this point the JDK directory selected by the Tomcat installation is manually entered).
Go deep in layers
1) Why is the 8080 port, can you define it yourself.
Practice can give us the best answer. I used the most stupid method is to uninstall the reload, to the port interface when the custom port, as shown in the following figure:
Figure 3
Change the http/1.1 Connector port on port 8080 above, and do not forget to add the port number when testing. The test results can be customized.
Of course unloading load is the most stupid way, is also the easiest way to understand. Of course there are other ways to see the link article
2) The JDK path is not manually changed.
In the example above, the path is "D:\JAVA", which is the path to the JDK on my computer. The following test automatic path, or stupid method unloading load, this process does not change the path default path is "C:\ProgramFiles\Java\jre7", tested, is also successful.
It can be said that the above problem is the lack of ports, and the path is not related.
3) Why it is not related to the path.
Yes, why is it not related to the path, obviously the JDK installed under the D disk, for what path is the C drive is also correct.
JDK installation process, Jane: there will be two path selection, the first is the installation file path, such as my path is "D:\JAVA", the second path is the JRE path, that is "C:\ProgramFiles\Java\jre7" (Note: The path is my computer example).
So it makes sense to install Tomcat with the path of the C drive.
Below we take a look at two directories below the file, through the file compare different;
Under the D-PLATE:
C-Plate under:
There are JRE (Java Runtime Environment,java running environment) in all two disks, so Tomcat can run if you find the Java Runtime environment.
The explanation for two directories is that installing two sets of JRE is the installation of two JVMs on the machine, all of which can run Java programs. Java applications can be divided into two types, one for applications in the JDK directory, and the other for generic Java programs that need to be developed for a variety of applications. They are executed using different JRE, which can reduce the search time and improve the program execution speed by using the features of the JRE running concurrently.
In- Depth summary tomcat requires a JRE (path problem) and must be aware of port issues when entering the URL. A port leads to thinking. In the process of understanding things, we need to constantly think, layers of progressive, to find out the root of the problem.