tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Urtzi Larrazabal <ur...@esi.es>
Subject Restricting Access to Web Resources
Date Thu, 06 Jun 2002 09:00:57 GMT


Hi friends,

I am trying to protect my application with an authentification but I don't know why my security
constraint is ignored. When I access to the application I'm not prompted for a user and a
password. Does anyone know what am I doing wrong?


#cd webapps/Myaplicaion/WEB-INF
#more web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">


<web-app>

        <security-constraint>
                <web-resource-collection>
                        <web-resource-name>
                                Restricted Area
                        </web-resource-name>
                        <url-pattern>/Myaplication/*</url-pattern>
                </web-resource-collection>
                <auth-constraint>
                        <role-name>tomcat</role-name>
                </auth-constraint>
        </security-constraint>


        <login-config>
                <auth-method>BASIC</auth-method>
                <realm-name>My Secure Test Area</realm-name>
        </login-config>

</web-app>


regards,

Urtzi Larrazabal

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message