NetBeans 7.1.2 tomcat / manager访问配置问题

时间:2012-07-17 19:52:35

标签: java tomcat netbeans

我正在尝试访问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)

1 个答案:

答案 0 :(得分: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给用户

相关问题