tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Böhringer Jochen <>
Subject AW: Executing Valve before Basic Authentication takes place
Date Tue, 04 Jul 2006 08:46:10 GMT

Hi Mark,

thanks for your hint. I configured the the BasicAuthentication valve an my own one in the
following order in the server.xml document:

         <Host name="localhost"
            autoDeploy="false" deployOnStartup="false" deployXML="false">
            <Valve className="de.tccproducts.valves.PenFrameworkAuthenticationValve" />
         	<Valve className="org.apache.catalina.authenticator.BasicAuthenticator" />

But unfortunately I get this exception starting the app server:

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.apache.tomcat.util.IntrospectionUtils.callMethod1(
	at org.apache.tomcat.util.digester.SetNextRule.end(
	at org.apache.tomcat.util.digester.Rule.end(
	at org.apache.tomcat.util.digester.Digester.endElement(
Caused by: java.lang.IllegalArgumentException: Configuration error:  Must be attached to a
	at org.apache.catalina.authenticator.AuthenticatorBase.setContainer(
	at org.apache.catalina.core.StandardPipeline.addValve(
	at org.apache.catalina.core.ContainerBase.addValve(

Any help would be greatly appreciated.


-----Ursprüngliche Nachricht-----
Von: Mark Thomas [] 
Gesendet: Dienstag, 4. Juli 2006 03:06
An: Tomcat Users List
Betreff: Re: Executing Valve before Basic Authentication takes place

Böhringer Jochen wrote:
> But the problem is, that this valve is called after the basic authentication took place
(exactly as it happens if I try to use a servlet filter).

If you explicitly define the Authenticator Valve as well as your own,
and specify your own first, you should get the behaviour you are
looking for. Note I haven't tested this. Take a look at the source the
for  authenticatorConfig() method in
o.a.catalina.startup.ContextConfig for details of how the
authentication valve is configured.



To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message