2012-07-17 81 views
1

我试图访问由NetBeans 7.1.2安装的Tomcat实例的/manager页面。NetBeans 7.1.2 tomcat/manager访问配置问题

我用鼠标右键单击属性对应的树节点,我得到这个:

enter image description here

这似乎暗示我可以用这些凭据,但他们没有工作。

当我看看tomcat-users.xml,该用户似乎并不存在:

<tomcat-users> 
<!-- 
    NOTE: By default, no user is included in the "manager-gui" role required 
    to operate the "/manager/html" web application. If you wish to use this app, 
    you must define such a user - the username and password are arbitrary. 
--> 
<!-- 
    NOTE: The sample user and role entries below are wrapped in a comment 
    and thus are ignored when reading this file. Do not forget to remove 
    <!.. ..> that surrounds them. 
--> 
<!-- 
    <role rolename="tomcat"/> 
    <role rolename="role1"/> 
    <user username="tomcat" password="tomcat" roles="tomcat"/> 
    <user username="both" password="tomcat" roles="tomcat,role1"/> 
    <user username="role1" password="tomcat" roles="role1"/> 
--> 
</tomcat-users> 

我应该怎么创建?如果是,我已经尝试过,但找不到合适的角色。什么是适当的线添加? (是的,我已重新启动Tomcat)的

回答

2

在属性对话框中,你可以看到两个变量:

  • CATALINA_HOME,在那里你选择安装Tomcat的目录。即G。 c:\Program Files\Apache Software Foundation\Tomcat 6.0。 Tomcat使用这个变量来查找它的内部类和库。

  • CATALINA_BASE配置文件和目录的目录,例如Web应用程序目录。如果未设置CATALINA_BASE,则默认值为CATALINA_HOME。即G。 C:\Users\JVerstry\.netBeans\7.1.2\apache-tomcat-7.0.22.0_base

如果你想使用的经理,你需要部署(复制)在位于C:\Users\JVerstry\.netBeans\7.1.2\apache-tomcat-7.0.22.0_base正确的文件夹管理器应用程序,如果该应用程序不存在(见目录conf/Catalina/localhost)和添加的角色manager-gui给用户

+0

所有似乎设置正确。我终于手动安装Tomcat并将其添加到NetBeans中。 – JVerstry 2012-07-18 06:19:34