zoukankan      html  css  js  c++  java
  • 不同版本的 Tomcat 设置用户名密码 的方法

    Tomcat 6

    tomcat根目录conf omcat-users.xml,找到 <tomcat-users> 标签,在后面添加

    <user username="admin" password="1234" roles="admin,manager"/>

    其中,username 和  password 任意,但是 roles="admin,manager" 不能变

    <tomcat-users>
    <!--
    NOTE: By default, no user is included in the "manager" role required
    to operate the "/manager" web application. If you wish to use this app,
    you must define such a user - the username and password are arbitrary.
    -->
    <!--
    NOTE: The sample user and role entries below are wrapped in a comment
    and thus are ignored when reading this file. Do not forget to remove
    <!.. ..> that surrounds them.
    -->
    <!--
    <role rolename="tomcat"/>
    <role rolename="role1"/>
    <user username="tomcat" password="tomcat" roles="tomcat"/>
    <user username="both" password="tomcat" roles="tomcat,role1"/>
    <user username="role1" password="tomcat" roles="role1"/>
    -->
    <user username="admin" password="1234" roles="admin,manager"/>
    </tomcat-users>

    Tomcat 7

    tomcat根目录conf omcat-users.xml,找到 <tomcat-users> 标签,在后面添加

    <user username="admin" password="1234" roles="manager-gui"/>

    其中,username 和  password 任意,但是 roles="manager-gui" 不能变

    <tomcat-users>
    <!--
    NOTE: By default, no user is included in the "manager-gui" role required
    to operate the "/manager/html" web application. If you wish to use this app,
    you must define such a user - the username and password are arbitrary.
    -->
    <!--
    NOTE: The sample user and role entries below are wrapped in a comment
    and thus are ignored when reading this file. Do not forget to remove
    <!.. ..> that surrounds them.
    -->
    <!--
    <role rolename="tomcat"/>
    <role rolename="role1"/>
    <user username="tomcat" password="tomcat" roles="tomcat"/>
    <user username="both" password="tomcat" roles="tomcat,role1"/>
    <user username="role1" password="tomcat" roles="role1"/>
    -->
    <role rolename="manager-gui"/>
    <user username="admin" password="1234" roles="manager-gui"/>
    </tomcat-users>

  • 相关阅读:
    Windows Server 2003 IIS 使用 Excel.Application
    AutoCAD2008换硬盘后重新激活
    730KII 打印机 Win7 2017年11月更新系统补丁后无法打印
    军训卫生巾鞋垫尺码简易参考
    电阻功率与电流关系
    万用表判断场效应管的好坏
    避免电路接触时火花的产生
    phpexcel如何读和写大于26列的excel
    铅酸蓄电池正确使用与充电管理
    铅酸蓄电池单格最高与最低电压
  • 原文地址:https://www.cnblogs.com/jichen/p/8533405.html
Copyright © 2011-2022 走看看