tomcat部署war包不成功解决方法

tomcat部署war包不成功解决方法今天尝试在阿里云服务器中的tomcat部署项目点击managerApp时页面显示这样,根据上图提示可知原因是cont/tomcat-users.xml未配置用户名和密码,所以需要将下面这段配置用户名和密码的代码添加到tomcat-users.xml中<rolerolename=”manager-gui”/><userusername=”tomcat”password=”tomcat”roles=”manager-gui”/>保存后重启tomcat,再点

大家好,又见面了,我是你们的朋友全栈君。

今天尝试在阿里云服务器中的tomcat部署项目
在这里插入图片描述

在这里插入图片描述
点击manager App 时页面显示这样,根据上图提示可知原因是cont/tomcat-users.xml 未配置用户名和密码, 所以需要将下面这段配置用户名和密码的代码添加到tomcat-users.xml中

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

在这里插入图片描述

保存后重启tomcat,再点击manage app 后提示输入
账号:tomcat
密码:tomcat 即可打开网址
在这里插入图片描述

若出现了403问题,则是因为访问受限了

403 Access Denied
 
You are not authorized to view this page.
 
By default the Manager is only accessible from a browser running on the same machine as Tomcat. If you wish to modify this restriction, you'll need to edit the Manager's context.xml file.
 
If you have already configured the Manager application to allow access and you have used your browsers back button, used a saved book-mark or similar then you may have triggered the cross-site request forgery (CSRF) protection that has been enabled for the HTML interface of the Manager application. You will need to reset this protection by returning to the main Manager page. Once you return to this page, you will be able to continue using the Manager application's HTML interface normally. If you continue to see this access denied message, check that you have the necessary permissions to access this application.
 
If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp.
 
For example, to add the manager-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above

这时候需要修改
/webapps/manager/META_INF/context.xml文件,将文件中对访问的来源受限设置注释:

<Context antiResourceLocking="false" privileged="true" >
  <!--注释这里,去除对访问权限的设置
    <Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
         -->
</Context>

修改后再重新点击Manage App 即可打开管理界面

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/138888.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Kafka零拷贝_kafka读取数据

    Kafka零拷贝_kafka读取数据Kafka除了具备消息队列MQ的特性和使用场景外,它还有一个重要用途,就是做存储层。用kafka做存储层,为什么呢?一大堆可以做数据存储的MySQL、MongoDB、HDFS……因为kafka数据是持久化磁盘的,还速度快;还可靠、支持分布式……啥!用了磁盘,还速度快!!!没错,kafka就是速度无敌,本文将探究kafka无敌性能背后的秘密。首先要有个概念,kafka高性能的背后…

    2022年9月21日
    2
  • 如何快速记忆小鹤双拼键位图?

    如何快速记忆小鹤双拼键位图?记忆方法:韵母表+图形单韵母aoeiu、üAOEIV双拼练习网址:https://api.ihint.me/shuang/

    2022年6月29日
    116
  • 字符串转json对象 java_js中对象转字符串的方法

    字符串转json对象 java_js中对象转字符串的方法1.JSON数据和Java对象的相互转换JSON数据和Java对象的相互转换*JSON解析器:*常见的解析器:Jsonlib,Gson,fastjson,jackson1.Java对象转换JSON1.使用步骤:1.导入jackson的相关jar包2.创建Jackson核心对象ObjectMapper3.调用ObjectMapper的相关方法进行转换…

    2022年9月16日
    2
  • matlab中wavedec2,说说wavedec2函数【图】

    matlab中wavedec2,说说wavedec2函数【图】说说wavedec2函数【图】08-10栏目:技术TAG:wavedec2wavedec2http://maiqiuzhizhu.blog.sohu.com/110325150.htmlcopyrightjhua.orgwavedec2函数:copyrightjhua.org1.功能:实现图像(即二维信号)的多层分解.https://www.jhua.org多层,即多尺度.www.jhua…

    2022年6月29日
    20
  • 手机APP抓包过程

    手机APP抓包过程0.手机连接WiFi,运行Fiddler的PC连接同一WiFi;假设手机IP为192.168.100.10,PC的IP地址为192.168.100.131.PC端打开Fiddler软件,Tools–Options,选择HTTPS标签页,勾选“CaptureHTTPSCONNECTs”,勾选“DecryptHTTPStraffic”,勾选“Ignoreservercertificateerrors(unsafe)”;选择Connections标签,勾选“Allowremotecompu

    2022年6月28日
    52
  • 提高机器学习模型准确率的八大方法

    提高机器学习模型准确率的八大方法

    2021年11月21日
    42

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号