> Dear Tomcat Users > > I tried to define a protected area, so I can only access my web > application with a username and password. The Tomcat example > /jsp/protected/security is working wothout problems, but not with my > application. I added the following lines to the web.xml file, but it's not > working. Can anybody give me some help? > > Many thanks in Advance > David > > File: web.xml > ... > <security-constraint> > <web-resource-collection> > <web-resource-name>Protected Area</web-resource-name> > <!-- Define the context-relative URL(s) to be protected --> > <!--<url-pattern>/*</url-pattern>--> > <!-- If you list http methods, only those methods are protected --> > <http-method>DELETE</http-method> > <http-method>GET</http-method> > <http-method>POST</http-method> > <http-method>PUT</http-method> > </web-resource-collection> > <auth-constraint> > <!-- Anyone with one of the listed roles may access this area --> > <role-name>tomcat</role-name> > <role-name>role1</role-name> > </auth-constraint> > </security-constraint> > > > <!-- Default login configuration uses BASIC authentication --> > <login-config> > <auth-method>BASIC</auth-method> > <realm-name>Restricted Stuff</realm-name> > </login-config> > >
-- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>