tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <...@teamware.com>
Subject Re: Help with multiple security domains
Date Fri, 16 Nov 2001 07:17:28 GMT
"Trever M. Shick" wrote:
> 
> Thanks.. Do you know if this works with previous versions of tomcat 
> (3.2.3)?
> It's not a requirement, I just don't feel like upgrading now.

It can be done with 3.2.x but you have to modify/extend the JDBC realm
to read parameters from the context.  In the realm authenticate() method
just do something like

    ctx.getInitParameter(namedParameter);

and in your web.xml for the webapp add

    <context-param>
        <param-name>namedParameter</param-name>
        <param-value>YourValue</param-value>
    </context-param>

You can then extend the logic to do what you want for your specific
context.

Rgds
Antony

> 
> Trever
> 
> ----- Original Message -----
> From: "Craig R. McClanahan" <craigmcc@apache.org>
> To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> Sent: Thursday, November 15, 2001 12:06 PM
> Subject: Re: Help with multiple security domains
> 
> >
> >
> > On Thu, 15 Nov 2001, Trever M. Shick wrote:
> >
> > > Date: Thu, 15 Nov 2001 09:52:39 -0700
> > > From: Trever M. Shick <tshick@objectwave.com>
> > > Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> > > To: tomcat-user@jakarta.apache.org
> > > Subject: Help with multiple security domains
> > >
> > > I'd like to have two different JDBC realms within my server.xml and then
> I'd
> > > like to reference those within my web.xml file.
> > >
> > > I already have one JDBC realm working, I would like to add a second one.
> > > Is there some sort of "name" or "key" that can be set for a JDBC realm
> and
> > > then referenced by the security constraints within the web.xml?
> > >
> >
> > For Tomcat 4, you can use a different realm per webapp by nesting the
> > <Realm> element inside a <Context> element for that webapp in server.xml.
> > That way, you don't need any special key or anything like that.
> >
> > > Thanks for any help.
> > >
> >
> > Craig

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message