zoukankan      html  css  js  c++  java
  • TOMCAT------>web资源访问

    1.web应用达成war包

    通过命令行打war包:jar -cvf xxx.war xxx

    因为放到webapps里电脑会自动识别,自动解压

    2.relodeable="true"  自动下载新更新的web应用(web 应用大的话不建议配置,重新加载很烧)

    <Host name="www.snowing.com" appBase="/Users/snowing/Downloads/snowing">
    <Context path="" docBase="/Users/snowing/Downloads/snowing/1" relodeable="true"/>

    </Host>

    3.conf—》context.xml中配置的web应用被所有共享

    如果加了relodeable="true",这个tomcat下的所有web应用都会自动加载 

    4.Tomcat体系结构和配置https连接器

    Tomcat是一个server

    server 里service里有多个连接找到引擎,引擎里有多个主机,主机里配置了web应用

    5.远程修改tomcat时可以用conf里tomcat-users.xml

    <!--
    NOTE: The sample user and role entries below are intended for use with the
    examples web application. They are wrapped in a comment and thus are ignored
    when reading this file. If you wish to configure these users for use with the
    examples web application, do not forget to remove the <!.. ..> that surrounds
    them. You will also need to set the passwords to something appropriate.
    manager-gui - 允许访问HTML GUI和状态页
    manager-script - 允许访问文本界面和状态页面
    manager-jmx - 允许访问JMX代理和状态页面
    manager-status - 只允许访问状态页
    -->

    <role rolename="tomcat"/>
    <role rolename="role1"/>
    <role rolename="manager-gui"/>
    <role rolename="manager-jmx"/>
    <role rolename="manager-status"/>
    <role rolename="admin-script"/>
    <role rolename="admin-gui"/>
    <user username="manager-gui" password="xxxx" roles="manager-gui"/>
    <user username="admin-gui" password="xxxxx" roles="admin-gui"/>
    <user username="admin-script" password="xxxxx" roles="admin-script"/>
    <user username="manager-jmx" password="xxxxxx" roles="manager-jmx"/>
    <user username="manager-status" password="xxxxx" roles="manager-status"/>
    <user username="both" password="xxxxxx" roles="tomcat,role1"/>
    <user username="role1" password="xxxxxxx" roles="role1"/>

    既往不恋,未来不迎,当下不杂
  • 相关阅读:
    31天重构学习笔记9. 提取接口
    31天重构学习笔记4. 降低方法
    31天重构学习笔记8. 使用委派代替继承
    31天重构学习笔记11. 使用策略类
    31天重构学习笔记12. 分解依赖
    MyCat:第八章:MyCAT In Action中文版
    HDU 2041 超级楼梯
    CSU 1487 未覆盖顶点数量
    HDU 1712 ACboy needs your help
    HDU 2034 人见人爱AB
  • 原文地址:https://www.cnblogs.com/SnowingYXY/p/6475195.html
Copyright © 2011-2022 走看看