tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44788] New: Container parent property availability
Date Wed, 09 Apr 2008 18:01:24 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=44788

           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
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: c.beckey@comcast.net


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
initialization.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message