tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 44788] New: Container parent property availability
Date Wed, 09 Apr 2008 18:01:24 GMT

           Summary: Container parent property availability
           Product: Tomcat 5
           Version: 5.5.17
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: Catalina

With a custom realm deployed in a CONTEXT the related container and the parent
container (Container.getParent()) are available on the Realm.setContainer()
call.  When the realm is deployed in a HOST the container is available in the
Realm.setContainer() but the parent container (Container.getParent()) returns
null.  The parent container reference does become available later (on an
authenticate() call for example).

Example: the following code behaves differently depending on whether the
container is a HOST or a CONTEXT:
public void setContainer(Container container)
                this.container = container;

                if (container != null)
                        // parentContainer is null if container is a HOST
                        parentContainer = container.getParent();

Workaround is to retain the container reference and calls its getParent() after

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message