2017-07-03 54 views
0

tomcat-users.xml文件看起来像:部署错误,访问到tomcat无权错误

<?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

请尝试以下操作:

<?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>