Thanks really much.
Francesco

-----Original Message-----
From: Ognjen Blagojevic [mailto:ognjen.d.blagoje...@gmail.com] 
Sent: martedì 13 agosto 2013 9.30
To: Tomcat Users List
Subject: Re: FW: configuring realm UserDatabase do not works

Francesco,

On 13.8.2013 1:01, Francesco Viscomi wrote:
> When I try to access the protect resource I get:
(...)
> HTTP Status 403 - Access to the requested resource has been denied

Error 403 means that user is authenticatied but not authorized (e.g. 
username and password are correct, but something is wrong with 
configuration of roles).


> 1)  Adding the following statement to the the tomcat-user.xml:
> <role rolename="UserRole"/>
> <user username="user" password="uuu" role="UserRole"/>

Here is your problem. Name of the attribute for <user> tag is "roles", 
not "role". You should change that to:

   <role rolename="UserRole"/>
   <user username="user" password="uuu" roles="UserRole"/>


BTW, this is tricky to notice, since Tomcat will not validate file 
tomcat-users.xml against a schema.

-Ognjen


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to