How do I set Tomcat Manager Application User Name and Password for NetBeans?

后端 未结 11 1890
旧时难觅i
旧时难觅i 2020-12-04 09:46

I\'m trying to follow a tutorial to make an extremely basic Java web application in NetBeans.

When I try to run it, a dialogue box appears title \"Authentication Req

相关标签:
11条回答
  • 2020-12-04 10:26

    Go to apache-tomcat\conf folder add these lines in

    tomcat-users.xml file

    <role rolename="manager-gui"/>
    <user username="admin" password="admin" roles="manager-gui"/>
    

    and restart server

    0 讨论(0)
  • 2020-12-04 10:28

    Netbeans Problem: For apache Tomcat server Authentication required dialog box requesting user name and password

    This dialog box appear If a user role and his credentials are not set or is incorrect for Tomcat startup via NetBeans IDE,

    OR when user/pass set in IDE is not matches with user/pass in "canf/tomcat-user.xml" file

    1..Need to check user name and password set in IDE tools-->server

    2..Check \CATALINA_BASE\conf\tomcat-users.xml. whether user and his role is defined or not. If not add these lines

    <user username="ide" password="EiWnNlBG" roles="manager-script,admin"/>
    </tomcat-users>
    

    3.. set the same user/pass in IDE tools->server

    1. restart your server to get effect of changes

    Source: http://ohmjavaclasses.blogspot.com/2011/12/netbeans-problem-for-apache-tomcat.html

    0 讨论(0)
  • 2020-12-04 10:31

    File \conf\tomcat-users.xml, before this line

    </tomcat-users>
    

    add these lines

    <role rolename="manager-gui"/>
    <role rolename="manager-script"/>
    <role rolename="manager-jmx"/>
    <role rolename="manager-status"/>   
    <user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status"/>
    
    0 讨论(0)
  • 2020-12-04 10:32

    When you're launching tomcat server from netbeans IDE you need to check in menu "tools->servers" on connection tab for tomcat server - there is catalina base directory. And you need to include something like:

     <role rolename="manager"/>
      <user username="admin" password="admin" roles="manager"/>
    

    at file

    \CATALINA_BASE\conf\tomcat-users.xml
    

    or use username automatically generated by IDE with description already placed in this file or on connection tab

    For Manager Apps : GUI access:

    <role rolename="manager-gui"/>
    <user username="tomcat" password="s3cret" roles="manager-gui"/>
    
    0 讨论(0)
  • 2020-12-04 10:33

    Follow my steps and be happy:

    1.- When you are configuring Netbeans for the first time, they will ask you for a "user" and "pass" for the Catalina-Server.

    2.- Type whatever "user" and "pass" . This will modify your "tomcat-users.xml" and will add:

    user password="MYPASS" roles="manager-script,admin,tomcat" username="MYUSER"

    3.- To use this "user" just restart your TOMCAT WEB SERVER and NETBEANS.

    0 讨论(0)
提交回复
热议问题