You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/05/12 17:00:30 UTC

DO NOT REPLY [Bug 19852] New: - When context reloaded the Parameters specified in server.xml for the Context are not availaple

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19852>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19852

When context reloaded the Parameters specified in server.xml for the Context are not availaple

           Summary: When context reloaded the Parameters specified in
                    server.xml for the Context are not availaple
           Product: Tomcat 4
           Version: 4.1.24
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: mihy@q8.dk


If in a <Context> definition in the server.xml a <Parameter> element is 
specified this element is only available through the getServletContext
().getInitParameter() at startup and not after webapp reload. Actually this is 
not certain. For example, if a file in the WEB-INF/classes directory is 
modified the Parameter is still available after reload but if WEB-INF/web.xml 
is touched the parameter disappears(becomes null) after reload.
So I conclude that reloading is different depending on the two cases.

After looking at when ApplicationContext is initialized I have realized that 
when web.xml is touched a new ApplicationContext is created(and the init 
parameters are lost) whereas if a file in WEB-INF/classes is touched a new 
ApplicationContext is not created so the ApplicationContext.parameters variable 
created at startup is still used which explains why they don't disappear.
The problem is the case where a new ApplicationContext is created. in 
ApplicationContext.mergeParameters the call to context.findApplicationParameters
() returns a zero length ApplicationParameters[] after reload, so i suppose 
that the problem is in the StandardContext. Perhaps addApplicationParameters() 
is not called after a reload but only at startup?
Thats all I've found out; hope it helps.

/Mikkel

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