Section 9.1 Configuring Realms
To configure a Realm, add an XML element to your conf/server.xml configuration file.
Example:
<Realm className="... class name for this implementation"
... other attributes for this implementation.../>
The <Realm> element can be nested inside any of the following Container elements.
Location of the Realm element creates a direct impact on the scope of that Realm.
- Inside an
<Engine>element – This Realm is shared across all web applications on all virtual hosts. Once overridden by a Realm element nested inside a subordinate<Host>or<Context>element, this realm will not be shared.
- Inside a
<Host>element – This Realm is shared across all web applications for this virtual host. Once overridden by a Realm element nested inside a subordinate<Context>element, this realm will not be shared.
- Inside a
<Context>element – This Realm is used only for this web application.


