You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sandy McArthur <Sa...@McArthur.org> on 2004/09/03 06:03:49 UTC
How to control the order Valves are invoked?
I have a custom Valve I specify in a Context element of the server.xml
which I'd like to be invoked after the AuthenticatorBase in the chain
of Valves so that I can use:
((HttpServletRequest) request.getRequest()).getRemoteUser()
and possibly get a meaningful value.
Is there any hope of controlling the Valve order or must I find another
way to do what I want?
--
Sandy McArthur
"He who dares not offend cannot be honest." - Thomas Paine
Re: How to control the order Valves are invoked?
Posted by Bill Barker <wb...@wilshire.com>.
By default, the Authenticator is added after any custom Valves. However, if
you add the Authenticator yourself, you can control the order:
<Context path="..." docBase="...">
<Valve className="org.apache.catalina.authenticator.FormAuthenticator"
/>
<Valve className="org.mcarthur.my.package.MyValve" />
...
</Context>
"Sandy McArthur" <Sa...@McArthur.org> wrote in message
news:429E9960-FD5E-11D8-AA40-000A95A09BC6@McArthur.org...
> I have a custom Valve I specify in a Context element of the server.xml
> which I'd like to be invoked after the AuthenticatorBase in the chain
> of Valves so that I can use:
>
> ((HttpServletRequest) request.getRequest()).getRemoteUser()
>
> and possibly get a meaningful value.
>
> Is there any hope of controlling the Valve order or must I find another
> way to do what I want?
>
> --
> Sandy McArthur
>
> "He who dares not offend cannot be honest." - Thomas Paine
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org