zoukankan      html  css  js  c++  java
  • war部署到tomcat

    gs-rest-service-0.1.0.war复制到tomcat-9.0.0.M17webapps
    打开server.xml,这Host节点,加入<Context path="/gs" docBase="gs-rest-service-0.1.0.war" debug="0" privileged="true"/> 
    gs相当于虚拟目录,docBaset填写相对应Host 的 appBase的地址,加后缀war
    <Host name="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true">

            <!-- 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
                 Note: The pattern used is equivalent to using pattern="common" -->
            <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
                   prefix="localhost_access_log" suffix=".txt"
                   pattern="%h %l %u %t &quot;%r&quot; %s %b" />
                <!-- Tomcat Manager Context --> 
                <Context path="/gs" docBase="gs-rest-service-0.1.0.war" debug="0" privileged="true"/> 
          </Host>
    可以用地址访问:
    http://localhost:8080/gs/greeting/
  • 相关阅读:
    SqlServer该如何合适的索引
    SqlServer该如何合适的索引
    SQLServer跨库查询分布式查询
    SQLServer跨库查询分布式查询
    sqlserver 字符串能不能执行
    WPF添加类库并引用
    StringUtils类常用方法
    如何理解.NET开发中的x86/x64/AnyCPU
    JS获取url参数
    MySQL CONCAT函数:字符串拼接
  • 原文地址:https://www.cnblogs.com/yuanxiaoping_21cn_com/p/6606323.html
Copyright © 2011-2022 走看看