You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by na...@locus.apache.org on 2000/12/04 01:38:58 UTC
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/request SimpleRealm.java
nacho 00/12/03 16:38:58
Modified: src/share/org/apache/tomcat/request SimpleRealm.java
Log:
NPE when starting SimpleRealm as context interceptor
Revision Changes Path
1.14 +5 -3 jakarta-tomcat/src/share/org/apache/tomcat/request/SimpleRealm.java
Index: SimpleRealm.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/request/SimpleRealm.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- SimpleRealm.java 2000/12/03 22:29:39 1.13
+++ SimpleRealm.java 2000/12/04 00:38:57 1.14
@@ -94,6 +94,7 @@
throws TomcatException
{
super.contextInit(ctx);
+ setContextManager(ctx.getContextManager());
init(cm,ctx);
try {
// XXX make the name a "global" static -
@@ -153,8 +154,8 @@
req + " " + req.getContainer() );
userRoles = memoryRealm.getUserRoles( user );
- if ( userRoles == null )
- return 0;
+ if ( userRoles == null )
+ return 0;
req.setUserRoles( userRoles );
if( SecurityTools.haveRole( userRoles, roles ))
@@ -181,6 +182,7 @@
void init(ContextManager cm,Context ctx) {
if( memoryRealm==null) {
+ System.out.println(cm);
memoryRealm = new MemoryRealm(filename,cm.getHome());
try {
memoryRealm.readMemoryRealm();
@@ -273,7 +275,7 @@
return;
}
XmlMapper xh=new XmlMapper();
- if( debug > 5 ) xh.setDebug( 2 );
+ if( getDebug() > 5 ) xh.setDebug( 2 );
// call addUser using attributes as parameters
xh.addRule("tomcat-users/user",