Holen@Blog

Holen Bolg on Donews.net

  DonewsBlog  |  Donews首页  |  Donews社区  |  Donews邮箱  |  我的首页  |  联系作者  |  聚合   |  登录
  216篇文章 :: 0篇收藏:: 353篇评论:: 6个Trackbacks

公告

Free Counters

文章

收藏

相册

我的原创文章

存档


正在读取评论……


用自解压方式安装Tomcat5, 在startup.bat中指定JDK.

手工编辑tomcat-users.xml文件:

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <role rolename="manager"/>
  <role rolename="admin"/>

  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
  <user username="manager" password="manager" roles="manager"/>
  <user username="admin" password="admin" roles="admin"/>

</tomcat-users>

这样就能进入admin或manager了.

因为这两部分TOMCAT自带的管理控制台均使用容器权限管理方式, 可注意其web.xml中如下设置:

  <security-role>
    <description>
      The role that is required to log in to the Manager Application
    </description>
    <role-name>manager</role-name>
  </security-role>
在该文件中就指定的只有manager角色方可使用该应用.

admin应用中与之类似:

  <!-- Security roles referenced by this web application -->
  <security-role>
    <description>
      The role that is required to log in to the Administration Application
    </description>
    <role-name>admin</role-name>
  </security-role>



Trackback: http://tb.donews.net/TrackBack.aspx?PostId=431320


[点击此处收藏本文]  发表于2005年06月15日 3:06 PM




正在读取评论……

发表评论

大名:
网址:
验证码
评论