2016-10-08 33 views
0

這是我的tomcat-users.xml文件:tomcat8:無法輸入/經理/ HTML

<?xml version='1.0' encoding='utf-8'?> 
<tomcat-users xmlns="http://tomcat.apache.org/xml" 
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd" 
         version="1.0"> 

<role rolename="manager-gui"/> 
<user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status"/> 
</tomcat-users> 

當我輸入localhost:在瀏覽器中8080​​ /經理/ HTML,我得到一個輸入框,詢問我對於用戶名和密碼,我爲兩者輸入「admin」並單擊「登錄」,它只是忽略我的請求。

你知道可能是什麼問題嗎?

回答

1

至少,改變你的配置成爲:

<?xml version='1.0' encoding='utf-8'?> 
<tomcat-users xmlns="http://tomcat.apache.org/xml" 
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd" 
         version="1.0"> 
    <role rolename="manager-gui"/> 
    <role rolename="manager-script"/> 
    <role rolename="manager-jmx"/> 
    <role rolename="manager-status"/> 
    <user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status"/> 
</tomcat-users>