> -----Original Message-----
> From: Rick Roberts [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 08, 2003 3:59 PM
> To: Tomcat Users List
> Subject: Re: JDBC Realm Warning Message?
> 
> 
> OK. The error message is gone now! Thanks.
> It took me a few tries to figure out where the 
> "<security-role>" needed 
> to go but finally found it by trial and error.
> 
> STILL GETTING THIS ERROR THO:
> "No Realm has been configured to authenticate against"
> 
> If I comment out the "UserDatabaseRealm", then I get the error, If I 
> leave it in I don't get the error message, but my test app does not 
> successfully log-in.
> 
> QUESTIONS:
> 
> 1. Should my new JDBC Realm be located inside <Engine> or 
> <Host> element?
> 
right where you commented out (just below it, for example) the
memoryrealm
Check the comment....   

> <!-- Because this Realm is here, an instance will be shared 
> globally -->

If you want it not shared globally, then you'll need to declare it
'lower' in the chain. The Tomcat docs tell you where you can place it.
(honest)

> 2. Should I need to comment out the "UserDatabaseRealm" that 
> is defined 
> in the Tomcat sample "server.xml" file?
> 
yes (or no, if you want this one to serve globally, but your JDBCRealm
to be used more locally).


> 3. Where can I find detail information about how to set up 
> "web.xml" and 
> "server.xml"?
> 
Through the DTDs and the servlet api.  DTD's specifically help you out
with where your elements ought to go, so that when the docs say "just
add this to web.xml", you can use the DTD (either with a validating XML
editor, or by eye) to verify the placement.  Also, server.xml has
*plenty* of comments, and is heavily HOW-TO'd in Tomcat docs.


> 4. I found this piece of code in Ian McFarland's book.  Is this the 
> correct way to do the login form?
> <form method="POST" 
> action='<%=response.encodeURL("j_security_check") %>'>
> 
Sorry, can't say.  It looks about right, but if I'm doing
container-managed, I usually just do Basic AUTH. (which throws the
OS-based dialog box).
 
Here is an article I found that is quite good:
http://www.onjava.com/pub/a/onjava/2001/07/24/tomcat.html
Note it's the 2nd page that starts talking about JDBC Realm


> 

> 
> Thanks,
> 
> -- 
> *******************************************
> * Rick Roberts                            *
> * Advanced Information Technologies, Inc. *
> *******************************************
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

Reply via email to