Java Configuration Tomcat

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.