Charles Talleyrand wrote:

> Ok, so I too wish to extend a realm but I believe I don't understand enough about 
>packages
> and stuff but if I go to where SimpleRealm.java is sitting and javac it, I get a 
>whole lotta errors.
>  I'm sure it is something basic that I am doing wrong.  Anyone wanna point out the 
>folly of my
> ways?
>

First, I'm assuming you are using a *source* distribution of Tomcat 3.2.1, not the 
*binary*
distribution.  If not, you're going to need to go get that.  You're going to be 
building a complete new
Tomcat from scratch, so you'll need it.

Second, you will need several other packages (as documented in the README.txt file in 
the top level
directory) in order to compile Tomcat successfully.

Putting your source in the same directory where SimpleRealm is is a good start.  Next 
step is to make
sure you've got the right "package" header at the top (it should be "package
org.apache.tomcat.request").

However, you won't be able to just use "javac" to build it, because you will need to 
have the class path
set up right.  Instead, go back to the top level directory of the source distribution 
and type

    build         (if on Windows)

or

    ./build.sh   (if on Unix)

to build a complete new Tomcat, including your new class.  You can run the new build 
(for testing) by:

    cd ..\build\tomcat
    bin\tomcat start

or

    cd ../build/tomcat
    ./bin/tomcat.sh start

Craig




>
> ---- Begin Original Message ----
>  From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> Sent: Fri, 05 Jan 2001 14:58:16 -0800
> To: [EMAIL PROTECTED]
> Subject: Re: Security/Authentication ; Realms
>
> David Haraburda wrote:
>
> > Hello,
> >
> > I am in the process of migrating our web application to Tomcat 3.2.
> > Currently I am looking at re-working our current method of
> > authentication.  I noticed that in the server.xml file there is a note
> > that says "You can plug more advanced authentication modules".  Since
> > JDBCRealm will not work for us, I am assuming I need to write my own
> > module/Realm class.  Is my assumption correct?
>
> You've got it.  You will need to write a subclass of BaseInterceptor (for Tomcat
> 3.2) that behaves the way you need it to, and then configure that interceptor
> into use through server.xml.
>
> What I would do is start from the source for JDBCRealm and change what you need
> to for where to look up usernames, passwords, and roles.
>
> > What do I need to create
> > my Realm class?  I looking for the "right way" to do this, since it
> > looks like what we did before that worked with Tomcat 3.1, is now broken
> > with 3.2.  I want to write whatever I need to write in a manner that
> > will be compatible for future releases of Tomcat.  Sorry if I sound a
> > bit confused -- I am :)
> >
>
> In 4.0, it's different -- you will write a subclass of
> org.apache.catalina.realm.RealmBase to do what you need.  Again, you can start
>  from the existing JDBCRealm as an example.
>
> >
> > Thanks for any help,
> >
> > David
> >
>
> Craig McClanahan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
> ---- End Original Message ----
>
> Tell all your friends about wowwowmail.zzn.com
> ____________________________________________________________
> ZapZone Network brought to you by FortuneCity. http://www.fortunecity.com Get 100 
>megabytes of free
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to