tomcat 登入首頁成功 點擊Manager App 401 等問題

來源:互聯網
上載者:User

標籤:com   密碼   blog   圖片   注意   XML   info   pps   username   

1、將項目部署在tomcat的安裝路徑webapps下(如果報404,查下該應用是否在tomcat的webapps下部署著)

2、啟動tomcat成功,http://127.0.0.1:8080成功,點擊Manager App,需要輸入使用者名稱和密碼,輸入錯誤,取消,提示401

3、解決辦法,tomcat安裝路徑conf下的tomcat-users.xml(放開該檔案預設配置的角色、使用者是不行的)

添加:

  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <role rolename="manager"/> 
  <role rolename="manager-gui"/>
  <role rolename="admin"/>  
  <role rolename="admin-gui"/>  
  <role rolename="manager-script"/>  
  <role rolename="manager-jmx"/>  
  <role rolename="manager-status"/> 
  <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="admin" roles="tomcat,role1"/>
  <user username="tomcat" password="" roles="manager-gui"/>
  <user username="Tomcat" password="Tomcat" roles="admin-gui,admin,manager-gui,manager,manager-script,manager-jmx,manager-status"/>

見圖:

 

 4、注意,修改xml檔案後一定要重啟tomcat

 

註:本文參考http://bbs.csdn.net/topics/391935818

tomcat 登入首頁成功 點擊Manager App 401 等問題

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.