 
			
				22/11/2005, 10:29
			
			
			     |  
      |    |    |    Fecha de Ingreso: mayo-2005  
						Mensajes: 294
					  Antigüedad: 20 años, 6 meses Puntos: 0     |        |  
  |      Tomcat        Hola necesito alguien que haya usado alguna vez la autenticacion de usuarios usando los FILE-BASED REALMS de tomcat. Mi problema es que he seguido todos los pasos de configuracion y cuando meto el usuario y la contraséña no lo reconoce, no me deja acceder a los recursos protegidos. Lo que he hecho es:    PRIMERO HE CONFIGURADO EL SERVER.XML DE MI TOMCAT QUE ES LA VERSIÓN 5.0.30 HE PUESTO:   
<Realm className="org.apache.catalina.realm.MemoryRealm"/>    LO SIGUIENTE HE CONFIGURADO EL WEB.XML DE MI APLICAICION ASÍ:   
<!--Describe a DataSource--> 
<resource-ref> 
<res-ref-name>jdbc/Servauto</res-ref-name> 
<res-type>javax.sql.DataSource</res-type> 
<res-auth>Container</res-auth> 
</resource-ref>     
<!--ESTO LO HAGO PARA LA AUTENTIFICACION Y AUTORIZACION DE UN USUARIO -->   
<!--Define a Security Constraint on this application--> 
<security-constraint> 
<web-resource-collection> 
<web-resource-name>SERVAUTO PROFESOR</web-resource-name> 
<url-pattern>/jst/PROFESOR/*</url-pattern> 
</web-resource-collection> 
<auth-constraint> 
<role-name>administrador</role-name> 
</auth-constraint> 
</security-constraint>   
<!--Define the Login configuration for this Application--> 
<login-config> 
<auth-method>BASIC</auth-method> 
<realm-name>SERVAUTO PROFESOR</realm-name> 
</login-config>   
<!--Security roles referenced by this Web application--> 
<security-role> 
<description>Es el rol requerido para acceder a la parte del profesor de la aplicación</description> 
<role-name>administrador</role-name> 
</security-role>    LO QUE TENGO  EN EL TOMCAT-USERS.XML DEL TOMCAT    
<tomcat-users> 
<role rolename="administrador"/> 
<user username="profesor" password="profesor" roles="administrador"/> 
</tomcat-users>     
A VER SI ALGUIEN PUEDE AYUDARME GRACIAS!           |