On Fri, Oct 21, 2011 at 19:26, Gregor S. <rc4...@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, fgalie...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to