当我通过Kitematic创建一个Tomcat8的image之时, Startup tomcat,尝试访问admin page但是失败.尝试更改tomcat-users.xml,但未生效,一直显示以下错误:

查看conf/server.xml,内容如下:

  <GlobalNamingResources><!-- Editable user database that can also be used byUserDatabaseRealm to authenticate users--><Resource name="UserDatabase" auth="Container"type="org.apache.catalina.UserDatabase"description="User database that can be updated and saved"factory="org.apache.catalina.users.MemoryUserDatabaseFactory"pathname="conf/tomcat-users.xml" /></GlobalNamingResources>

由此可见,tomcat是要从tomcat-users.xml里读取用户信息的.但是还是依然不生效.

继续查看conf/context.xml

<Context><!-- Default set of monitored resources. If one of these changes, the    --><!-- web application will be reloaded.                                   --><WatchedResource>WEB-INF/web.xml</WatchedResource><WatchedResource>${catalina.base}/conf/web.xml</WatchedResource><!-- Uncomment this to disable session persistence across Tomcat restarts --><!--<Manager pathname="" />-->
</Context>

修改conf/tomcat-users.cml

<?xml version="1.0" encoding="UTF-8"?>
<!--Licensed to the Apache Software Foundation (ASF) under one or morecontributor license agreements.  See the NOTICE file distributed withthis 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 withthe License.  You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed 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 andlimitations under the License.
-->
<tomcat-users xmlns="http://tomcat.apache.org/xml"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"version="1.0">
<role rolename="manager-gui"/><role rolename="manager-script"/><role rolename="manager-jmx"/><role rolename="manager-status"/><role rolename="admin"/><role rolename="manager"/><role rolename="admin"/><user username="admin" password="admin" roles="admin,manager,manager-gui,manager-script,manager-jmx,manager-status"/>
</tomcat-users>

解决方法:

在conf/Catalina/localhost/下创建一个文件: manager.xml,内容如下:

<Context privileged="true" antiResourceLocking="false"docBase="${catalina.home}/webapps/manager"><Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />
</Context>

不用重启tomcat,这时应该可以访问 Manager App页面了.

Docker下通过Kitematic创建Tomcat8 image 无法访问Manager App页面相关推荐

  1. Windows下通过Kitematic创建mysql instance

    1. 下载Docker from http://mirrors.aliyun.com/docker-toolbox/windows/docker-toolbox/ 我下载的版本是: DockerToo ...

  2. tomcat8 进入不了Manager App 界面 403 Access Denied

    准备 1.注释掉context.xml中的value属性 使用下面的命令: vim /usr/local/tomcats/tomcat-daily/webapps/manager/META-INF/c ...

  3. 命令行下使用javah命令生成.h文件,出现“错误: 无法访问android.app.Activity 找不到android.app.Activity的类文件”的解决方法...

    在学习NDK中,当我在项目的bin/classes目录下使用javah命令生成头文件时,出现了"错误: 无法访问android.app.Activity 找不到android.app.Act ...

  4. [转]Docker基础-使用Dockerfile创建镜像

    本文转自:https://www.cnblogs.com/jie-fang/p/7927643.html 1.基本结构 Dockerfile由一行行命令语句组成,并支持以#开头的注释行.例如: # T ...

  5. docker下安装Nginx的方法

    这篇文章主要介绍了docker下安装Nginx的方法,非常不错,具有一定的参考借鉴价值,需要的朋友可以参考下 一. 环境说明 docker: 18.03.1-ce nginx: 1.15.1 二. 拉 ...

  6. docker下,一行命令搭建elasticsearch6.5.0集群(带head插件和ik分词器)

    docker下,一行命令搭建elasticsearch6.5.0集群(带head插件和ik分词器) 2019年01月27日 21:06:12 博陵精骑 阅读数:794 标签: dockerelasti ...

  7. docker中lnmp访问php页面,Docker下部署LNMP工作环境的教程(详细步骤)

    本篇文章给大家带来的内容是关于Docker下部署LNMP工作环境的教程(详细步骤),有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助. 普通PC环境也可以用以下配置,只是MYSQL那里换回 ...

  8. docker下安装nacos 并使用mysql数据库

    没做出来 腾讯云  有机会用虚拟机试试 参考资料 https://www.e-learn.cn/content/java/2357340 https://blog.csdn.net/xieqing_x ...

  9. docker下gitlab安装配置使用(完整版)

    docker下gitlab安装配置使用(完整版) 22018.12.16 00:07:57字数 737阅读 17595 docker 安装gitlab以及使用 一.安装及配置 1.gitlab镜像拉取 ...

最新文章

  1. golang中的strings.Split
  2. mysql c api 封装_封装MySQL C API 基本操作
  3. MacOS ClashX 配置代理端口为0问题7890 配置iterm2终端代理
  4. 使用FlashFTP上传文件到指定服务器
  5. 汤小丹计算机操作系统慕课版课后题答案第四章:进程同步
  6. 在win11和win10的edge浏览器运行flash网址设置详解
  7. 高斯消元法求逆矩阵 matlab,matlab中求逆矩阵的高斯消元法实现的代码
  8. Jsckson 实现 java 对象与 JSONObject 和 JSONArray 互转
  9. Python教学案例 - 三天打渔、两天晒网
  10. E575: viminfo: Illegal starting char in line:
  11. 基于OpenSSL,实现SM2签名数据的ASN1编码转换
  12. migration mysql_MySQL Migration Tool 使用 | 学步园
  13. 微信扫码点餐小程序怎么做,一步步教你
  14. MFC应用中添加背景音乐,及音乐下载
  15. LVGL lv_line线条(15)
  16. 秋高气爽,静笃九月禅宗
  17. 为什么说 5G 是物联网的时代?
  18. tms web core 与 kbmmw 第一次亲密接触
  19. Linux开发工具--(编辑器,编译器,调试器)
  20. 3Com 905系列介绍

热门文章

  1. 微信小程序视频播放器
  2. HelloCharts 自定义X轴
  3. CDH集群下hadoop异常PriviledgedActionException as:root (auth:SIMPLE)解决
  4. D3D中的Z缓存使用示例
  5. vue.js写一个DOTA2卡尔练习小游戏
  6. 超级注水电池续航达3千公里
  7. Java+SSM美妆商城全套电商购物(含源码+论文+答辩PPT等)
  8. vant ui 官网网址
  9. “教室派”APP使用体验
  10. 基于Java实现的宠物领养、救助、商城系统网站设计(springboot+bootstrap+MySQL)