天天看點

netbeans下調試j2me,出現提示要tomcat的manager權限的使用者名和密碼問題解決位置

netbeans下調試j2me,出現提示要tomcat的manager權限的使用者名和密碼問題解決位置

解決方法:修改tomcat-users.xml中設定

1.netbeans綁定的tomcat的改使用者名和密碼位置:有兩處有tomcat-users.xml,不修改netbeans安裝目錄裡面的tomcat中的,,而是修改在C:/Documents and Settings/Administrator/.netbeans/5.5/jakarta-tomcat-5.5.9_base/conf/tomcat-users.xml裡面設定,,内容如下:

<?xml version='1.0' encoding='utf-8'?>

<tomcat-users>

  <role rolename="manager"/>

  <role rolename="tomcat"/>

  <role rolename="admin"/>

  <role rolename="role1"/>

  <user username="both" password="tomcat" roles="tomcat,role1"/>   

  <user username="tomcat" password="tomcat" roles="tomcat"/>

  <user username="ide" password="fET1amE7" roles="manager,admin"/> //此處為修改處

  <user username="role1" password="tomcat" roles="role1"/>

</tomcat-users>

2.若是自己加入的tomcat,就需要将自己單獨安裝的tomcat根目錄下conf/tomcat-users.xml修改,一般打開為

<tomcat-users>

  <role rolename="tomcat"/> 

  <role rolename="role1"/>

  <user username="both" password="tomcat" roles="tomcat,role1"/>

  <user username="tomcat" password="tomcat" roles="tomcat"/>

  <user username="role1" password="tomcat" roles="role1"/> 

</tomcat-users>

并沒有manager角色,上面有英文提示可自己加入該角色,可用修改如下:

<tomcat-users>

  <role rolename="manager"/>

  <role rolename="tomcat"/>

  <role rolename="admin"/>

  <role rolename="role1"/>

  <user username="both" password="tomcat" roles="tomcat,role1"/>

  <user username="tomcat" password="tomcat" roles="tomcat"/>

  <user username="role1" password="tomcat" roles="role1"/>

  <user username="12345" password="12345" roles="manager,admin"/>

</tomcat-users>