zoukankan      html  css  js  c++  java
  • 为Tomcat添加用户

    我们在通过页面访问Java web 的url 时可以通过访问http://localhost:8080/里面的manager app进入

    通过点击选择想要进入的页面。

    方法:

    1.tomcat 安装路径下面的conf/tomcat-users.xml

    添加绿色的一行内容。保存即可

    <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. It is
    strongly recommended that you do NOT use one of the users in the commented out
    section below since they are intended for use with the examples web
    application.
    -->
    <!--
    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.
    -->
    <!--
    <role rolename="tomcat"/>
    <role rolename="role1"/>
    <user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
    <user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
    <user username="role1" password="<must-be-changed>" roles="role1"/>
    -->
    <user username="admin" password="admin" roles="manager-gui"/>      <!--  添加这行代码即可-->
    </tomcat-users>

    2.访问http://localhost:8080/

    点击manager app 输入 用户名  admin  密码  admin

  • 相关阅读:
    程序员修炼之道读书笔记02
    程序员修炼之道读书笔记01
    2021年1月30日 体温上报app03(百度API的获取和配置方法)
    2021年1月28日 体温上报app02
    2021年1月27日 体温上报app01
    2021年1月26日 sqlite数据库
    2021年1月25日 列表与适配器
    16.CSS margin用法
    14.CSS 块级元素与行内元素
    12.CSS 简单认识margin
  • 原文地址:https://www.cnblogs.com/huodaihao/p/6791750.html
Copyright © 2011-2022 走看看