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:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:890)
at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:192)
at org.apache.tomcat.util.digester.Rule.end(Rule.java:228)
at
org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1057)
[...]
Caused by: java.lang.IllegalArgumentException: Configuration error: Must be
attached to a Context
at
org.apache.catalina.authenticator.AuthenticatorBase.setContainer(AuthenticatorBase.java:258)
at
org.apache.catalina.core.StandardPipeline.addValve(StandardPipeline.java:435)
at
org.apache.catalina.core.ContainerBase.addValve(ContainerBase.java:1184)
Any help would be greatly appreciated.
Regards
Jochen
-----Ursprüngliche Nachricht-----
Von: Mark Thomas [mailto:[EMAIL PROTECTED]
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.
HTH,
Mark
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]