Howdy,

>I'm trying to implement a realm to a context within a virtual host but
I
>can't
>get it working. This is my server.xml for the virtual host:
>
><Host name="my.host.name">
>    <Context path="" docBase="/path_to_app" />
>    <Context path="/stats" docBase="/path_to_stats">
>         <Realm className="org.apache.catalina.realm.MemoryRealm" />
>    </Context>
></Host>

This portion of your server.xml file looks fine.  What happens when you
run the server?  Any error messages in the log?

Assuming no to the above, i.e. server startup is OK, how have you
configured the security-constraint elements in your web.xml for the
stats context?

>Whatever I try, I can't get tomcat to ask me for an authentication.
>Can anybody help me out with an example. I've read the Tomcat Realm
how-to
>but
>that doesn't get me further.

Here's a simple example you can do quickly: take the default tomcat
server.xml, cut and paste the user (memory database) realm from the
Engine to the Context above (so that it's only present once in
server.xml, inside your context).  Add whatever security-constraint you
want to the web.xml for the context and restart tomcat in order to test
the realm.  This will convince you that Realm works fine inside a
Context.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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

Reply via email to