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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to