? computer installs multiple versions of Tomcat and switches (unzipped version of apache-tomcat-5.5.0/ -6.0.45/-7.0.703 versions)
? tomcat configuration Environment variables
? tomcat5.5.0 Flash back problem, port occupancy issues
Fix the problem: the console successfully starts Tomcat without error but the Welcome page is a blank page
? import Tomcat into eclipse
1. write this article because you re-install the computer and want to use the previous system Tomcat(decompression version), but encountered some problems, if you like me to use the previous system Tomcat, you can refer to the following:
1.1 First, for example, you want to install tomcat-7.0.70 first, it is best to tomcat-7.0.70\conf\catalina\localhost files and Apache-tomcat-7.0.70\Work \catalina\localhost The following files are deleted or cut off elsewhere. When you start Tomcat, the console does not get an error due to the previous mapping file.
1.2 If you want to install the tomcat5.5 version, you need to modify the JDK path name in the Catalina.bat file in the bin directory to the native JDK installation path (like my installation note in JDK (multi-version)! As shown in this article, my 1.6jdk path is E:\javaEdit\JDK\java_jdk1.6\jdk1.6), then the Catalina.bat file should be set up as:
Otherwise, there will be a flashback issue for double-clicking the Startup.bat under Bin. If it is a TOMCAT6 or 7 version, it is not required.
2. I extracted three versions of Tomcat into the E:\Tomcat directory, such as:
3. assume that your computer is already well-equipped with the JDK environment (no, look at the JDK (multi-version) installation Note! )。 Next you configure Tomcat's system environment variables (I'm ready to configure tomcat-7.0.70), to computer → properties → advanced system settings → advanced → environment variables :
3.1, new variable name: catalina_base, Variable value: E:\Tomcat\apache-tomcat-7.0.70 3.2, new variable name: catalina_home, variable value: E:\Tomcat\ apache-tomcat-7.0.70 3.3, open path, add variable value:%catalina_home%\lib;%catalina_home%\binYou can refer to: catalina_base and catalina_home Why configure Catalina_home environment variables4.If you are directly extracting the new Tomcat and want to change the port from the default of 8080 to 80, you need to change the inside port to the Server.xml file in the Tomcat's Conf folder.
<connector connectiontimeout= "20000" port= "+" protocol= "http/1.1" redirectport= "8443"/> <!--A " Connector "Using the shared thread pool--> <!-- <connector executor=" Tomcatthreadpool " port=" 8080 "protocol=" http/1.1 " connectiontimeout=" 20000 " redirectport=" 8443 "/> -
5. OK, now you can start Tomcat and double-click the Startup.bat in the bin directory. If the console shows how many seconds the startup was successful, and no error message (the error message above), it means that it has succeeded or succeeded in more than half.
Then, without shutting down the console, accessing Localhost via a Computer browser can generally display the Tomcat welcome interface, and if not, first we insist that the 80 port is occupied. You can check the following steps:
5.1 dos window input Netstat-ano command
You can find the PID of the process that occupies port 80, and then set the PID to show the process in Task Manager,
And then end this process.
Last note: My tomcat is not actually occupied port, because the PID is 6168 is tomcat own process occupies 80 port.
My Welcome screen is blank page because "Apache-tomcat-7.0.70\webapps root folder was deleted by me " (This folder is the welcome interface, because I use the Tomcat is the reload system, not the new decompression), Then you create a new root folder and write a hello.html to put it inside,
After you start Tomcat, you can see your own welcome screen by typing localhost\hello.html in your browser.
The code for hello.html is:
<!doctype html>
right|alston& thinking focus, original difficult, please respect the original. Tomcat (Multi-version) installation Note!