tomcat部署war包不成功解决方法
今天尝试在阿里云服务器中的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 DeniedYou 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 即可打开管理界面
tomcat部署war包不成功解决方法相关推荐
- IDEA打包war包及Tomcat部署war包
1.准备工作 IntelliJ IDEA 开发工具 --我的版本是IDEA 2021.2.1 可以正常运行的Java项目 Tomcat 9.0.56 2.打包war包流程 按下图操作打开 Projec ...
- Tomcat部署war包项目请求404
问题描述 Linux上用Tomcat部署war包项目请求404.前端项目配置的后台地址本身是只有ip加端口的,但是会404,我就在端口后面加上项目文件夹的名称,例如在webapps下是test,前台请 ...
- Linux tomcat部署War包,Linux在Tomcat部署JavaWeb项目,Linux部署War包
Linux tomcat部署War包,Linux在Tomcat部署JavaWeb项目,Linux部署War包 >>>>>>>>>>>& ...
- Tomcat 部署 war 包
上传 war 包到 tomcat 上传位置:D:apache-tomcat-9.0.62webapps 目录下 运行 tomcat 双击运行 D:apache-tomcat-9.0.62instart ...
- Tomcat部署war包失败
1.问题 在Tomcat管理页上传WAR包时,上传失败并跳转到如下页面: 此时打开Tomcat安装目录下的logs/manager.2021-09-25.log文件,信息如下: 从日志中得知,是因为我 ...
- Linux服务器tomcat部署war包
一.web项目处理 1.本地pom.xml文件改造 去除springboot自带的tomcat(有两种方式),并且依赖servlet-api; 方法一: <dependency><g ...
- linux tomcat 清空war,Linux下tomcat部署war包
一.Linux服务器上安装tomcat 二.Linux服务器安装nginx 三.nginx配置域名 server { listen 80; server_name www.xxx.com; # 域名 ...
- tomcat部署war包访问显示404
以下是我部署的步骤: 步骤一:打包war(我用的是STS,可以直接点击项目右键Export->War file) 步骤二:将项目war包,放到tomcat下的webapps文件夹里 步骤三:打开 ...
- linux部署tomcat,linux tomcat部署war包
前提:有Java环境 linux-java环境配置参考 tomcat9下载地址 tomcat官网 1.创建目录 mkdir /usr/local/soft 2.tomcat丢进目录 mv tomcat ...
最新文章
- Matlab编程与数据类型 -- 函数M文件的组成
- 大数据安全标准现状和思考
- go标准命令详解0.2 go install
- 【转摘】Word提升效率的快捷键
- asp.net学习资源列表
- React Native实现NbaApp
- 学java教程之面向对象(四)
- vue-cli3以上框架解决跨域问题
- Agglomerative Hierarchical Algorithms(凝聚式层次聚类)
- 【转】RIS/PACS系统实施过程中Worklist的配置与调试
- nodeJS中express+busboy实现文件上传
- 如何下载Figma(肥姑妈)
- 瓦.20190505_停
- 零基础制作平衡小车【连载】12---平衡小车控制原理
- 深度学习之DeepCTR
- 视频剪辑后期处理软件生态
- 神经网络常见评价指标超详细介绍(ROC曲线、AUC指标、AUROC)
- 中国惠普前总裁孙振耀的毕生经验之谈
- 聊天宝团队解散:罗永浩已经退出
- dSPACE学习笔记1