tomcat部署war包不成功解决方法
生活随笔
收集整理的這篇文章主要介紹了
tomcat部署war包不成功解决方法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
今天嘗試在阿里云服務器中的tomcat部署項目
點擊manager App 時頁面顯示這樣,根據上圖提示可知原因是cont/tomcat-users.xml 未配置用戶名和密碼, 所以需要將下面這段配置用戶名和密碼的代碼添加到tomcat-users.xml中
保存后重啟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文件,將文件中對訪問的來源受限設置注釋:
修改后再重新點擊Manage App 即可打開管理界面
總結
以上是生活随笔為你收集整理的tomcat部署war包不成功解决方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 超牛!用WIFI控制的摇控汽车
- 下一篇: Monaca(混合应用程序开发工具)