S
Stefan Ram
I have recently installed »Apache Tomcat Version 6.0.18«,
and I have no experience with Tomcat yet.
The server runs, and I also can run the example servlets.
I have added a user to »tomcat-users.xml« as follows:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<user username="TomcatAdmin" password="tcpass" roles="admin,manager"/>
</tomcat-users>
When I try to log in via a web client to access parts of the
site that require a certain role, the password is accepted.
Then, I get a »401« status code, complaining that this user
has insufficient rights to access this page.
Maybe now you think that you know how to solve this problem
and might be inclined to tell me to add two role elements.
But this is were my problem starts. Whenever I add two role
elements as follows, the password will not be accepted anymore:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="TomcatAdmin" password="tcpass" roles="admin,manager"/>
</tomcat-users>
I removed the two lines, and I can log in again, but lack
the rights, I add the two lines, and I cannot log in anymore
with the given password. I repeated this test several times
and never changed anything else except adding or removing the
two role elements.
and I have no experience with Tomcat yet.
The server runs, and I also can run the example servlets.
I have added a user to »tomcat-users.xml« as follows:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<user username="TomcatAdmin" password="tcpass" roles="admin,manager"/>
</tomcat-users>
When I try to log in via a web client to access parts of the
site that require a certain role, the password is accepted.
Then, I get a »401« status code, complaining that this user
has insufficient rights to access this page.
Maybe now you think that you know how to solve this problem
and might be inclined to tell me to add two role elements.
But this is were my problem starts. Whenever I add two role
elements as follows, the password will not be accepted anymore:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="TomcatAdmin" password="tcpass" roles="admin,manager"/>
</tomcat-users>
I removed the two lines, and I can log in again, but lack
the rights, I add the two lines, and I cannot log in anymore
with the given password. I repeated this test several times
and never changed anything else except adding or removing the
two role elements.