Java 學習札記(二)TomCat安裝配置

1.下載TomCat 

  下載地址:http://tomcat.apache.org/ html

2.配置環境變量

  CATALINA_HOME:F:\JAVA\apache-tomcat-6.0.18\apache-tomcat-6.0.18apache

  CATALINA_HOME:F:\JAVA\apache-tomcat-6.0.18\apache-tomcat-6.0.18api

  TOMCAT_HOME:F:\JAVA\apache-tomcat-6.0.18\apache-tomcat-6.0.18tomcat

  CLASSPATH: ;%CATALINA_HOME%\common\lib\servlet-api.jarjsp

  path:;%CATALINA_HOME%\lib;%CATALINA_HOME%\lib\servlet-api.jar;%CATALINA_HOME%\lib\jsp-api.jarspa

3.修改配置端口

在Tomcat的conf文件夾裏有個server.xml文件
    <!-- A "Connector" represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL/TLS HTTP/1.1 Connector on port 8080 -->
    <Connector port="8010" protocol="HTTP/1.1"  connectionTimeout="20000" redirectPort="8443" />

4.啓動

  在Tomcat的bin文件夾裏有個startup.bat文件雙擊code

5.檢測

  打開網址:http://localhost:8010server

相關文章
相關標籤/搜索