2012-07-17 77 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