Konfigurieren tomcat-users.xml zu sichern, eine Seite im tomcat?
Versuche ich sichere meine admin-Seiten in tomcat mit web.xml
und tomcat-users.xml
aber es funktioniert nicht. Das login-Formular wird angezeigt, aber Verbindung ist unmöglich
Hier ist die web.xml
in meinem web - /WEB_INF Ordner :
<security-constraint>
<web-resource-collection>
<web-resource-name>Admin</web-resource-name>
<url-pattern>/admin/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Admin</realm-name>
</login-config>
Sowie tomcat-users.xml
im server/tomcat/conf/Ordner :
<tomcat-users>
<role rolename="manager"/>
<role rolename="tomcat"/>
<role rolename="admin"/>
<role rolename="role1"/>
<user username="manager" password="manager" roles="manager"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="admin" password="admin" roles="admin"/>
</tomcat-users>
Irgendeine Idee ?
InformationsquelleAutor thomas-hiron | 2013-04-04
Du musst angemeldet sein, um einen Kommentar abzugeben.
Wahrscheinlich zu spät die Antwort aber egal
Sie vermissen Rolle in in Sie web.xml und auch nicht erwähnen Reich
damit Sie web.xml sollte wie folgt Aussehen
InformationsquelleAutor Jitendra Vispute