You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by damar thapa <da...@netvigator.com> on 2003/05/19 17:43:22 UTC

web.xml for user access restriction help!

Hi,

After searchinglist, I have the following content on web.xml to
authencate users for access:

>?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>
> <login-config>
>        <auth-method>BASIC</auth-method>
>        <realm-name>timasta</realm-name>
></login-config>
>
><security-constraint>
>  <web-resource-collection>
>    	<web-resource-name>
>  
>
>		Main
>	</web-resource-name>
>    	<url-pattern>
>		/main
>	</url-pattern>
>  </web-resource-collection>
></security-constraint>
>
><servlet>
>  	<servlet-name>
>		Main
>	</servlet-name>
>  
>
>  	<servlet-class>
>		Main
>	</servlet-class>
></servlet>
>
><servlet-mapping>
>	<servlet-name>
>		Main
>	</servlet-name>
>  	<url-pattern>
>		/main
>	</url-pattern>
>  
>
></servlet-mapping>
>  
>
></web-app>
>

When I run under tomcat4, I cannot access it at all. Can some body point
me what I have done wrong here?

Thanks,

damar



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