我的tomcat-users.xml
文件如下:
<?xml version='1.0' encoding='cp1252'?>
<tomcat-users>
<role rolename="manager-gui"/>
<user username="tomcat" password="tomcat" roles="manager-gui"/>
</tomcat-users>
当我尝试构建项目时,我收到错误:
Deployment error: Access to Tomcat server has not been authorized. Set the correct username and password with the "manager-script" role in the Tomcat customizer in the Server Manager.
See the server log for details.
BUILD FAILED (total time: 1 second)
在netbeans的服务器窗口中,我提供了相同的用户名和密码。我已经安装了Tomcat 7.0。我不知道这个问题是什么。有什么帮助吗?
答案 0 :(得分:0)
尝试以下方法:
<?xml version='1.0' encoding='cp1252'?>
<tomcat-users>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="tomcat" password="tomcat" roles="manager-gui,manager-script"/>
</tomcat-users>