Tomcat5.5端口设置

有时,Tomcat端口与Oracle端口冲突,那么重新设置一下Tomcat端口即可了。

     

        Tomcat默认的端口是8080,只需打开Tomcat主目录中conf目录下的server.xml文件,找到其中的Connector port="8080",并将其更改为Connector port="9999"即可,修改后的文件如下(有删减):

当然端口看自己爱好设计都OK了!

 

< Service  name ="Catalina" >
 
     <!--  Define a non-SSL HTTP/1.1 Connector on port 9999, change it to 80.  -->
     < Connector
 port ="80"                maxHttpHeaderSize ="8192"
               maxThreads ="150"  minSpareThreads ="25"  maxSpareThreads ="75"
               enableLookups ="false"  redirectPort ="8443"  acceptCount ="100"
               connectionTimeout ="20000"  disableUploadTimeout ="true"   />
  
     <!--  Define a SSL HTTP/1.1 Connector on port 8443  -->
     <!--
    <Connector port="8443" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" disableUploadTimeout="true"
               acceptCount="100" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" />
     -->
 
     <!--  Define an AJP 1.3 Connector on port 8009  -->
     < Connector  port ="8009"
               enableLookups ="false"  redirectPort ="8443"  protocol ="AJP/1.3"   />
 
        
     <!--  Define the top level container in our container hierarchy  -->
     < Engine  name ="Catalina"  defaultHost ="localhost" >
 
       <!--  Because this Realm is here, an instance will be shared globally  -->
 
       <!--  This Realm uses the UserDatabase configured in the global JNDI
           resources under the key "UserDatabase".  Any edits
           that are performed against this UserDatabase are immediately
           available for use by the Realm.   -->
       < Realm  className ="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName ="UserDatabase" />
 
      <!--  Define the default virtual host
           Note: XML Schema validation will not work with Xerces 2.2.
        -->
       < Host  name ="localhost"  appBase ="webapps"
       unpackWARs ="true"  autoDeploy ="true"
       xmlValidation ="false"  xmlNamespaceAware ="false" >
       </ Host >
     </ Engine >
   </ Service >

 

改动好以后,重启Tomcat,改动就生效了,就这样简单了,赶快试一下吧!

你可能感兴趣的:(apache,oracle,tomcat,xml,Scheme)