tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francesco Viscomi" <>
Subject FW: configuring realm UserDatabase do not works
Date Mon, 12 Aug 2013 23:01:22 GMT
Some one can help me please!

Thanks anyway





From: Francesco Viscomi [] 
Sent: martedì 13 agosto 2013 0.54
To: ''
Subject: configuring realm UserDatabase do not works


Hi all,

I’ve spent a lot of time to configure tomcat on using realm UserDatabase
(that is tomcat-users.xml) without success.

When I try to access the protect resource I get:


HTTP Status 403 - Access to the requested resource has been denied

type Status report

message Access to the requested resource has been denied

description Access to the specified resource (Access to the requested
resource has been denied) has been forbidden.


Apache Tomcat/7.0.27



I’m using netbeans 7.3 with this characteristic:


Product Version: NetBeans IDE 7.3 (Build 201306052037) 

Java: 1.6.0_25; Java HotSpot(TM) Client VM 20.0-b11 

Runtime: Java(TM) SE Runtime Environment 1.6.0_25-b06 

System: Windows XP version 5.1 running on x86; Cp1252; it_IT (nb) 

User directory: C:\Documents and Settings\francesco\Dati

Cache directory: C:\Documents and Settings\francesco\Impostazioni
locali\Dati applicazioni\NetBeans\Cache\7.3 



I also tried on both tomcat and tomcat


These are the step I did:

1)  Adding the following statement to the the tomcat-user.xml:


<role rolename="UserRole"/>

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



2) take sure that on the server.xml the following statement are present:




<Resource name="UserDatabase" auth="Container"


  description="User database that can be updated and saved"


  pathname="conf/tomcat-users.xml" />





<Realm className="org.apache.catalina.realm.LockOutRealm">

<Realm className="org.apache.catalina.realm.UserDatabaseRealm"





3)Configuring web.xml (inside the WEB-INF directory) as following:



<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.5" xmlns=""












<web-resource-name>area protetta</web-resource-name>

















<description>Utenti che hanno questo ruolo (user) possono accedere all'area







4) creating the file index.jsp,login.jsp and error.jsp.


5)creating the path and file at “web



Is this a bug on tomcat or I’m making some mistake?


Thanks really much
















































  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message