backup2007

          導航

          <2025年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          統計

          公告

          @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文件,用戶配置內容如下:
          <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>


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

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

          仔細再看了tomcat-users.xml,發現其中提到:
          <!--
            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.
          -->

          才恍然大悟。接下來,根據上面那段文字的意思,修改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 閱讀(14769) 評論(2)  編輯  收藏 所屬分類: Linux CentOS Study

          評論

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

          wwww  回復  更多評論   

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

          企鵝萬惡  回復  更多評論   

          主站蜘蛛池模板: 含山县| 麻江县| 温宿县| 师宗县| 桃园县| 万源市| 朝阳县| 北辰区| 枝江市| 如皋市| 昭平县| 监利县| 曲水县| 莎车县| 青龙| 曲阳县| 象山县| 商水县| 襄樊市| 柘荣县| 济宁市| 澄城县| 桑日县| 景德镇市| 河南省| 新乡市| 昌吉市| 湘乡市| 股票| 裕民县| 清远市| 徐水县| 名山县| 海林市| 秀山| 达尔| 南皮县| 邯郸县| 肥城市| 枣庄市| 自贡市|