backup2007

          導(dǎo)航

          <2025年8月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          統(tǒng)計

          公告

          @import url(http://www.aygfsteel.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);


          常用鏈接

          留言簿(1)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          tomcat manager用戶密碼

          在http://tomcat.apache.org/下載的jakarta-tomcat-5.0.28.zip解壓配置好之后啟動,可以正常顯示http://127.0.0.1:8080/index.jsp

          打開tomcat主目錄下的子目錄conf里面的tomcat-users.xml文件,用戶配置內(nèi)容如下:
          <tomcat-users>
            <user name="tomcat" password="tomcat" roles="tomcat" />
            <user name="role1"  password="tomcat" roles="role1"  />
            <user name="both"   password="tomcat" roles="tomcat,role1" />
          </tomcat-users>


          當(dāng)點擊主頁上的連接想進入管理界面的時候,我試著用文件里面提到的用戶名和密碼登陸,得到的卻是:
          HTTP Status 403 - Access to the requested resource has been denied

          訪問被拒絕。難道說這些用戶都沒有管理員的資格,那管理員的用戶名和密碼怎么知道呢?

          仔細再看了tomcat-users.xml,發(fā)現(xiàn)其中提到:
          <!--
            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.
          -->

          才恍然大悟。接下來,根據(jù)上面那段文字的意思,修改tomcat-users.xml文件,在其中添加管理員角色(manager),以及管理員用戶(admin)和密碼(admin),修改后如下:
          <tomcat-users>
            <role rolename="manager"/>
            <user name="tomcat" password="tomcat" roles="tomcat" />
            <user name="role1"  password="tomcat" roles="role1"  />
            <user name="both"   password="tomcat" roles="tomcat,role1" />
            <user username="admin" password="admin" roles="manager"/>
          </tomcat-users>

          最后,重啟tomcat,在進入管理頁面的時候,用管理員用戶admin和密碼admin,登陸ok。

           

           



          Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1787504

          posted on 2007-09-20 17:32 backup2007 閱讀(14775) 評論(2)  編輯  收藏 所屬分類: Linux CentOS Study

          評論

          # re: tomcat manager用戶密碼 2016-04-06 22:36 qqq

          wwww  回復(fù)  更多評論   

          # re: tomcat manager用戶密碼 2016-04-06 22:37 qqq

          企鵝萬惡  回復(fù)  更多評論   

          主站蜘蛛池模板: 黎川县| 棋牌| 金坛市| 绥芬河市| 青浦区| 德令哈市| 吉木萨尔县| 日土县| 大连市| 颍上县| 鸡泽县| 钟山县| 阿勒泰市| 永清县| 仙游县| 德安县| 永靖县| 昭苏县| 江陵县| 诸城市| 峨边| 东方市| 平谷区| 定日县| 左权县| 彭水| 德昌县| 朝阳县| 寿宁县| 扎囊县| 阿克苏市| 湖北省| 武宁县| 崇明县| 山阴县| 松江区| 五大连池市| 镇原县| 昆山市| 临沧市| 奉新县|