You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bárbara Vieira <ba...@di.uminho.pt> on 2007/11/19 17:09:39 UTC

MemoryRealm question

 

Hi everyone!!

I have a question about org.apache.catalina.realm.MemoryRealm. 

When I use that Realm, how the principals variable, that is declared in that
class(MemoryRealm) as a HashMap, is loaded? I.e. How the data that is in the
file (ex. Tomcat-users.xml) is loaded to that variable?! I’m trying to
implement my own realm, but using that MemoryRealm as a model. However when
I run my program with my own realm, the principals variable is null.

 

If anyone can help, I appreciate. 

 

Regards from Braga, Portugal

Bárbara Vieira

 


Re: MemoryRealm question

Posted by Mark Thomas <ma...@apache.org>.
Bárbara Vieira wrote:
> When I use that Realm, how the principals variable, that is declared in that
> class(MemoryRealm) as a HashMap, is loaded?

Configure Tomcat to use the MemoryRealm.
Start tomcat with JPDA debugging enabled.
Set a break point at the start of the authenticate() method.
Access a protected resource.
Use the debugger to step through the authentication process.

You might want to set some break points in RealmBase as well.

Mark


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org