tomcat用户名密码无效

q5661889 2011-04-29 12:23:55
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<tomcat-users>
<!--
<role rolename="tomcat"/>
<role rolename="role1"/>
<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="admin,manager"/>


-->
</tomcat-users>



这是我tomcat-users.xml内的内容,可是我输了几个用户名密码都无效
...全文
1102 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
onavyo 2011-06-10
  • 打赏
  • 举报
回复
如果是7.x的版本要加入

<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="manager-gui"/>

是6.x 是加入
<role rolename="admin"/>
<role rolename="manager"/>
<user username="admin" password="admin" roles="admin,manager"/>

q5661889 2011-04-29
  • 打赏
  • 举报
回复
我是6.0版本的
fengyun817 2011-04-29
  • 打赏
  • 举报
回复
楼主tomcat版本是7.x的吧?
7.x版本角色必须是固定的,不能随便改

如:manager-gui ,admin-gui 这两个必须这样写。

  <role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="tomcat" password="tomcat" roles="tomcat,manager-gui,admin-gui"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
q5661889 2011-04-29
  • 打赏
  • 举报
回复
[Quote=引用 12 楼 fengyun817 的回复:]
XML code

<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
……
[/Quote]
还是没用啊
fengyun817 2011-04-29
  • 打赏
  • 举报
回复

<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="admin"/>
<role rolename="manager"/>
<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="admin,manager"/>
</tomcat-users>

q5661889 2011-04-29
  • 打赏
  • 举报
回复
我在注释外面加了还是没用
moment52 2011-04-29
  • 打赏
  • 举报
回复
LZ真的是将用户注释调了
shine333 2011-04-29
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 lrbyantai 的回复:]

貌似是被楼主你注释掉了
[/Quote]眼神真好
lorry1113 2011-04-29
  • 打赏
  • 举报
回复
这样还不行的话,那就不是这的问题了
蛋黄车 2011-04-29
  • 打赏
  • 举报
回复
貌似是被楼主你注释掉了
lorry1113 2011-04-29
  • 打赏
  • 举报
回复
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="admin" password="admin" roles="admin,manager"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
</tomcat-users>
shine333 2011-04-29
  • 打赏
  • 举报
回复
修改密码后,服务重启了没有
q5661889 2011-04-29
  • 打赏
  • 举报
回复
还是没用
fengyun817 2011-04-29
  • 打赏
  • 举报
回复
这样呢?


<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="admin"/>
<role rolename="manager"/>
<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="admin,manager"/>

58,455

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧