java configuration classpath, catalina_home environment variables
This will also be combined with java_home and catalina_home, that is, the JDK path, and the Tomcat path are configured, you can configure the servlet:
Right-click My Computer--properties--high-level--environment variables--Add a system variable named Classpath with a value of:
.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar;%catalina_home%\common\lib\servlet-api.jar;
Add a System variable: The name is Java_home, and the value is the JDK's installation path
Add a System variable: The name is Catalina_home, and the value is Tomcat's decompression path
Transferred from: http://blog.sina.com.cn/s/blog_49867dc001013j65.html
Setting Catalina_home Environment variables
1. Catalina_home is an alias for the Tomcat installation path to facilitate the use of Tomcat
2. Computer > Properties > Environment variables, create a new environment variable. Variable named catalina_home, variable value tomcat directory, My Computer is: "F:\apache-tomcat-7.0.12", pay attention to the back do not need to add "\" or ";"
3, in the environment variable path, the new increase "%catalina_home%\bin\"
3. Start Tomcat: Enter command line cmd, input startup.bat
4. Open the browser, enter: http://localhost:8080, see if Tomcat starts normally
5. Close Tomcat: Enter command line cmd, input shutdown.bat
The default is 8080 ports, there may be 8080 ports are occupied, if occupied we can find server.xml modify port under the Conf folder under the Tomcat installation directory (for example: apache-tomcat-7.0.33\conf\)
Similar to the following:
<connector
port="8080" ==> port 8080
Maxthreads= "==>";?
Minsparethreads= "==>";?
Maxsparethreads= "==>";?
Enablelookups= "false" ==>?
Redirectport= "8443" ==>?
Acceptcount= "==>";?
debug= "0" ==>?
connectiontimeout= "20000" ==> connection timed out?
Disableuploadtimeout= "true" ==>?
/>
You can change the port 8080 to the other, so it should be.
Java Configuration Tomcat