配置Tomcat6的管理用户
在Tomcat上发布war之前需要配置一个管理用户以进入上传页面,而配置就是通过修改/usr/local/tomcat6/conf/tomcat-users.xml这个文件进行的。下面是修改后的文字:
<?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>
<!--
  NOTE:  By default, no user is included in the "manager-gui" role required
  to operate the "/manager/html" web application.  If you wish to use this app,
  you must define such a user - the username and password are arbitrary.
-->
<!--
  NOTE:  The sample user and role entries below are wrapped in a comment
  and thus are ignored when reading this file. Do not forget to remove
  <!.. ..> that surrounds them.
-->
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <role rolename="manager"/>
  <user username="president" password="123" roles="manager"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>
上面的
<role rolename="manager"/>
  <user username="president" password="123" roles="manager"/>
这两句是新加入的,这两句就把管理用户配置上了。其它部分无需修改。
另外一点需要注意的是,有时
<role rolename="tomcat"/>
  <role rolename="role1"/>
  <role rolename="manager"/>
  <user username="president" password="123" roles="manager"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
这一整段都被上面的<!-- 和下面的 -->包围着,致使中间的内容被屏蔽而不起作用,这在VI编辑器中不容易发现,需要人为多注意一下。
修改好tomcat-users.xml文件后,重启tomcat就能进去上传war的页面了。
2016年3月1日20:27:44
配置Tomcat6的管理用户的更多相关文章
- JavaWeb学习之tomcat安装与运行、tomcat的目录结构、配置tomcat的管理用户、web项目目录、虚拟目录、虚拟主机(1)
		
1.tomcat安装与运行双击tomcat目录下的bin/startup.bat,启动之后,输入http://localhost:8080,出现安装成功的提示,表示安装tomcat成功 2.tomca ...
 - tomcat6~7~8用户设置及一个独立服务器上跑多个tomcat配置JVM设置优化亲测
		
tomcat6管理用户 在tomcat `安装根目录`/conf/tomcat-users.xml
 - window服务器上mongodb的安装与如何将mongodb设置为服务,为mongodb设置管理用户,mongodb连接字符串配置
		
最近公司有一个项目模块让用nosql-mongodb替换了,故,对mongodb做了一点研究,然后分享一下! 1.首先说一下安装时的坑 下载mongodb,如果你从官网下载,将会是一件很慢的事情,在公 ...
 - 【Java EE 学习 30】【闪回】【导入导出】【管理用户安全】【分布式数据库】【数据字典】【方案】
		
一.闪回 1.可能的误操作 (1)错误的删除了记录 (2)错误的删除了表 (3)查询历史记录 (4)撤销已经提交了的事务. 2.对应着以上四种类型的误操作,有四种闪回类型 (1)闪回表:将表回退到过去 ...
 - 事务管理(下) 配置spring事务管理的几种方式(声明式事务)
		
配置spring事务管理的几种方式(声明式事务) 概要: Spring对编程式事务的支持与EJB有很大的区别.不像EJB和Java事务API(Java Transaction API, JTA)耦合在 ...
 - JMeter学习-014-JMeter 配置元件实例之 - 用户定义的变量 参数化配置
		
前文讲述了通过 CSV Data Set Config 实现参数化配置(详情敬请参阅:JMeter学习-010-JMeter 配置元件实例之 - CSV Data Set Config 参数化配置), ...
 - 在Web.Config文件中使用configSource,避免动态修改web.config导致asp.net重启(另添加一个Config文件用于管理用户数据)
		
原文:在Web.Config文件中使用configSource,避免动态修改web.config导致asp.net重启(另添加一个Config文件用于管理用户数据) 我们都知道,在asp.net中修改 ...
 - springBoot+springSecurity 数据库动态管理用户、角色、权限
		
使用spring Security3的四种方法概述 那么在Spring Security3的使用中,有4种方法: 一种是全部利用配置文件,将用户.权限.资源(url)硬编码在xml文件中,已经实现过, ...
 - 使用成员资格管理用户Membership
		
ASP.NET成员资格使您可以验证和管理Web应用程序的用户信息.它提供验证用户凭据,创建和修改成员资格用户以及管理用户设置(如密码和电子邮件地址)的功能. ASP.NET成员资格主要用于ASP.NE ...
 
随机推荐
- LeetCode-Sudoku Solver (递归解法)
			
题目地址: https://leetcode.com/problems/sudoku-solver/ // 将字符串的数独题转换成 int[9][9] ][], char ** b, int boar ...
 - for循环下九九乘法表
			
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
 - java---一元二次方程练习
			
public class wu{ public static void main(String[] args){ int a = 2,b = 1, c = 0,d = b*b-4*a*c if (a ...
 - JavaScript的My97Date日期工具类的使用
			
开发人员最喜欢的事情就是有工具然后拿来直接使用(. ~ .) 使用截图: 1.设置input标签 2.根据其DEMO文件,引入,进行事件处理 3.效果如图 4.效果如图 代码: <!DOCTYP ...
 - metasploit-post模块信息
			
Name Disclosure Date Rank Description ---- ...
 - 前端CSS参考阅读
			
CSS 2.2 W3标准 http://dev.w3.org/csswg/css2/ CSS2 中文翻译 http://files.cnblogs.com/files/mize/CSS2_Chines ...
 - windows下的mongodb分片配置
			
1. 分片服务器设置mongod -port 10001 -dbpath=F:/DbSoft/mongodb/rs_data/master -directoryperdb --shardsvr -re ...
 - Linux 计划任务 Crontab 笔记与总结(2)Crontab 的基本组成与配置
			
[Crontab 的基本组成] ① 系统服务 CROND:每分钟都会从配置文件刷新定时任务 ② 配置文件 :文件方式设置定时任务 ③ 配置工具 crontab:用途调整定时任务 [配置文件的配置文件格 ...
 - 【翻译】Kinect v2程序设计(C++) Body 篇
			
Kinect SDK v2预览版的主要功能的使用介绍,基本上完成了.这次,是关于取得Body(人体姿势)方法的说明. 上一节,是使用Kinect SDK v2预览版从Kinect v2预览版取得B ...
 - 使用 html5 postMessage 实现跨域
			
英文原文 中文翻译 因为web的安全机制,浏览器的同源策略.在不同域之间做数据交换就会涉及到跨域.A域如果要实现向B域发关消息,多多少少要有对B域有一定控制权,最起码人家B域要接收你的消息啊. 最近发 ...