Tomcat6.0 配置ip地址访问不用加端口和项目名 _JAVA_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > JAVA > Tomcat6.0 配置ip地址访问不用加端口和项目名

Tomcat6.0 配置ip地址访问不用加端口和项目名

 2012/9/8 11:52:13  中国凉茶  程序员俱乐部  我要评论(0)
  • 摘要:主要配置tomcat/conf目录下的server.xml文件修改前:<Hostname="localhost"appBase="webapps"unpackWARs="true"autoDeploy="true"xmlValidation="false"xmlNamespaceAware="false"><!--SingleSignOnvalve,shareauthenticationbetweenwebapplicationsDocumentationat
  • 标签:配置 Tomcat 项目
主要配置tomcat/conf目录下的server.xml文件
修改前:
<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"  
               prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
        -->

      </Host>

添加
  
<Context path="" docBase="cma_gsics/" />
<Context path="/cma_gsics" docBase="cma_gsics/" />
(或者:
         <Context path="/" docBase="." />
         <Context path="/cma_gsics" docBase="." />)

修改后:
<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="cma_gsics/" />
<Context path="/cma_gsics" docBase="cma_gsics/" />

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"  
               prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
        -->

      </Host>
发表评论
用户名: 匿名