Problem with Tomcat access at the time of deployment

1

I'm working on a Java EE project in NetBeans 8.0.1 using Tomcat 8.0.9 as a container. The problem occurs at the time of project execution, IDE asks for a username and password and I provide them, but it ignores them and asks again, I click cancel and it says:

Erro de Implantação: O acesso ao servidor Tomcat não foi autorizado. Defina corretamente o nome de usuário e a senha com a atribuição \"manager-script\" no personalizador do Tomcat no gerenciador do servidor.

The problem is that I put the user / password exactly as it is in the server manager and it just does not work, I also tried to put the data that is assigned to the manager-script in the tomcat- users.xml and also did not work, another thing I tried was to modify the password on the server manager itself in NetBeans and it did not, it remained the same.

How can I solve or at least work around this problem?

I do not know if this can influence something, but I installed Tomcat at the time of installing NetBeans (it came with IDE).

    
asked by anonymous 31.10.2014 / 16:39

3 answers

1

Edit the tomcat-users.xml and add the role "manager-script"

<user username="ide" password="xxx" roles="manager-script,admin"/>
    
31.10.2014 / 17:24
0

I've had exactly this same problem. I have decided to make changes in tomcat-users.xml Mine looks like this:

<tomcat-users xmlns="http://tomcat.apache.org/xml"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
              version="1.0">
<role rolename="manager-script"/>
<role rolename="admin"/>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="admin-gui"/>
<user username="tomcat" password="tomcat" roles="manager-script,admin,tomcat,role1, admin-gui"/>
</tomcat-users>

In netbeans, I went to the "Tools" tab under "Servers". I clicked on tomcat and entered "tomcat" and "tomcat" in username and password.

    
06.03.2015 / 00:21
0

I searched for hours for a solution, was not able to access either the Web Manager, Server Status and Host Manager, until I got here, I used the MCGBra , I gained access to Host Manager and Server Status, but the Web Manager was still giving the access error 403 denied. It was then that I added a line to the file and it worked.

Added line: <role rolename="manager-gui"/> and in roles also roles="manager-script,manager-gui,admin,tomcat,role1, admin-gui"/>

Getting my complete file like this:

<tomcat-users xmlns="http://tomcat.apache.org/xml"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"              version="1.0">
<role rolename="manager-script"/>
<role rolename="manager-gui"/>
<role rolename="admin"/>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="admin-gui"/>
<user username="tomcat" password="tomcat" roles="manager-script,manager-gui,admin,tomcat,role1,admin-gui"/>
</tomcat-users>

Thank you very much for sharing this tip MCGBra , now working perfectly. Vlw even !!!

    
07.01.2017 / 04:39