Starting of Tomcat failed from Netbeans

前端 未结 6 1766
星月不相逢
星月不相逢 2020-11-28 21:39

I have problem with starting Apache Tomcat 6 from Netbeans IDE 7.4 (on 7.3 version I had the same troubles. Other people mentioned that this problem exist also in other vers

6条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 22:20

    For NetBeans to be able to interact with tomcat, it needs the user as setup in netbeans to be properly configured in the tomcat-users.xml file. NetBeans can do so automatically.

    That is, within the tomcat-users.xml, which you can find in ${CATALINA_HOME}/conf, or ${CATALINA_BASE}/conf,

    1. make sure that the user (as chosen in netbeans) is added the script-manager role

    Example, change

    
    

    To

    
    
    1. make sure that the manager-script role is declared

    Add

    
    

    Actually the netbeans online-help incorrectly states:

    Username - Specifies the user name that the IDE uses to log into the server's manager application. The user must be associated with the manager role. The first time the IDE started the Tomcat Web Server, such as through the Start/Stop menu action or by executing a web component from the IDE, the IDE adds an admin user with a randomly-generated password to the tomcat-base-path/conf/tomcat-users.xml file. (Right-click the Tomcat Web server instance node in the Services window and select Properties. In the Properties dialog box, the Base Directory property points to the base-dir directory.) The admin user entry in the tomcat-users.xml file looks similar to the following:

    The role should be manager-script, and not manager.

    For a more complete tomcat-users.xml file:

    
    
      
      
      
      
    
    

    There is another nice posting on why am I getting the deployment error?

提交回复
热议问题