You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Christopher Todd <ch...@christophertodd.com> on 2002/10/05 19:20:36 UTC

REPOST: RE: Realm implementation question

Posting this again, as I did not receive a reponse the first time.

> -----Original Message-----
> From: Christopher Todd [mailto:chris@christophertodd.com]
> Sent: Sunday, September 29, 2002 1:07 AM
> To: tomcat-dev@jakarta.apache.org
> Subject: Realm implementation question
>
>
> Please forgive me if this is an obvious newbie question, but I am
> not a Java
> guru, nor have I studied all the intricacies of Tomcat.
>
> I am trying to implement a new Realm, which will obviously require some
> configuration parameters in server.xml, and I want to make sure I
> understand
> how to access those config parameters from within my implementation.
>
> I can see that o.a.c.Catalina.java creates an
> o.a.commons.digester.Digester
> that parses the server.xml file.  Is it the case that the Digester will
> instantiate a Realm object of the type specfied in the className attribute
> of the <Realm> tag in the server.xml file, and initialize that object's
> members using the <Realm> tag's attributes of the same name?  So
> all I need
> to do is write my Realm implementation with accessors and
> mutators for each
> <Realm> tag attribute?
>
> So a <Realm> config that looks like this:
>
> <Realm class="org.apache.catalina.realm.MyRealm" propOne="foo" />
>
> would require a Realm implementation like so:
>
> String propOne = null;
>
> public String getPropOne() {
>    return this.propOne;
> }
> public void setPropOne(String prop) {
>    this.propOne = prop;
> }
>
> Am I missing anything?
>
> Thanks in advance,
> Chris
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>