You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by sihem <si...@yahoo.fr> on 2001/11/02 12:28:10 UTC
security
Hi!
I am trying to protect the access to my servlets from
a browser. I used the code below in web.xml. Te user
is correctly authenticated (for exemple, when he wants
to access www.mydomain.com/servlet/HelloServlet).
But afterwards, Tomcat does not find the corresponding
servlet ("page cannot be found") , which is curious
because it finds it when there is no authentication.
In tomcat.log, there is this error message :
"Context log: path="" Error/loop in default error
handler R( + /servlet + /AdminServlet) 401 null null
"
Please, Can someone tell what is missing in my
configuration ?
Thanks you by advance for your help!
Sihem
<?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>secretprotect</web-resource-name>
<url-pattern>/servlet/*</url-pattern>
<http-method>GET</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>webmaster</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>
BASIC
</auth-method>
<realm-name>
test
</realm-name>
</login-config>
</web-app>
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Courrier : http://courrier.yahoo.fr
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: security
Posted by sihem <si...@yahoo.fr>.
ok!
Thanks!
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Courrier : http://courrier.yahoo.fr
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: security
Posted by "Craig R. McClanahan" <cr...@apache.org>.
Please ask this kind of question on the TOMCAT-USER list. See
<http://jakarta.apache.org/site/mail.html> for subscription information,
and a description of what questions are appropriate on what lists.
Craig McClanahan
On Fri, 2 Nov 2001, sihem wrote:
> Date: Fri, 2 Nov 2001 12:28:10 +0100 (CET)
> From: sihem <si...@yahoo.fr>
> Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> To: tomcat-dev@jakarta.apache.org
> Subject: security
>
> Hi!
>
> I am trying to protect the access to my servlets from
> a browser. I used the code below in web.xml. Te user
> is correctly authenticated (for exemple, when he wants
> to access www.mydomain.com/servlet/HelloServlet).
> But afterwards, Tomcat does not find the corresponding
> servlet ("page cannot be found") , which is curious
> because it finds it when there is no authentication.
> In tomcat.log, there is this error message :
> "Context log: path="" Error/loop in default error
> handler R( + /servlet + /AdminServlet) 401 null null
> "
>
> Please, Can someone tell what is missing in my
> configuration ?
>
> Thanks you by advance for your help!
> Sihem
>
> <?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>secretprotect</web-resource-name>
> <url-pattern>/servlet/*</url-pattern>
> <http-method>GET</http-method>
> </web-resource-collection>
>
> <auth-constraint>
> <role-name>webmaster</role-name>
> </auth-constraint>
> </security-constraint>
>
> <login-config>
> <auth-method>
> BASIC
> </auth-method>
> <realm-name>
> test
> </realm-name>
> </login-config>
> </web-app>
>
>
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> Yahoo! Courrier : http://courrier.yahoo.fr
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>