博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
请在服务器管理器的 Tomcat 定制器中设置 manager-script 角色的正确用户名和口令。...
阅读量:6880 次
发布时间:2019-06-27

本文共 1172 字,大约阅读时间需要 3 分钟。

在netbeans中,如果运行的时候,出现如下错误

compile-jsps:

D:\我的资料库\Documents\NetBeansProjects\WebApplication1\nbproject\build-impl.xml:1022: 部署错误: 尚未授予访问 Tomcat 服务器的权限。请在服务器管理器的 Tomcat 定制器中设置 "manager-script" 角色的正确用户名和口令。

有关详细信息, 请查看服务器日志。

构建失败 (总时间: 0 秒)

1、打开“工具”-“服务器”,在左边的服务器列表中选中Tomcat,看右边的Catalina 基目录,打开这个目录

找到文件

C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\tomcat-users.xml

重新配置如下

<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"/>

  <user username="tomcat" password="tomcat" roles="tomcat"/>

  <user username="both" password="tomcat" roles="tomcat,role1"/>

  <user username="role1" password="tomcat" roles="role1"/>

-->

<role rolename="manager-script"/>

<user username="admin" password="112233" roles="manager-script"/>

</tomcat-users>

重启服务器就好了。

转载地址:http://mqubl.baihongyu.com/

你可能感兴趣的文章
「原码 反码 补码 移码」一探究竟(中)
查看>>
CSS 你到底有多少长度单位?
查看>>
Linux Shell脚本系列之二
查看>>
设计模式--代理模式(Proxy Pattern)
查看>>
稀疏数组
查看>>
HTML5 标签 canvas
查看>>
react-router@4.0 使用方法和源码分析
查看>>
Flutter简介
查看>>
组织级敏捷转型的四个阶段
查看>>
「数据游戏」:使用 LSTM 模型预测三天后单股收盘价
查看>>
vuex持久化插件-解决浏览器刷新数据消失问题
查看>>
Vue-cli3 项目在安卓低版本系统和 IE 上白屏问题解决
查看>>
并发-7-同步容器和ConcurrentHashMap
查看>>
React安装:
查看>>
从0开始搭建微信小程序(前后端)的全过程
查看>>
小程序如何生成海报分享朋友圈
查看>>
检测后台错误
查看>>
微信小程序自定义组件
查看>>
Android Studio 和 Gradle 优化配置总结
查看>>
java8 stream实现列表去重,java8的stream 和lambda的使用实例
查看>>