tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis Galiegue <fgalie...@gmail.com>
Subject Re: Question regarding of an implementation of a custom Valve
Date Fri, 21 Oct 2011 17:50:41 GMT
On Fri, Oct 21, 2011 at 19:26, Gregor S. <rc46fi@googlemail.com> wrote:
> Hi guys,
>
> for some reasons, I need to implement a Valve within Tomcat 6, and
> everything's running smoothely.
>
> I put the Valve into my Context-definition, fire up Tomcat & there we go.
>
> However, I just don't see how I can access any parameters inside the
> Valve-specification inside the Context-definition.
>
> Let's say I have the following Valve-definition inside my Context:
>
> <Valve className="com.cr.web.util.LoginValve"
>   path="somePath"/>
>
> How can I access the attribute "path" in the above definition?
>
> I looked up the source of AccesslogValve, but I didn't see any
> browsing of the <Valve..../>
>
> Is it that I just have to specify a getter / setter inside my
> Valve-source for the corresponding attribute inside the
> Valve-specification, and it will be picked up automatically?
>

Yes, exactly. In your case, .getPath() and .setPath(String).

-- 
Francis Galiegue, fgaliegue@gmail.com
"It seems obvious [...] that at least some 'business intelligence'
tools invest so much intelligence on the business side that they have
nothing left for generating SQL queries" (Stéphane Faroult, in "The
Art of SQL", ISBN 0-596-00894-5)

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


Mime
View raw message